trufflehog
trufflehog copied to clipboard
(fix) Flaky BoxOAuth detector test
Description:
BoxOauth detectors's pattern test is using random password generator for input which does not guarantees inclusion. This PR make sure that define characters in password generation must follow inclusion. The func GenerateRandomPassword is also used by snowflake test. In this PR, I have moved it to pkg/common/utils.go to avoid code duplication, also added test around it.
Note: The func GenerateRandomPassword is only being used in pattern test. I could not find any better place to put it in except utils.go
Checklist:
- [x] Tests passing (
make test-community)? - [x] Lint passing (
make lintthis requires golangci-lint)?