Skip to content

upstreaming: guard Actions logs from agent commands - #5000

Merged
luhenry merged 1 commit into
mainfrom
upstreaming-pipeline
Nov 20, 2026
Merged

luhenry merged 1 commit into
mainfrom
upstreaming-pipeline

Conversation

@luhenry

@luhenry luhenry commented Nov 20, 2026

Copy link
Copy Markdown
Member

Summary

Prevent untrusted agent and MCP output from being interpreted as GitHub Actions workflow commands.

Worker run 44787086758 successfully produced and uploaded a valid spookyhash repair, but an inspected actions/setup-python source file contained ::add-matcher::. Pi's raw JSON stream was forwarded to the Actions console, whose command parser treated that embedded source text as a real command. The agent process exited zero, but GitHub marked the step failed and skipped publication.

This change:

  • hash-checks gh-aw v1.2.2 process_runner.cjs before modifying it;
  • patches only the child-output console forwarding path in a trusted pre-agent step;
  • inserts a space after every colon byte in the console copy, making a double-colon command prefix impossible even across output chunks;
  • keeps canonical stdout/stderr collection and uploaded evidence unchanged;
  • verifies the exact patched output hash and accepts an already-patched runtime idempotently;
  • adds malicious command and chunk-boundary regression tests;
  • keeps the authored worker and generated lock synchronized.

Validation

  • 207 upstreaming tests pass.
  • gh-aw v1.2.2 checks pass.
  • The patch applies to the pinned v1.2.2 source and produces SHA-256 74bb397cd5e0502d4a83c6c9e9a9d838d52d588b4402807f1f24b97178f21326 on repeated application.
  • git diff --check passes.

@luhenry
luhenry merged commit fd7b47c into main Nov 20, 2026
4 checks passed
@luhenry
luhenry deleted the upstreaming-pipeline branch November 20, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant