analyze: widen unescaped-${VAR} detector to scan the whole raw pipeline file #14

Merged
oleks merged 1 commits from fix/unescaped-var-whole-file-scan into main 2026-08-04 01:02:51 +03:00

1 Commits

Author SHA1 Message Date
Oleks 38bf4c51ef analyze: widen unescaped-${VAR} detector to scan the whole raw pipeline file
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
findUnescapedVars only walked parsed Commands strings, so a literal ${VAR}
in a step name, top-level comment, or environment: value - all outside any
commands: string - passed the check clean while Woodpecker's own ${VAR}
substitution pass (which runs over the entire raw pipeline YAML text, not
just command bodies) hard-failed the pipeline at compile time.

Add findUnescapedVarsInFile as a whole-file pass alongside the existing
per-command scan, deduped against it so nothing inside a commands: string
gets reported twice. Fixes oleks/pipetree#13, reproduced by a fixture
matching the actual incident: an explanatory comment above a step's
commands: block containing unescaped ${VAR} example text (oleks/deals
pipelines #12/#13, oleks/element-web-patched #5/#6).
2026-08-04 01:00:42 +03:00