fix(analyzer): resolve indirect subprocess shell values - #497
Open
chrisknvidia wants to merge 4 commits into
Open
fix(analyzer): resolve indirect subprocess shell values#497chrisknvidia wants to merge 4 commits into
chrisknvidia wants to merge 4 commits into
Conversation
Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
chrisknvidia
marked this pull request as ready for review
September 8, 2026 08:11
chrisknvidia
marked this pull request as draft
September 8, 2026 08:28
Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
chrisknvidia
marked this pull request as ready for review
September 8, 2026 23:30
chrisknvidia
marked this pull request as draft
September 9, 2026 00:00
InfinityFreakUniverseBoy
approved these changes
Sep 9, 2026
chrisknvidia
marked this pull request as ready for review
September 9, 2026 06:44
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.
Summary
subprocess.*and barePopencalls whoseshellargument is a name bound to a definitely truthy immutable value, including botha = Trueand the reporter attachment'sa = 'True'shell=Trueequivalent under the same artifact deadlineSupported contract
The AST companion follows straight-line assignments at module scope and inside functions (including nested functions). It supports direct call expressions and assignment-RHS calls, a deliberately small passive immutable value subset, direct
subprocess.*imports, and directfrom subprocess import Popenbindings.Unsupported expressions, compound control flow, class/method effects, import aliases, arbitrary dynamic effects, and return/yield positions are intentionally conservative boundaries: tracked facts are invalidated rather than guessed. Unresolved calls retain the existing AST4 finding without gaining TM1.
Verification
Candidate:
89ccd3681cf72e06691ff9ec0e4c9eddcf3f0770True, boundTrue, and bound'True'produced equivalent HIGH/0.9 TM1 findings and identical risk results; false and control-flow-ambiguous controls produced no TM1twine check, isolated install, andpip checksrc/andtests/; mypy clean for all four touched production modulesoctocat/Hello-Worldclone/scan; direct/bound/false matrix, all output formats,pip check, andcompileallalso passedRemaining verification limits
Fixes #475