Skip to content

fix(ci): check out PR head sha in Trivy scan job - #2892

Merged
DerekRoberts merged 1 commit into
mainfrom
fix/trivy-checkout-pr-head
Oct 13, 2026
Merged

DerekRoberts merged 1 commit into
mainfrom
fix/trivy-checkout-pr-head

Conversation

@DerekRoberts

Copy link
Copy Markdown
Member

Follow-up to #2891. On pull_request runs the Trivy job's existing actions/checkout checked out the merge commit, while the SARIF upload attributes results to the PR head sha. This sets ref: ${{ github.event.pull_request.head.sha || '' }} on that existing checkout step, so PR scans match the attributed sha. Push, schedule and dispatch runs are unchanged (empty ref = default). No new checkout step.

@DerekRoberts
DerekRoberts marked this pull request as ready for review October 13, 2026 21:09
Copilot AI balanced review requested due to automatic review settings October 13, 2026 21:09
@DerekRoberts DerekRoberts moved this from New to Active in DevOps (NR) Oct 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@DerekRoberts DerekRoberts self-assigned this Oct 13, 2026
@DerekRoberts
DerekRoberts merged commit 0ae772e into main Oct 13, 2026
26 checks passed
@DerekRoberts
DerekRoberts deleted the fix/trivy-checkout-pr-head branch October 13, 2026 21:20
@github-project-automation github-project-automation Bot moved this from Active to Done in DevOps (NR) Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants