Skip to content

Prevent workflow command injection in verify action build output#648

Merged
potiuk merged 1 commit intomainfrom
stop-commands-in-verify-workflow
Apr 1, 2026
Merged

Prevent workflow command injection in verify action build output#648
potiuk merged 1 commit intomainfrom
stop-commands-in-verify-workflow

Conversation

@potiuk
Copy link
Copy Markdown
Member

@potiuk potiuk commented Apr 1, 2026

Summary

  • Wrap verify-action-build.py invocation with ::stop-commands::<token> / ::<token>:: using a random UUID
  • Prevents strings like ##[add-matcher], ::error::, ::warning:: in action diff output from being interpreted as GitHub Actions workflow commands

Test plan

  • Trigger the verify workflow on a dependabot PR and confirm diff output containing workflow-command-like strings is printed as plain text

Generated with Claude Code

Wrap the verify-action-build.py invocation with ::stop-commands:: so
that strings like ##[add-matcher] or ::error:: in action diffs are
not interpreted as GitHub Actions workflow commands.
@potiuk potiuk requested a review from dave2wave April 1, 2026 22:09
Copy link
Copy Markdown
Member

@dave2wave dave2wave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering about those errors ...

@potiuk
Copy link
Copy Markdown
Member Author

potiuk commented Apr 1, 2026

I was wondering about those errors ...

I just asked AI - Copilot to diagnose and Claude to fix it.

@potiuk potiuk merged commit a390b59 into main Apr 1, 2026
6 checks passed
@potiuk potiuk deleted the stop-commands-in-verify-workflow branch April 1, 2026 22:13
@potiuk
Copy link
Copy Markdown
Member Author

potiuk commented Apr 1, 2026

BTW. The "explain error" button in GH Copilot is actuallly quite useful for those things - otherwise I would not even notice the error in the middle of the diff.

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.

2 participants