Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Dec 7, 2018

Conversation

calvinli
Copy link
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.

Copy link
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.

None yet

3 participants