Skip to content

fix: pin agent-shield reusable workflow to SHA#132

Open
don-petry wants to merge 3 commits intomainfrom
claude/issue-104-20260414-1421
Open

fix: pin agent-shield reusable workflow to SHA#132
don-petry wants to merge 3 commits intomainfrom
claude/issue-104-20260414-1421

Conversation

@don-petry
Copy link
Copy Markdown
Contributor

Summary

  • Pins uses: petry-projects/.github/.github/workflows/agent-shield-reusable.yml@v1 to its commit SHA (208ec2d69b75227d375edf8745d84fbac05a76b2)
  • Adds # v1 comment for human readability per the org action-pinning policy

Compliance

Resolves the compliance finding from the weekly audit: unpinned-actions-agent-shield.yml.

Standard: standards/ci-standards.md#action-pinning-policy

SHA was looked up via:

gh api repos/petry-projects/.github/git/refs/tags/v1 --jq '.object.sha'
# → 208ec2d69b75227d375edf8745d84fbac05a76b2

Closes #104

Generated with Claude Code

Pin uses: petry-projects/.github/.github/workflows/agent-shield-reusable.yml
from @v1 to @208ec2d69b75227d375edf8745d84fbac05a76b2 (v1) to comply with
the org action-pinning policy in standards/ci-standards.md.

Closes #104

Co-authored-by: don-petry <don-petry@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 14, 2026 14:23
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 14, 2026

Warning

Rate limit exceeded

@Claude has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 58 minutes and 55 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 58 minutes and 55 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ed1c286a-3d93-4b78-b1d7-0685a3cbdc2b

📥 Commits

Reviewing files that changed from the base of the PR and between f625cad and fee3ae1.

📒 Files selected for processing (2)
  • .github/workflows/agent-shield.yml
  • standards/workflows/agent-shield.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-104-20260414-1421

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Pins the repository’s AgentShield caller workflow to a specific commit SHA to comply with the org’s GitHub Actions pinning policy and resolve the reported compliance finding.

Changes:

  • Replaces the reusable workflow reference from @v1 to a full commit SHA.
  • Adds a # v1 inline comment for human-readable version context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

jobs:
agent-shield:
uses: petry-projects/.github/.github/workflows/agent-shield-reusable.yml@v1
uses: petry-projects/.github/.github/workflows/agent-shield-reusable.yml@208ec2d69b75227d375edf8745d84fbac05a76b2 # v1
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file’s header says the source of truth is standards/workflows/agent-shield.yml, but after this change the two files will drift (standards/workflows/agent-shield.yml still uses @v1). To avoid reintroducing noncompliant templates for downstream repos (and to keep the “source of truth” statement accurate), please update the standards template to the same SHA+# v1 comment (or adjust the header if the template is intentionally different).

Copilot uses AI. Check for mistakes.
@don-petry
Copy link
Copy Markdown
Contributor Author

Automated review — APPROVED

Risk: LOW
Reviewed commit: d1dd76517ffdc864b41f13fb1083a3228d805770
Cascade: triage(haiku) → sonnet

Note: Automated approval could not be recorded as a formal review (GitHub prevents self-approval). Review verdict: APPROVE.

Summary

This PR pins a reusable workflow reference from a mutable tag (@v1) to a pinned SHA per the org's action-pinning policy, resolving compliance issue #104. All CI checks pass (Lint, ShellCheck, CodeQL, SonarCloud, Agent Security Scan). The change is a net security improvement with no risk signals beyond a minor SHA-verification caveat.

Findings

Minor

  • ⚠️ .github/workflows/agent-shield.yml:33sha-verification: The SHA was looked up via gh api .../git/refs/tags/v1 --jq '.object.sha'. For annotated tags, this returns the tag-object SHA, not the commit SHA — GitHub Actions requires the commit SHA for uses: pinning. For lightweight tags the command is correct. If v1 is an annotated tag, the pin may silently resolve incorrectly. No runtime failure is visible in CI because the reusable workflow is not exercised in this PR's test suite. Recommend verifying with: gh api repos/petry-projects/.github/git/ref/tags/v1 --jq '.object | if .type == "commit" then .sha else "annotated-tag: dereference needed" end'

