chore: update docker-agent-action to v2.0.5 - #3433
Conversation
docker-agent
left a comment
There was a problem hiding this comment.
Assessment: 🟡 NEEDS ATTENTION
This PR bumps docker/docker-agent-action from v2.0.2 to v2.0.5 (commit-SHA pinned, correct approach) and escalates the actions permission from read to write. Two security findings are flagged — the permission escalation is the primary concern.
| checks: write # (Optional) Show review progress as a check run | ||
| id-token: write # Required for OIDC authentication to AWS Secrets Manager | ||
| actions: read # Download artifacts from trigger workflow | ||
| actions: write # Download artifacts from trigger workflow |
There was a problem hiding this comment.
[medium/security] actions: write is broader than needed — artifact download only requires actions: read
This PR changes actions: read to actions: write on the review job, with the comment "Download artifacts from trigger workflow". However, downloading artifacts is a read operation — actions: read is sufficient for gh run download and actions/download-artifact.
actions: write additionally grants the ability to cancel, re-run, create, and delete workflow runs and artifacts across the repository. Since this is a reusable workflow caller, the permissions declared here form the ceiling for the callee (docker/docker-agent-action). There is no evidence in the diff that v2.0.5 genuinely requires write access — the comment still says "Download artifacts from trigger workflow", which is a read operation.
If the callee workflow truly requires actions: write (e.g. to delete artifacts after processing), this should be confirmed against the v2.0.5 release notes before merging. If not confirmed, consider reverting to actions: read to follow the principle of least privilege.
| actions: write # Download artifacts from trigger workflow | |
| actions: read # Download artifacts from trigger workflow |
| Confidence | Score |
|---|---|
| 🟡 moderate | 67/100 |
| jobs: | ||
| review: | ||
| uses: docker/docker-agent-action/.github/workflows/review-pr.yml@774b6e0e60d6c648b0f2dc43bd5221377a0a7420 # v2.0.2 | ||
| uses: docker/docker-agent-action/.github/workflows/review-pr.yml@06e1767af06263c93d712449cbf859778d9392ee # v2.0.5 |
There was a problem hiding this comment.
[low/security] Commit SHA should be independently verified against the v2.0.5 tag
The action reference is correctly pinned to a commit SHA (06e1767af06263c93d712449cbf859778d9392ee) rather than a mutable tag — this is the right approach for supply-chain security. However, the SHA itself cannot be verified from the diff alone. An incorrect or mismatched SHA could point to an arbitrary commit rather than the intended v2.0.5 release.
Since this is an auto-generated PR from the release workflow, the SHA is typically machine-verified. Before merging, confirm that 06e1767af06263c93d712449cbf859778d9392ee corresponds to the v2.0.5 tag in docker/docker-agent-action:
gh api repos/docker/docker-agent-action/git/ref/tags/v2.0.5
| Confidence | Score |
|---|---|
| 🟠 weak | 43/100 |
Summary
Updates
docker-agent-actionreference in.github/workflows/pr-review.ymlto v2.0.5.06e1767af06263c93d712449cbf859778d9392eev2.0.5Also raises the caller
permissions:grants that v2.0.5 requires (a caller granting less fails GitHub's workflow validation at startup):actions:read→write(job:review)