Add configurable Python module lists via config directives#122
Open
nickdavies wants to merge 1 commit intoldayton:mainfrom
Open
Add configurable Python module lists via config directives#122nickdavies wants to merge 1 commit intoldayton:mainfrom
nickdavies wants to merge 1 commit intoldayton:mainfrom
Conversation
Add python-allow-module and python-deny-module config directives so users can customize which Python modules are considered safe or dangerous during static analysis. - Config: parse and validate module names (dotted identifiers only), accumulate across config layers, support inline comments - SafetyAnalyzer: parameterize with extra_safe_modules/extra_deny_modules merged with hardcoded sets. Allow overrides exact matches in the dangerous list (submodules must be allowed separately). - Thread Config through HandlerContext so python handler can access configured module lists. Example .dippy config: python-allow-module numpy python-allow-module pandas python-deny-module requests
7910583 to
42ddb64
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I wanted to be able to configure Python modules in preparation for enabling -c analysis. I'm not super familiar with the codebase so please let me know what you think of the approach. Happy to adjust to match any style etc.
Add python-allow-module and python-deny-module config directives so users can customize which Python modules are considered safe or dangerous during static analysis.
Example .dippy config:
python-allow-module numpy python-allow-module pandas python-deny-module requests