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

Skip to content

check the whitelist regex in the base plugin class (for #93)#99

Merged
calvinli merged 2 commits into
masterfrom
whitelist_in_base_plugin
Dec 7, 2018
Merged

check the whitelist regex in the base plugin class (for #93)#99
calvinli merged 2 commits into
masterfrom
whitelist_in_base_plugin

Conversation

@calvinli
Copy link
Copy Markdown
Member

@calvinli calvinli commented Dec 6, 2018

This adds a check for the WHITELIST_REGEX (i.e. # pragma: whitelist secret) in the base plugin class, in analyze(), see #93.

This doesn't affect HighEntropyStringsPlugin because that class overrides analyze(), but that class already does this regex check (in analyze_string()). Seems reasonable to me that if a class is overriding analyze() it should handle this whitelist check itself too.

Test coverage

This actually increases test coverage slightly... I did have to add a whitelisted line to the test .ini file, otherwise the whitelist check in HighEntropyStringsPlugin loses its test coverage.

@calvinli calvinli requested a review from KevinHock December 7, 2018 00:06
Copy link
Copy Markdown
Collaborator

@KevinHock KevinHock left a comment

Choose a reason for hiding this comment

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

🚢

@calvinli calvinli merged commit 564615f into master Dec 7, 2018
@calvinli calvinli deleted the whitelist_in_base_plugin branch December 7, 2018 00:58
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