Info

  • triage: Triage was escalated due to invalid output (triage-output-invalid), not because of actual risk signals in the diff. This is a routine compliance fix.
  • merge-status: Branch is behind main (mergeStateStatus: BEHIND). A rebase or merge commit is needed before merging, but this does not affect correctness of the change.

CI status

All CI checks pass: Lint, ShellCheck, CodeQL, SonarCloud, Agent Security Scan.


Reviewed by the don-petry PR-review cascade (triage: haiku 4.5 → deep: sonnet 4.6 → audit: opus 4.6). Reply with @don-petry if you need a human.

@don-petry don-petry enabled auto-merge (squash) April 15, 2026 23:21
@don-petry
Copy link
Copy Markdown
Contributor Author

@claude[agent] - Address the open comments. Ensure the standard is also updated with the SHA pinning as part of this PR.

@Claude Claude AI force-pushed the claude/issue-104-20260414-1421 branch from 9a26863 to fee3ae1 Compare April 16, 2026 01:02
@Claude
Copy link
Copy Markdown

Claude AI commented Apr 16, 2026

@claude[agent] - Address the open comments. Ensure the standard is also updated with the SHA pinning as part of this PR.

Updated standards/workflows/agent-shield.yml to pin the reusable workflow to the same SHA (@208ec2d69b75227d375edf8745d84fbac05a76b2) with the # v1 comment. Both files now match.

Commit: fee3ae1

@don-petry
Copy link
Copy Markdown
Contributor Author

Automated review — APPROVED

Risk: LOW
Reviewed commit: fee3ae1715b4852df6000915d6d0a474f8bd1e36
Cascade: triage → deep (see triage: haiku 4.5 → deep: sonnet 4.6 + duck: gpt-5.4 → audit: opus 4.6 for models)

Note: Review posted as comment — GitHub does not permit self-approval on this PR.

Summary

This PR pins a reusable workflow reference from @v1 to a commit SHA in both the live workflow and the standards template, resolving compliance finding #104. All CI checks pass (CodeQL, CodeRabbit, SonarCloud) and the new commit directly addresses the prior review's request to update the standards file. Triage escalated due to an internal output failure, not actual risk signals.

Findings

Minor

  • [minor] .github/workflows/agent-shield.yml:33 — The SHA 208ec2d69b75227d375edf8745d84fbac05a76b2 was obtained via gh api .../git/refs/tags/v1 --jq .object.sha. For annotated tags this returns the tag-object SHA, not the commit SHA; GitHub Actions pinning requires the commit SHA. For lightweight tags the command is correct. CI passes and no runtime failure is observed, suggesting the tag is lightweight or the SHA is correct. To verify definitively: gh api repos/petry-projects/.github/git/ref/tags/v1 --jq '.object | if .type == "commit" then "OK: " + .sha else "annotated-tag: dereference needed" end'

Info

  • [info] Triage escalated with signal triage-output-invalid — this reflects a triage process failure, not a risk in the diff. The actual change is a 2-line compliance fix.
  • [info] standards/workflows/agent-shield.yml:33 — The new commit (fee3ae1) correctly mirrors the SHA pin in standards/workflows/agent-shield.yml, keeping the live workflow and its template in sync. This fully addresses the prior review feedback.
  • [info] All CI checks passed: CodeQL (SUCCESS), CodeRabbit (SUCCESS), SonarCloud Quality Gate (PASSED, 0 new issues, 0 security hotspots).

CI status

All CI checks passed: CodeQL (SUCCESS), CodeRabbit (SUCCESS), SonarCloud Quality Gate (PASSED, 0 new issues, 0 security hotspots).


Reviewed by the don-petry PR-review cascade (triage: haiku 4.5 → deep: sonnet 4.6 + duck: gpt-5.4 → audit: opus 4.6). Reply with @don-petry if you need a human.

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

Auto-rebase failed — merge conflict — this branch has conflicts with main that must be resolved manually.

Please resolve the conflicts and push:

git fetch origin
git merge origin/main
# resolve conflicts, then:
git add .
git commit
git push

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.

Compliance: unpinned-actions-agent-shield.yml

3 participants