fix: address injection vulnerabilities from red team audit#175
fix: address injection vulnerabilities from red team audit#175jamesadevine merged 1 commit intomainfrom
Conversation
🔍 Rust PR ReviewSummary: Good security fixes that close the high/medium findings — two gaps worth addressing before merge. Findings🐛 Bugs / Logic Issues
|
b7ac7a1 to
a920dab
Compare
🔍 Rust PR ReviewSummary: Good direction, but Finding 4's fix is incomplete — Findings🐛 Bugs / Logic Issues
✅ What Looks Good
|
- Validate engine.model against [A-Za-z0-9._:-]+ to prevent shell
injection via single-quote breakout in AWF command (Finding 1, High)
- Validate tools.bash entries reject single quotes (same attack surface)
- Reject ADO template expressions (${{ and $() in front matter name
and description fields to prevent secret disclosure (Finding 2, Medium)
- Reject newlines in name/description to prevent YAML structure injection
- Escape single quotes in pipeline trigger config by doubling them per
YAML spec (Finding 3, Medium)
- Quote {{ allowed_domains }} in base.yml template to prevent AWF
argument injection via spaces in domain patterns (Finding 4, Medium)
- Clarify network.blocked docs: exact-match removal, not wildcard-aware
blocking (Finding 6, Low)
- Add 9 security validation test cases
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
a920dab to
793a842
Compare
🔍 Rust PR ReviewSummary: Solid security fixes — logic is correct and the defense-in-depth approach is sound. One testing gap and a couple of minor suggestions worth addressing. Findings🐛 Bugs / Logic Issues
|
Summary
Addresses injection vulnerabilities identified by the red team security audit in #171. Fixes findings 1–4 and 6 (finding 5 accepted as risk per triage).
Changes
Finding 1 (High): Shell injection via
engine.model[A-Za-z0-9._:-]+ingenerate_copilot_params()tools.bashentries reject single quotes (same attack surface — values embedded inside single-quoted AWF bash command)Result<String>to propagate validation errorsFinding 2 (Medium): ADO expression injection via
name/descriptionvalidate_front_matter_identity()function rejects${{and$(in name/descriptionFinding 3 (Medium): YAML single-quote injection in trigger config
'') per YAML spec ingenerate_pipeline_resources()pipeline.name,pipeline.project, and branch namesFinding 4 (Medium): AWF argument injection via
network.allow{{ allowed_domains }}substitution intemplates/base.yml(both occurrences)Finding 6 (Low):
network.blockeddocs clarificationAGENTS.mdandREADME.mdto clarify thatnetwork.blockeddoes exact-match removal from the allow list — wildcard patterns like*.example.comare not affected by blocking a specific subdomainTesting
Added 9 new test cases covering:
All existing + new tests pass.
Closes #171
Closes #177
Closes #178