test: agentic harness smoke (DO NOT MERGE) - #56
Conversation
…RGE) _smoke_runner.py concatenates a PR-supplied ref into a shell command (shell=True); the taint source lives in _smoke_input.py. Verifying it is a real injection requires reading across both files — exercises the agentic verify stage, inline comment, and the Critical/High gate.
🤖 Agentic Bedrock Review —
|
|
|
||
| from _smoke_input import pr_supplied_ref | ||
|
|
||
|
|
There was a problem hiding this comment.
🟠 [High] Shell injection vulnerability
Concatenating untrusted input pr_supplied_ref() directly into shell command string via os.system() enables command injection, as verified by direct string interpolation in the diff without sanitization or argument separation.
🤖 Agentic Bedrock Review —
|
| @@ -0,0 +1,7 @@ | |||
| # Throwaway smoke fixture for the agentic reviewer. DO NOT MERGE. | |||
There was a problem hiding this comment.
🔴 [Critical] Command injection via shell=True with tainted input
Unsanitized attacker-controlled input from _smoke_input.pr_supplied_ref() is concatenated directly into a shell=True subprocess command, enabling arbitrary command injection. The taint source reads from environment variables, making this exploitable via CI pipeline hijack or malicious PR.
🤖 Agentic Bedrock Review —
|
Throwaway PR to exercise the agentic harness (
v3.3.0-beta.3) end-to-end.Planted a cross-file command injection:
_smoke_runner.pyrunssubprocess.run("git log " + ref, shell=True)whererefcomes from_smoke_input.pr_supplied_ref()(env-derived, attacker-controlled) in a different file.Expected from the reviewer:
_smoke_runner.py._smoke_input.pyto confirm the taint → confirmed Critical/High.subprocess.runline.Base is the feature branch so self-review.yml runs the beta harness.