You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
validate_front_matter_identity rejected newlines in name and description but left triggers.pipeline.name, triggers.pipeline.project, and branch entries unchecked — allowing newlines that produce multi-line YAML single-quoted scalars, which could confuse tooling or display incorrectly.
Changes
validate_front_matter_identity — extends newline checks to cover triggers.pipeline.name, triggers.pipeline.project (when present), and each entry in triggers.pipeline.branches
Tests — four new tests covering rejection of \n in each trigger pipeline field, plus a positive case for valid values; renamed the existing allows_valid_values test to allows_valid_name_and_description to be more precise
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:
CopilotAI
changed the title
[WIP] Add validation for newlines in trigger.pipeline fields
chore: validate trigger.pipeline fields for newlines
Apr 14, 2026
Summary: Looks good — correct fix, well-tested. One consistency gap worth noting.
Findings
⚠️ Suggestions
src/compile/common.rs:188-213 — The existing name/description validation checks for both newlines AND ADO expressions ($\{\{, $(, $[). The new trigger-field validation only checks for newlines. While resources.pipelines fields (source:, project:, branch entries) are structural config values that ADO doesn't evaluate as expressions at runtime, the inconsistency with the established pattern is worth flagging for future maintainers. Consider adding the ADO expression check here too, or add a code comment explaining why it's intentionally omitted for these fields.
src/compile/common.rs:205-211 (branch loop) — The error message for an invalid branch doesn't include which branch triggered the failure. Adding the offending value would improve the developer UX:
anyhow::bail!("Front matter 'triggers.pipeline.branches' entry {:?} must be single line (no newlines). \ Multi-line values could inject YAML structure into the generated pipeline.",
branch,);
✅ What Looks Good
The Option<TriggerConfig> → Option<PipelineTrigger> traversal with if let Some chains is clean and idiomatic.
Both \n and \r are checked — correctly handles classic Mac line endings.
Test coverage is thorough: three rejection tests (one per field) plus one positive case.
Renaming allows_valid_values → allows_valid_name_and_description is a good precision improvement.
validate_front_matter_identity is called in both standalone.rs and onees.rs, so the fix applies to both compile targets.
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
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.
validate_front_matter_identityrejected newlines innameanddescriptionbut lefttriggers.pipeline.name,triggers.pipeline.project, and branch entries unchecked — allowing newlines that produce multi-line YAML single-quoted scalars, which could confuse tooling or display incorrectly.Changes
validate_front_matter_identity— extends newline checks to covertriggers.pipeline.name,triggers.pipeline.project(when present), and each entry intriggers.pipeline.branches\nin each trigger pipeline field, plus a positive case for valid values; renamed the existingallows_valid_valuestest toallows_valid_name_and_descriptionto be more preciseWarning
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:
api.github.com (HTTP Only)/home/REDACTED/work/ado-aw/ado-aw/target/debug/ado-aw /home/REDACTED/work/ado-aw/ado-aw/target/debug/ado-aw proxy --allow api.github.com /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-d9ec3e202ea63537.1bphc5ppikkmf9gdr0s68x1p9.0cd26lk.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-d9ec3e202ea63537.1sgopqj46gptnc0lbexasqcdh.0cd26lk.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-d9ec3e202ea63537.1zwwwnsl5hpu01p06g7g22e8r.0cd26lk.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-d9ec3e202ea63537.22sas3hw6qnxou445a2xmp1cn.0cd26lk.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-d9ec3e202ea63537.27o2kuwnvtifbhdh5pue0nvnt.0cd26lk.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-d9ec3e202ea63537.2b�� /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-d9ec3e202ea63537.2uobun4n1xgd04x1d5e7u1y4h.0cd26lk.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-d9ec3e202ea63537.330c18cwdvgi96e9ysiyncy21.0cd26lk.rcgu.o g/de�� lib/rustlib/x86_/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/rmcp_macros-ec3fabaecd10b65a.r/home/REDACTED/work/ado-aw/ado-aw/target/debug/ado-aw lib/rustlib/x86_/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/rmcp_macros-ec3fabaecd10b65a.rcompile bin/rustc e-c4448fe3a5c46e/usr/libexec/gcc/x86_64-linux-gnu/13/collect2 e-c4448fe3a5c46e-plugin e-c4448fe3a5c46e/usr/libexec/gcc/x86_64-linux-gnu/13/liblto_plugin.so bin/rustc(packet block)dev.azure.com/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e07c5709f9b8ed2e /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e07c5709f9b8ed2e --hash-style=gnu --as-needed -shared -fuse-ld=lld -z 7.03fm7k6zrdyh4198fjkt979n0.0cd26lk.rcgu.o 7.0c5vmfzleerl649jl03crh9jw.0cd26lk.rcgu.o 7.0ec7x78epulx2puue5c2mjv57.0cd26lk.rcgu.o 7.0l11ebyxgad7g4bemgqjiqa53.0cd26lk.rcgu.o 7.0m4bktzfagl8begpppf7frszp.0cd26lk.rcgu.o 7.0sr2qr65af94sarrlq2fxuhtn.0cd26lk.rcgu.o 7.0uk8pqg1x68cbq3dud7y7hxwd.0cd26lk.rcgu.o 7.16ml9nr41z6zyeey82dm0hvni.0cd26lk.rcgu.o 7.1a0js2iovuhfw6sdxeo0q4a00.0cd26lk.rcgu.o 7.1bphc5ppikkmf9gdr0s68x1p9.0cd26lk.rcgu.o 7.1sgopqj46gptnc0lbexasqcdh.0cd26lk.rcgu.o 7.1zwwwnsl5hpu01p06g7g22e8r.0cd26lk.rcgu.o 7.22sas3hw6qnxou445a2xmp1cn.0cd26lk.rcgu.o 7.27o2kuwnvtifbhdh5pue0nvnt.0cd26lk.rcgu.o(dns block)/home/REDACTED/work/ado-aw/ado-aw/target/debug/ado-aw /home/REDACTED/work/ado-aw/ado-aw/target/debug/ado-aw proxy --allow api.github.com --allow dev.azure.com --allow *.visualstudio.com -fuse-ld=lld -z relro -o g/de�� pl-d776f39dc20c6/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/rmcp_macros-ec3fabaecd10b65a.r/home/REDACTED/work/ado-aw/ado-aw/target/debug/ado-aw eta.o bin/rustc e-c4448fe3a5c46e/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/lib/rustlib/x86_-o e-c4448fe3a5c46e-plugin e-c4448fe3a5c46e/usr/libexec/gcc/x86_64-linux-gnu/13/liblto_plugin.so bin/rustc(dns block)msazuresphere.visualstudio.com/home/REDACTED/work/ado-aw/ado-aw/target/debug/ado-aw /home/REDACTED/work/ado-aw/ado-aw/target/debug/ado-aw proxy --allow api.github.com --allow dev.azure.com --allow *.visualstudio.com -fuse-ld=lld -z relro -o g/de�� pl-d776f39dc20c6/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/rmcp_macros-ec3fabaecd10b65a.r/home/REDACTED/work/ado-aw/ado-aw/target/debug/ado-aw eta.o bin/rustc e-c4448fe3a5c46e/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/lib/rustlib/x86_-o e-c4448fe3a5c46e-plugin e-c4448fe3a5c46e/usr/libexec/gcc/x86_64-linux-gnu/13/liblto_plugin.so bin/rustc(dns block)raw.github.com/home/REDACTED/work/ado-aw/ado-aw/target/debug/ado-aw /home/REDACTED/work/ado-aw/ado-aw/target/debug/ado-aw proxy --allow *.github.com /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-d9ec3e202ea63537.1bphc5ppikkmf9gdr0s68x1p9.0cd26lk.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-d9ec3e202ea63537.1sgopqj46gptnc0lbexasqcdh.0cd26lk.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-d9ec3e202ea63537.1zwwwnsl5hpu01p06g7g22e8r.0cd26lk.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-d9ec3e202ea63537.22sas3hw6qnxou445a2xmp1cn.0cd26lk.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-d9ec3e202ea63537.27o2kuwnvtifbhdh5pue0nvnt.0cd26lk.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-d9ec3e202ea63537.2b�� /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-d9ec3e202ea63537.2uobun4n1xgd04x1d5e7u1y4h.0cd26lk.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/compiler_tests-d9ec3e202ea63537.330c18cwdvgi96e9ysiyncy21.0cd26lk.rcgu.o g/de�� lib/rustlib/x86_--error-format=json lib/rustlib/x86_--json=diagnostic-rendered-ansi,artifacts,future-incompat bin/rustc e-c4448fe3a5c46ecc e-c4448fe3a5c46e-m64 e-c4448fe3a5c46e/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/rustcBTbQgS/symbols.o bin/rustc(dns block)If you need me to access, download, or install something from one of these locations, you can either: