Skip to content

Compliance: missing-agent-shield.yml #57

Closed

Description

@don-petry

Compliance Finding

Category: ci-workflows
Severity: error
Check: missing-agent-shield.yml

Detail

Required workflow agent-shield.yml is missing

Standard Reference

standards/ci-standards.md#required-workflows

Remediation

Please review the linked standard and bring this repository into compliance.

See the full standards documentation for implementation guidance.


This issue was automatically created by the weekly compliance audit.

Activity

  1. claude commented on Apr 6, 2026

    @claude

    Claude finished @don-petry's task in 3m 57s —— View job


    Compliance Fix: missing-agent-shield.yml

    • Gather context and analyze issue
    • Check existing workflows in the repository
    • Attempt to fetch CI standards documentation

    Result

    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.

    What you need to do

    1. Check the standard at standards/ci-standards.md#required-workflows for the exact agent-shield.yml template/requirements.

    2. Create .github/workflows/agent-shield.yml manually in this repository following the standard.

    3. 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 assistant
    • dependency-audit.yml — Dependency vulnerability scanning
    • codeql.yml — Code security analysis
    • sonarcloud.yml — Code quality analysis
    • dependabot-automerge.yml — Automated dependency merges

    Once agent-shield.yml is added, the compliance audit should pass on the next run.

  2. don-petry commented on Apr 6, 2026

    @don-petry
    ContributorAuthor

    Weekly Compliance Audit (2026-04-06)

    This finding is still open.

    Detail: Required workflow agent-shield.yml is missing

    Standard: standards/ci-standards.md#required-workflows

  3. don-petry commented on Apr 6, 2026

    @don-petry
    ContributorAuthor

    Weekly Compliance Audit (2026-04-06)

    This finding is still open.

    Detail: Required workflow agent-shield.yml is missing

    Standard: standards/ci-standards.md#required-workflows

  4. don-petry commented on Apr 6, 2026

    @don-petry
    ContributorAuthor

    Weekly Compliance Audit (2026-04-06)

    This finding is still open.

    Detail: Required workflow agent-shield.yml is missing

    Standard: standards/ci-standards.md#required-workflows

  5. don-petry commented on Apr 6, 2026

    @don-petry
    ContributorAuthor

    Weekly Compliance Audit (2026-04-06)

    This finding is still open.

    Detail: Required workflow agent-shield.yml is missing

    Standard: standards/ci-standards.md#required-workflows

  6. don-petry commented on Apr 6, 2026

    @don-petry
    ContributorAuthor

    Claude finished @don-petry's task in 4m 29s —— View job


    Compliance Fix: missing-agent-shield.yml

    • Gather context and analyze issue
    • Fetch CI standards and check existing workflow patterns
    • Create agent-shield.yml workflow (thin caller → org reusable, matching claude.yml pattern)
    • Attempt push — blocked by GitHub App permissions

    Result

    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-workflows
    name: Agent Shield
    
    on:
      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@main
        secrets: inherit
        permissions:
          contents: read
          pull-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):

    1. Go to Settings → GitHub Apps → Claude Code → Permissions
    2. Grant the workflows (read & write) permission
    3. 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.

    See the FAQ for more details on this limitation.

  7. don-petry commented on Apr 7, 2026

    @don-petry
    ContributorAuthor

    Claude finished @don-petry's task in 1m 31s —— View job


    Compliance Fix: missing-agent-shield.yml

    • Gather context and analyze issue
    • Fetch CI standards documentation (used existing claude.yml as pattern reference)
    • Create agent-shield.yml workflow
    • Commit created — push blocked by GitHub App permissions (see below)

    Result

    I created .github/workflows/agent-shield.yml following the same thin-caller pattern as claude.yml, but the push was rejected:

    refusing to allow a GitHub App to create or update workflow .github/workflows/agent-shield.yml without workflows permission

    File content to create manually:

    # 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-workflows
    name: Agent Shield
    
    on:
      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@main
        secrets: inherit
        permissions:
          contents: read
          pull-requests: read

    To resolve

    Option 1 — Grant workflows permission to Claude Code (recommended):

    1. Go to Settings → GitHub Apps → Claude Code → Permissions
    2. Grant the workflows (read & write) permission
    3. 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 above and commit it directly to main or via a PR.

    See the FAQ for more details on this limitation.

  8. don-petry commented on Apr 7, 2026

    @don-petry
    ContributorAuthor

    Claude finished @don-petry's task in 3s —— View job • claude/issue-57-20260407-1732 • Create PR ➔


    Compliance Fix: missing-agent-shield.yml

    • Gather context and check existing workflows
    • Fetch CI standards to confirm workflow content
    • Create agent-shield.yml workflow file (thin caller → org reusable, matching claude.yml pattern)
    • Commit and push changes
    • Create PR — feat: add agent-shield.yml compliance workflow #74
    • Self-review: file looks correct — permissions: {} at top, minimal job-level scopes, delegates to org reusable
    • Tag @don-petry (CODEOWNERS) on the PR for review and merge

    Result

    .github/workflows/agent-shield.yml has been created and a PR is open at #74. Once merged to main, the next compliance audit should pass.

    |

  9. added a commit that references this issue on Apr 7, 2026
    df954d1
  10. don-petry commented on Apr 8, 2026

    @don-petry
    ContributorAuthor

    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

    • Gather context and analyze issue
    • Fetch agent-shield.yml template from org standards
    • Create .github/workflows/agent-shield.yml
    • Commit and push changes
    • Create PR — feat: add agent-shield.yml compliance workflow #81
    • 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

  11. added a commit that references this issue on Apr 8, 2026
    6164530
  12. added a commit that references this issue on Apr 8, 2026
    a8fd8b8
  13. added a commit that references this issue on Jun 19, 2026
    f7f6749
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    compliance-auditAutomated compliance audit finding

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions