Commit 2575246
fix: block template marker delimiters in front matter identity fields (#315)
* Initial plan
* fix: reject template marker delimiters in front matter identity fields
Block `{{` in name, description, and trigger fields to prevent
second-order template injection where a value like `{{ agent_content }}`
would be expanded by a later replacement pass, allowing arbitrary YAML
injection into the generated pipeline.
Closes #302
Agent-Logs-Url: https://github.com/githubnext/ado-aw/sessions/91f10480-fd27-4ac7-9105-cbea31200461
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
* fix: correct brace escaping in template marker error message
Agent-Logs-Url: https://github.com/githubnext/ado-aw/sessions/91f10480-fd27-4ac7-9105-cbea31200461
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
* fix: add pipeline command check and include offending value in error messages
Address rust-review feedback:
- Add missing contains_pipeline_command() check to reject_pipeline_injection()
to match the docstring's claim of ##vso[/##[ protection
- Include Found: '{}' in template marker error for debuggability
- Add test cases for pipeline command rejection
Agent-Logs-Url: https://github.com/githubnext/ado-aw/sessions/6b4b1bb0-b925-4b27-a00c-d0f4e576b263
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>1 parent e3e0072 commit 2575246
2 files changed
Lines changed: 61 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
| |||
3146 | 3147 | | |
3147 | 3148 | | |
3148 | 3149 | | |
| 3150 | + | |
| 3151 | + | |
| 3152 | + | |
| 3153 | + | |
| 3154 | + | |
| 3155 | + | |
| 3156 | + | |
| 3157 | + | |
| 3158 | + | |
| 3159 | + | |
| 3160 | + | |
| 3161 | + | |
| 3162 | + | |
| 3163 | + | |
| 3164 | + | |
| 3165 | + | |
| 3166 | + | |
| 3167 | + | |
3149 | 3168 | | |
3150 | 3169 | | |
3151 | 3170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
102 | 111 | | |
103 | 112 | | |
104 | 113 | | |
| |||
135 | 144 | | |
136 | 145 | | |
137 | 146 | | |
138 | | - | |
139 | | - | |
| 147 | + | |
| 148 | + | |
140 | 149 | | |
141 | 150 | | |
142 | 151 | | |
| |||
146 | 155 | | |
147 | 156 | | |
148 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
149 | 174 | | |
150 | 175 | | |
151 | 176 | | |
| |||
481 | 506 | | |
482 | 507 | | |
483 | 508 | | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
484 | 518 | | |
485 | 519 | | |
486 | 520 | | |
| |||
494 | 528 | | |
495 | 529 | | |
496 | 530 | | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
497 | 535 | | |
498 | 536 | | |
499 | 537 | | |
| |||
0 commit comments