Harden CI workflows against prompt injection and supply chain attacks#4034
Merged
ChrisJBurns merged 1 commit intomainfrom Mar 6, 2026
Merged
Harden CI workflows against prompt injection and supply chain attacks#4034ChrisJBurns merged 1 commit intomainfrom
ChrisJBurns merged 1 commit intomainfrom
Conversation
Apply security hardening to GitHub Actions workflows based on an audit informed by the Clinejection and hackerbot-claw attack patterns: - claude.yml: Add author_association checks to block untrusted users from invoking the AI agent, and restrict allowed_tools to prevent arbitrary shell execution via prompt injection - issue-triage.yml: Remove Bash tool access (replaced with MCP GitHub tool for label listing), add prompt injection defense instruction - CODEOWNERS: Protect CLAUDE.md, .claude/ skills, agents, and rules from unauthorized modification (poisoned system prompt vector) - security-scan.yml: Pin codeql-action and govulncheck-action to SHA hashes (were using unpinned tag references) - releaser.yml: Disable Go module cache for release builds to prevent cache poisoning attacks - pr-size-labeler.yml: Move expression interpolation to env variable to prevent injection in github-script context - image-build-and-publish.yml: Reduce permissions from contents:write to contents:read (no git write operations are performed) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4034 +/- ##
==========================================
- Coverage 68.62% 68.61% -0.01%
==========================================
Files 444 444
Lines 45222 45222
==========================================
- Hits 31033 31030 -3
- Misses 11790 11793 +3
Partials 2399 2399 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ChrisJBurns
approved these changes
Mar 6, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Security hardening of GitHub Actions workflows based on an audit informed by the Clinejection and hackerbot-claw attack patterns.
Changes by priority
claude.ymlauthor_associationchecks — blocks untrusted users (NONE, FIRST_TIMER, FIRST_TIME_CONTRIBUTOR) from invoking the AI agentissue-triage.ymlBash(gh label list)tool access, add prompt injection defense instructionclaude.ymlallowed_tools— scopes Bash totask,go,git,helm-docsonlyCODEOWNERSCLAUDE.md,.claude/(skills, agents, rules) from unauthorized modificationsecurity-scan.ymlcodeql-actionandgovulncheck-actionto SHA hashesreleaser.ymlpr-size-labeler.yml${{ }}interpolation toenv:variable ingithub-scriptimage-build-and-publish.ymlcontents: writetocontents: readAttack vectors mitigated
@claudeor influence the triage bot to execute unintended actionsCLAUDE.mdand.claude/now require CODEOWNERS reviewNot addressed (separate effort)
releaser.yml— re-enabling requires additional configuration workTest plan
claude.ymlstill triggers for MEMBER/OWNER/COLLABORATOR comments containing@claudeclaude.ymldoes NOT trigger for comments from users with no associationissue-triage.ymlcan still list labels viamcp__github__list_labelsecurity-scan.ymlstill uploads SARIF results with pinned actioncontents: readpermissions🤖 Generated with Claude Code