Skip to content

🔒 Security: Critical Prompt Injection in Claude Code GitHub Action#39

Merged
AmberLJC merged 1 commit intoOrchestra-Research:mainfrom
tang-vu:contribai/fix/security/critical-prompt-injection-in-claude-code
Mar 20, 2026
Merged

🔒 Security: Critical Prompt Injection in Claude Code GitHub Action#39
AmberLJC merged 1 commit intoOrchestra-Research:mainfrom
tang-vu:contribai/fix/security/critical-prompt-injection-in-claude-code

Conversation

@tang-vu
Copy link
Copy Markdown
Contributor

@tang-vu tang-vu commented Mar 18, 2026

Closes #38

🔒 Security Fix

Problem

The claude.yml workflow triggers on any issue comment, pull request review comment, or issue creation containing the text @claude. It then runs the anthropics/claude-code-action with elevated repository permissions (contents: write, pull-requests: write, issues: write).

Because there is no authorization check to verify who created the comment or issue, any external user (even unauthenticated to the organization) can open an issue on the public repository and instruct the Claude agent to execute arbitrary code, modify repository contents, push malicious commits to the default branch, or exfiltrate secrets (like CLAUDE_CODE_OAUTH_TOKEN). This allows complete compromise of the repository.

Severity: critical
File: .github/workflows/claude.yml

Solution

The claude.yml workflow triggers on any issue comment, pull request review comment, or issue creation containing the text @claude. It then runs the anthropics/claude-code-action with elevated repository permissions (contents: write, pull-requests: write, issues: write).

Because there is no authorization check to verify who created the comment or issue, any external user (even unauthenticated to the organization) can open an issue on the public repository and instruct the Claude agent to execute arbitrary code, modify repository contents, push malicious commits to the default branch, or exfiltrate secrets (like CLAUDE_CODE_OAUTH_TOKEN). This allows complete compromise of the repository.

Changes

  • .github/workflows/claude.yml (modified)

Testing

  • Existing tests pass
  • Manual review completed
  • No new warnings/errors introduced


🤖 About this PR

This pull request was generated by ContribAI, an AI agent
that helps improve open source projects. The change was:

  1. Discovered by automated code analysis
  2. Generated by AI with context-aware code generation
  3. Self-reviewed by AI quality checks

If you have questions or feedback about this PR, please comment below.
We appreciate your time reviewing this contribution!

The `claude.yml` workflow triggers on any issue comment, pull request review comment, or issue creation containing the text `@claude`. It then runs the `anthropics/claude-code-action` with elevated repository permissions (`contents: write`, `pull-requests: write`, `issues: write`). 

Because there is no authorization check to verify who created the comment or issue, any external user (even unauthenticated to the organization) can open an issue on the public repository and instruct the Claude agent to execute arbitrary code, modify repository contents, push malicious commits to the default branch, or exfiltrate secrets (like `CLAUDE_CODE_OAUTH_TOKEN`). This allows complete compromise of the repository.


Affected files: claude.yml
@AmberLJC AmberLJC merged commit e839f60 into Orchestra-Research:main Mar 20, 2026
@AmberLJC
Copy link
Copy Markdown
Collaborator

Good catch! Thanks @tang-vu

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.

fix: critical prompt injection in claude code github action

2 participants