fix(security): neutralize VSO pipeline commands in Stage 3 log output#396
Merged
Conversation
Agent-Logs-Url: https://github.com/githubnext/ado-aw/sessions/990ce2b1-abbe-40d7-91eb-77277bcbbc29 Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix VSO command injection vulnerability in Stage 3 log output
fix(security): neutralize VSO pipeline commands in Stage 3 log output
May 5, 2026
jamesadevine
approved these changes
May 5, 2026
This was referenced May 5, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
##vso[and##[ADO logging commands survive control-character filtering (they're pure printable ASCII) and reachprintln!()in Stage 3, where ADO executes them. Three independent paths — budget-exceeded skip messages, wiki page create messages, and wiki page update messages — all embed unsanitized structural fields (title,path) directly into stdout.Changes
src/sanitize.rs— exposeneutralize_pipeline_commandsaspub(crate)so call sites outside the module can apply it directly without the fullsanitize_configpipeline (which preserves\n/\r, unsuitable for single-line log context strings)src/execute.rs—extract_entry_context— applyneutralize_pipeline_commands()totitleandpathfields after the existing control-char strip, before embedding in budget-exceeded log/result messagessrc/safeoutputs/create_wiki_page.rs+update_wiki_page.rs—sanitize_content_fields— same two-step fix forself.path; sinceeffective_pathderives fromself.pathvianormalize_wiki_path, all downstream log messages (already-exists, success, PUT-failure) are covered by fixing the sourceTest plan
Six new unit tests cover VSO neutralization in
extract_entry_context(title and path variants) andsanitize_content_fieldsfor both wiki tools. All 1107 existing tests pass.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
spsprodeus21.vssps.visualstudio.com/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-f4dc8202a0574181 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-f4dc8202a0574181 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/clap_derive-28fe0dd3cb6f860c.c/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-08469b25c8713b9f.15ci54sqstm9plk9n8tzsxk8r.1qe2vi0.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/clap_derive-28fe0dd3cb6f860c.c/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-08469b25c8713b9f.1osek3msodzrcuzzqb6j6fh5f.1qe2vi0.rcgu.o 64-REDACTED-linux-gnu/bin/rust-lld g/de�� lib/rustlib/x86_-Wl,--as-needed lib/rustlib/x86_-Wl,-Bstatic bin/rustc 7d86f546b9f25a26cc 7d86f546b9f25a26-Wl,--version-script=/home/REDACTED/work/ado-aw/ado-aw/target/debug/de�� eta.o bin/rustc s/yo��(dns block)/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-f4dc8202a0574181 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-f4dc8202a0574181 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie 37a5vpfc9grf83tapm7.0xpk6kl.rcgu.o rj76ro2tx72g6l1dxch.0xpk6kl.rcgu.o 56xt4tnxr14dyslr5yr.0xpk6kl.rcgu.o weqouzvwj204cs9zx47.0xpk6kl.rcgu.o po14gdsp7nsb0tn5qm9.0xpk6kl.rcgu.o 96y3m5qgwp6gglv6gzw.0xpk6kl.rcgu.o miwqh6oxxjoxxgm9jcu.0xpk6kl.rcgu.o qfnfg1qskcufw1m67aj.0xpk6kl.rcgu.o wnrzufvl2f1ly2jz8mi.0xpk6kl.rcgu.o 3yebsirl7wtzt6zf02v.0xpk6kl.rcgu.o 11oaj82vgibvmk3tp2z.0xpk6kl.rcgu.o e0b09g2kmpl46vhzo4p.0xpk6kl.rcgu.o o0ca8e5y7ex48mielxx.0xpk6kl.rcgu.o bcccdvq2hpd05krunh5.0xpk6kl.rcgu.o(dns block)/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-f4dc8202a0574181 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-f4dc8202a0574181 s/ado_aw-f4dc820remote s/ado_aw-f4dc820get-url s/ado_aw-f4dc820origin s/ad�� s/ado_aw-f4dc8202a0574181.0qxja5qfnfg1qskcufw1m67aj.0xpk6kl.rcgu.o s/ado_aw-f4dc8202a0574181.0ryb47wnrzufvl2f1ly2jz8mi.0xpk6kl.rcgu.o s/ado_aw-f4dc8202a0574181.0ycrds3yebsirl7wtzt6zf02v.0xpk6kl.rcgu.o s/ado_aw-f4dc820git s/ado_aw-f4dc820remote s/ado_aw-f4dc820get-url s/ado_aw-f4dc820origin s/ad�� s/ado_aw-f4dc8202a0574181.140wwknpg2hs3lbfo0xzude6s.0xpk6kl.rcgu.o s/ado_aw-f4dc8202a0574181.162elvo6u7r6dhctftupulf54.0xpk6kl.rcgu.o u/13/liblto_plugin.so _64-linux-gnu/13git su8gH1.res target/debug/depget-url target/debug/deporigin(dns block)spsprodweu4.vssps.visualstudio.com/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-f4dc8202a0574181 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-f4dc8202a0574181 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/clap_derive-28fe0dd3cb6f860c.c/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-08469b25c8713b9f.15ci54sqstm9plk9n8tzsxk8r.1qe2vi0.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/clap_derive-28fe0dd3cb6f860c.c/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-08469b25c8713b9f.1osek3msodzrcuzzqb6j6fh5f.1qe2vi0.rcgu.o 64-REDACTED-linux-gnu/bin/rust-lld g/de�� lib/rustlib/x86_-Wl,--as-needed lib/rustlib/x86_-Wl,-Bstatic bin/rustc 7d86f546b9f25a26cc 7d86f546b9f25a26-Wl,--version-script=/home/REDACTED/work/ado-aw/ado-aw/target/debug/de�� eta.o bin/rustc s/yo��(dns block)/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-f4dc8202a0574181 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-f4dc8202a0574181 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie 37a5vpfc9grf83tapm7.0xpk6kl.rcgu.o rj76ro2tx72g6l1dxch.0xpk6kl.rcgu.o 56xt4tnxr14dyslr5yr.0xpk6kl.rcgu.o weqouzvwj204cs9zx47.0xpk6kl.rcgu.o po14gdsp7nsb0tn5qm9.0xpk6kl.rcgu.o 96y3m5qgwp6gglv6gzw.0xpk6kl.rcgu.o miwqh6oxxjoxxgm9jcu.0xpk6kl.rcgu.o qfnfg1qskcufw1m67aj.0xpk6kl.rcgu.o wnrzufvl2f1ly2jz8mi.0xpk6kl.rcgu.o 3yebsirl7wtzt6zf02v.0xpk6kl.rcgu.o 11oaj82vgibvmk3tp2z.0xpk6kl.rcgu.o e0b09g2kmpl46vhzo4p.0xpk6kl.rcgu.o o0ca8e5y7ex48mielxx.0xpk6kl.rcgu.o bcccdvq2hpd05krunh5.0xpk6kl.rcgu.o(dns block)/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-f4dc8202a0574181 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-f4dc8202a0574181 s/ado_aw-f4dc820remote s/ado_aw-f4dc820get-url s/ado_aw-f4dc820origin s/ad�� s/ado_aw-f4dc8202a0574181.0qxja5qfnfg1qskcufw1m67aj.0xpk6kl.rcgu.o s/ado_aw-f4dc8202a0574181.0ryb47wnrzufvl2f1ly2jz8mi.0xpk6kl.rcgu.o s/ado_aw-f4dc8202a0574181.0ycrds3yebsirl7wtzt6zf02v.0xpk6kl.rcgu.o s/ado_aw-f4dc820git s/ado_aw-f4dc820remote s/ado_aw-f4dc820get-url s/ado_aw-f4dc820origin s/ad�� s/ado_aw-f4dc8202a0574181.140wwknpg2hs3lbfo0xzude6s.0xpk6kl.rcgu.o s/ado_aw-f4dc8202a0574181.162elvo6u7r6dhctftupulf54.0xpk6kl.rcgu.o u/13/liblto_plugin.so _64-linux-gnu/13git su8gH1.res target/debug/depget-url target/debug/deporigin(dns block)If you need me to access, download, or install something from one of these locations, you can either: