Skip to content

feat(command-injection): title option injections and record the injection kind (#220) - #232

Merged
SizzleUnrlsd merged 1 commit into
mainfrom
feat/command-injection-nature
Oct 7, 2026
Merged

SizzleUnrlsd merged 1 commit into
mainfrom
feat/command-injection-nature

Conversation

@SizzleUnrlsd

Copy link
Copy Markdown
Contributor

Summary

Keeps the rule id command-injection for every case, so existing suppressions and baselines keep matching (#220). When the rule reads the command element by element and establishes what the attacker's input is, the finding carries an injection metadata field:

When the kind cannot be established (an option whose effect is to review, an unknown program or element before the input, a command that is not a list or tuple display, a sink such as os.system not read element by element), the field is absent and the title stays Command injection.

Assessment gains optional title and metadata fields (plugin API, backward compatible). Documented in docs/usage.md and docs/plugins.md. The SARIF report does not carry finding metadata today, so the field appears in the JSON report.

Verification

New tests in tests/test_command_injection_nature.py (red before the change), including an inline ignore[command-injection] suppressing an option injection. No existing test changed. Full suite green apart from the local test_packaging environment issue; ruff, mypy clean; regression snapshots unchanged; mitmproxy scan: same 75 findings (rule, severity, confidence, location), titles of three option cases changed.

Closes #220

@SizzleUnrlsd SizzleUnrlsd added the enhancement New feature or request label Oct 7, 2026
@SizzleUnrlsd SizzleUnrlsd self-assigned this Oct 7, 2026
@SizzleUnrlsd
SizzleUnrlsd merged commit edb2589 into main Oct 7, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

command-injection: decide on a distinct argument-injection rule for option cases

1 participant