github/sonar: Update to use sonar hash ref#162
Conversation
WalkthroughThis pull request updates the Sonar GitHub Actions workflow (.github/workflows/sonar.yaml) to replace semantic version tags with pinned commit SHAs for action references: Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/sonar.yaml(2 hunks)
🔇 Additional comments (3)
.github/workflows/sonar.yaml (3)
17-31: Commend the shift to commit SHA pinning for improved security.Replacing semantic version tags (@v4, @v5, etc.) with immutable commit SHAs is an effective security hardening measure. This mitigates risks from tag reassignment or tampering whilst the inline version comments preserve maintainability. The changes appear consistent across all three action references in the workflow.
17-17: Commit SHAs are properly pinned for security hardening.The pinned commit SHAs for all three actions have been verified as valid and existing in their respective repositories:
actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332(v4.1.7)actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32(v5.0.2)SonarSource/sonarqube-scan-action@884b79409bbd464b2a59edc326a4b77dc56b2195(v5.1.0)This approach follows GitHub Actions security best practice by using immutable commit SHAs instead of mutable version tags, preventing potential tampering or accidental tag rewrites.
20-20: The commit SHA0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32correctly corresponds to the version tagv5.0.2in the actions/setup-go repository. The pin is accurate.
|



Update to deal with sonar security complaint