Skip to content

Keep E1 upload flags within proved command boundaries - #841

Open
chrisknvidia wants to merge 1 commit into
NVIDIA:mainfrom
chrisknvidia:feat/christopherk/e1-command-boundaries
Open

chrisknvidia wants to merge 1 commit into
NVIDIA:mainfrom
chrisknvidia:feat/christopherk/e1-command-boundaries

Conversation

@chrisknvidia

@chrisknvidia chrisknvidia commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #838.

A health-check curl can currently consume -d from a later, independent Docker command and report E1 External Transmission. Limit curl/wget upload-pattern matching to proved command spans so separate LF/CRLF commands and Markdown examples keep their own flags. Preserve multiline uploads and derive locations and fingerprints from original source text. Corrected multi-command spans can change existing fingerprints; baseline generation and rescans are covered.

Reuse the bounded shell tokenizer and retain existing matching for uncertain syntax, including ambiguous same-line semicolon/hash boundaries, Windows shell constructs, malformed input and overlapping nested candidates. Other E1 patterns retain their behavior. The original Docker example can still produce an independent RP1 finding.

Validation on this head: 827 focused tests, 47 installed-wheel CLI checks and five real MCP stdio calls passed. The CLI matrix covers JSON/SARIF, strict exit policy, referenced shell files and baseline generation/suppression. Independent review verified the actual reports and installed package identity. Targeted mypy and source/test Ruff lint and formatting passed. All six hosted checks passed. Additional independent code/security review passed, including 13 native Bash argument-capture comparisons, bounded repeated-fetch timing, and actual installed-console JSON/SARIF scans for redirection, process substitution, parameter expansion and background commands. Native Windows shell execution was not run.

This overlaps #741 in E1 matcher infrastructure. Whichever change lands second must preserve both command boundaries and cumulative matching budgets, including anchored matching. This branch targets current main; combined integration with #741 has not been validated.

Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
@chrisknvidia chrisknvidia self-assigned this Oct 14, 2026
@chrisknvidia
chrisknvidia marked this pull request as ready for review October 16, 2026 05:38
@chrisknvidia

Copy link
Copy Markdown
Collaborator Author

Ready for review at 15b7e324. There are no outstanding review comments or known actionable findings.

All six hosted CI checks have passed.

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.

E1 upload matcher borrows flags from independent commands

1 participant