docs: recommend safe JSON consumption of changed files to prevent argument injection - #2884
docs: recommend safe JSON consumption of changed files to prevent argument injection#2884somaz94 wants to merge 1 commit into
Conversation
Up to standards ✅🟢 Issues
|
|
Just a friendly ping 🙂 — this has been green and awaiting review for about 3 weeks now. Happy to rebase or address any feedback whenever a maintainer has a chance to take a look. Thanks for maintaining this project! |
|
@jackton1 — following up on my 8 Jul note and correcting it: I said this had been green for about three weeks, which wasn't accurate. There are zero workflow runs on this PR; the only checks are Codacy and GitGuardian, which are third-party apps reporting independently of the repo's own CI. Fork PRs from April onward all show zero runs, while in-repo PRs get the full 8. That said, this one is docs-only (+31/−0, Would you have a moment to take a look? |
Documents the recommended pattern for safely forwarding the list of changed files to another command: consume the JSON output (
json: true,escape_json: false) into a bash array withjq/mapfileand pass it after the--end-of-options separator. Without this, a file whose name starts with-(e.g.--config=evil.cjs) can inject options into the downstream command and lead to code execution in CI.Validation:
<details>/ code-fence balance preserved.shellcheck -S style(clean).auto-docwill not conflict.related: #2880