Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@d3jk
Copy link
Collaborator

@d3jk d3jk commented Jun 17, 2020

Substantially improved and revamped credential pattern matching (See testing/regex_testing/test_cases.txt for a comprehensive set of examples for all pattern matching enhancements listed in this update)

  • Added support for XML formatted passwords/secrets
  • Added support for Password: notquotedvalue (we already support password followed by equal sign... this was just for colon without quotes)
  • Condensed regexes (easier to maintain and keep everything in sync)
  • Increased our testing suite to over 1,100 test cases
  • Enhanced environment variable detection including increased language support (${variable}, #{variable}, %%variable%%, etc..)
    • Password/secret/key values beginning with $ will not be flagged unless an additional numeric or special character is included in the value: myPwd = $uperStr0ng will be flagged, but myPwd = $password will not be flagged as it is assumed a variable (known limitation: we do not yet process regexes based on file extension)
    • Password/secret/key values wrapped in ${}, #{}, or {} are assumed variables and will not be flagged even if they contain a numeric value i.e. apiKey = $S3_APIKEY will be flagged, but apiKey = ${S3_APIKEY} will not be flagged
    • XML formatted passwords/secrets/keys have an additional environment variable check to consider values wrapped in %% environment variables i.e. <Password>%%variable%%</Password> is considered a variable
  • Updated keys regex to look for more characters (matches password chars now)
  • A wider range of special characters will now be included to help identify more hard-coded credentials
  • Overall reduction in false positives due to new credential character requirements
    • To be flagged as a hard-coded password/secret/key the value must now include at least one special or numeric character

Updated SEDATED® references from ℠ to ®

Copy link
Collaborator

@sclouts sclouts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed, approved!

@sclouts sclouts merged commit 495f434 into master Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants