You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm unable to resolve this issue directly due to a GitHub App permission restriction:
I cannot create or modify files in the .github/workflows/ directory. This is a hard limitation of the GitHub App token used by Claude Code. See the FAQ for more details.
I created the workflow file locally following the same thin-caller pattern as claude.yml:
# Agent Shield — thin caller that delegates to the org-level reusable workflow.# All logic is maintained centrally in agent-shield-reusable.yml.# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md#required-workflowsname: Agent Shieldon:
pull_request:
branches: [main]types: [opened, reopened, synchronize]push:
branches: [main]permissions: {}jobs:
agent-shield:
uses: petry-projects/.github/.github/workflows/agent-shield-reusable.yml@mainsecrets: inheritpermissions:
contents: readpull-requests: read
However, the push was rejected:
refusing to allow a GitHub App to create or update workflow .github/workflows/agent-shield.yml without workflows permission
This is a GitHub security restriction — Claude Code's GitHub App token does not have the workflows scope, so it cannot create or modify files in .github/workflows/.
What you need to do
Option 1 — Grant workflows permission to Claude Code (recommended):
Go to Settings → GitHub Apps → Claude Code → Permissions
Grant the workflows (read & write) permission
Re-trigger Claude by adding the claude label to this issue
Option 2 — Create the file manually:
Create .github/workflows/agent-shield.yml with the content shown above and commit it directly to main or via a PR.
Self-review PR — file is verbatim copy of org template, no issues
Tag CODEOWNERS for review — @don-petry tagged on the PR
Result
.github/workflows/agent-shield.yml has been created (verbatim copy of petry-projects/.github/standards/workflows/agent-shield.yml) and PR #81 is open. Once merged to main, the next compliance audit should pass.
• claude/issue-57-20260408-2243
Activity
claude commentedon Apr 6, 2026
Claude finished @don-petry's task in 3m 57s —— View job
Compliance Fix: missing-agent-shield.yml
Result
I'm unable to resolve this issue directly due to a GitHub App permission restriction:
What you need to do
Check the standard at standards/ci-standards.md#required-workflows for the exact
agent-shield.ymltemplate/requirements.Create
.github/workflows/agent-shield.ymlmanually in this repository following the standard.If the org provides a workflow template, it may be available in the petry-projects/.github workflow-templates directory.
Existing workflows (for reference)
The repo currently has:
claude.yml— Claude Code AI assistantdependency-audit.yml— Dependency vulnerability scanningcodeql.yml— Code security analysissonarcloud.yml— Code quality analysisdependabot-automerge.yml— Automated dependency mergesOnce
agent-shield.ymlis added, the compliance audit should pass on the next run.don-petry commentedon Apr 6, 2026
Weekly Compliance Audit (2026-04-06)
This finding is still open.
Detail: Required workflow
agent-shield.ymlis missingStandard: standards/ci-standards.md#required-workflows
don-petry commentedon Apr 6, 2026
Weekly Compliance Audit (2026-04-06)
This finding is still open.
Detail: Required workflow
agent-shield.ymlis missingStandard: standards/ci-standards.md#required-workflows
don-petry commentedon Apr 6, 2026
Weekly Compliance Audit (2026-04-06)
This finding is still open.
Detail: Required workflow
agent-shield.ymlis missingStandard: standards/ci-standards.md#required-workflows
don-petry commentedon Apr 6, 2026
Weekly Compliance Audit (2026-04-06)
This finding is still open.
Detail: Required workflow
agent-shield.ymlis missingStandard: standards/ci-standards.md#required-workflows
don-petry commentedon Apr 6, 2026
Claude finished @don-petry's task in 4m 29s —— View job
Compliance Fix: missing-agent-shield.yml
agent-shield.ymlworkflow (thin caller → org reusable, matchingclaude.ymlpattern)Result
I created the workflow file locally following the same thin-caller pattern as
claude.yml:However, the push was rejected:
This is a GitHub security restriction — Claude Code's GitHub App token does not have the
workflowsscope, so it cannot create or modify files in.github/workflows/.What you need to do
Option 1 — Grant workflows permission to Claude Code (recommended):
workflows(read & write) permissionclaudelabel to this issueOption 2 — Create the file manually:
Create
.github/workflows/agent-shield.ymlwith the content shown above and commit it directly tomainor via a PR.See the FAQ for more details on this limitation.
don-petry commentedon Apr 7, 2026
Claude finished @don-petry's task in 1m 31s —— View job
Compliance Fix: missing-agent-shield.yml
claude.ymlas pattern reference)agent-shield.ymlworkflowResult
I created
.github/workflows/agent-shield.ymlfollowing the same thin-caller pattern asclaude.yml, but the push was rejected:File content to create manually:
To resolve
Option 1 — Grant workflows permission to Claude Code (recommended):
workflows(read & write) permissionclaudelabel to this issueOption 2 — Create the file manually:
Create
.github/workflows/agent-shield.ymlwith the content above and commit it directly tomainor via a PR.See the FAQ for more details on this limitation.
don-petry commentedon Apr 7, 2026
Claude finished @don-petry's task in 3s —— View job •
claude/issue-57-20260407-1732• Create PR ➔Compliance Fix: missing-agent-shield.yml
agent-shield.ymlworkflow file (thin caller → org reusable, matchingclaude.ymlpattern)permissions: {}at top, minimal job-level scopes, delegates to org reusableResult
.github/workflows/agent-shield.ymlhas been created and a PR is open at #74. Once merged tomain, the next compliance audit should pass.|
feat: add agent-shield.yml compliance workflow
don-petry commentedon Apr 8, 2026
Claude finished @don-petry's task in 1m 7s —— View job •
claude/issue-57-20260408-2243• [Create PR ➔](https://github.com/petry-projects/markets/compare/main...claude/issue-57-20260408-2243?quick_pull=1&title=Issue%20%2357%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%2357%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)Compliance Fix: missing-agent-shield.yml
agent-shield.ymltemplate from org standards.github/workflows/agent-shield.ymlResult
.github/workflows/agent-shield.ymlhas been created (verbatim copy ofpetry-projects/.github/standards/workflows/agent-shield.yml) and PR #81 is open. Once merged tomain, the next compliance audit should pass.•
claude/issue-57-20260408-2243feat: add agent-shield.yml compliance workflow
feat: add agent-shield.yml compliance workflow (#81)
feat: add agent-shield.yml compliance workflow (#81)