Skip to content

Fix Trivy SARIF upload permissions - #18

Draft
NeonTechno wants to merge 1 commit into
mainfrom
fix/trivy-sarif-upload-2026-10-18
Draft

NeonTechno wants to merge 1 commit into
mainfrom
fix/trivy-sarif-upload-2026-10-18

Conversation

@NeonTechno

@NeonTechno NeonTechno commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Set least-privilege workflow default permissions (contents: read).
  • Grant the Security Scan job security-events: write for SARIF uploads.
  • Upgrade github/codeql-action/upload-sarif from deprecated @v2 to @v3.
  • Skip SARIF publication for fork-originated pull requests, where write permissions are not available, and preserve the SARIF file as an artifact for review.

Evidence

The failing run was https://github.com/Decentralized-Rights-Protocol/Dr-Blockchain/actions/runs/39149801930. Its Trivy step succeeded; the upload step failed with the deprecated v2 action message and Resource not accessible by integration.

This PR changes only .github/workflows/ci.yml. Please keep unmerged until the new Security Scan run verifies the behavior.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

This branch has not been deployed

No deployments
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.

1 participant