feat(ci): add required agent-shield.yml workflow#146
Conversation
Adds the missing Agent Shield workflow as a thin caller delegating to the org-level reusable workflow, following the same pattern as claude.yml. Closes #122 Co-authored-by: don-petry <don-petry@users.noreply.github.com>
📝 WalkthroughWalkthroughA new GitHub Actions workflow file Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
There was a problem hiding this comment.
Pull request overview
Adds the missing org-required “Agent Shield” GitHub Actions workflow as a thin-caller, aligning this repo with the CI standards referenced in issue #122.
Changes:
- Introduces
.github/workflows/agent-shield.ymlto satisfy the required-workflows compliance check. - Configures the workflow to delegate execution to
petry-projects/.github/.github/workflows/agent-shield-reusable.yml@main. - Enables triggers for PR events, issue/PR comments, and issue events.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/agent-shield.yml (1)
21-21: Pin reusable workflow to a full commit SHA instead of a branch.Using
@mainis mutable and can change unexpectedly. GitHub's documentation and security guidance recommend pinning to a full commit SHA for immutability and safety—this prevents branch references from being moved to point to unintended code, including after a repository compromise. The tradeoff is that you'll need to actively update pins to receive fixes; Dependabot can help automate this.🔧 Suggested hardening change
- uses: petry-projects/.github/.github/workflows/agent-shield-reusable.yml@main + uses: petry-projects/.github/.github/workflows/agent-shield-reusable.yml@<full_commit_sha>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/agent-shield.yml at line 21, The workflow currently references the reusable workflow using a mutable branch ref ("uses: petry-projects/.github/.github/workflows/agent-shield-reusable.yml@main"); change this to pin the reusable workflow to a specific full commit SHA (e.g., replace "@main" with "@<full-commit-sha>") so the action is immutable and auditable. Locate the "uses" line in .github/workflows/agent-shield.yml and update it to reference the exact commit SHA of the petry-projects repository (you can obtain the SHA from the upstream repo's commit history), and consider adding a comment reminding maintainers to update the SHA via Dependabot or a manual bump when you want upstream fixes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/agent-shield.yml:
- Line 21: The workflow currently references the reusable workflow using a
mutable branch ref ("uses:
petry-projects/.github/.github/workflows/agent-shield-reusable.yml@main");
change this to pin the reusable workflow to a specific full commit SHA (e.g.,
replace "@main" with "@<full-commit-sha>") so the action is immutable and
auditable. Locate the "uses" line in .github/workflows/agent-shield.yml and
update it to reference the exact commit SHA of the petry-projects repository
(you can obtain the SHA from the upstream repo's commit history), and consider
adding a comment reminding maintainers to update the SHA via Dependabot or a
manual bump when you want upstream fixes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4778a65a-f40a-4f92-8bef-c203172e230a
📒 Files selected for processing (1)
.github/workflows/agent-shield.yml
CI Status ReviewMost checks are passing. Two failures are noted:
The core required checks all pass:
@don-petry — This PR addresses the compliance finding in #122 by adding the required |


Summary
agent-shield.ymlworkflow required by the org CI standardsclaude.yml), delegating all logic topetry-projects/.github/.github/workflows/agent-shield-reusable.yml@mainCloses #122
Generated with Claude Code
Summary by CodeRabbit