Repository navigation
checks: Exclude vendored code from bandit scanning - #7699
Merged
Merged
Conversation
Bandit scans the vendored ctypesgen copy in python/libgrass_interface_generator and the vendored PLY copy in python/grass/temporal/ply, reporting 13 findings (B102, B403, B605, B307, B602, B607) in code GRASS does not maintain. Exclude both directories, matching the existing pylint ignore-paths and formatter extend-exclude entries.
echoix
approved these changes
Jul 14, 2026
Member
|
@cwhite911 You can create the commit message |
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.
This addresses 13 open code scanning (Bandit) alerts that all point into vendored code GRASS does not maintain:
python/libgrass_interface_generator/(vendored ctypesgen): 4x B102 (exec), 4x B403 (pickle import), 1x B605, 1x B307, 1x B602, 1x B607python/grass/temporal/ply/(vendored PLY): 1x B307 (eval)Both directories are already excluded from pylint (
ignore-paths) and from the formatter (extend-exclude) inpyproject.toml, so this brings bandit in line with existing practice for vendored code.Verified locally with bandit 1.9.4 (the version currently used in CI): before the change,
bandit -c pyproject.toml -iii -ron the two directories reports exactly the 13 findings above; after the change it reports none.This is part of a larger effort to work through the open code scanning alerts, grouped into small PRs by issue type.
Written with the assistance of Claude Code.