Conversation
…ish.yml and publish-release.yml workflows
WalkthroughUpdated multiple GitHub Actions workflows: bumped Trivy action from v0.34.2 to v0.35.0 in two workflows and changed packaging authentication env vars to use Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
🧹 Nitpick comments (2)
.github/workflows/central-publish.yml (1)
38-38: Apply the same SHA pinning strategy here.Line 38 also references Trivy by tag (
@v0.35.0). Please pin this action to the exact commit SHA as well, to keep both publish workflows equally hardened.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/central-publish.yml at line 38, The Trivy Action is referenced by tag ("uses: aquasecurity/trivy-action@v0.35.0") which should be pinned to a specific commit SHA; update that line to use the exact commit SHA (e.g. "uses: aquasecurity/trivy-action@<COMMIT_SHA>") instead of the tag, matching the same SHA pinning approach used in the other publish workflow so both workflows are consistently hardened..github/workflows/publish-release.yml (1)
38-38: Pin the Trivy action to an immutable commit SHA.Line 38 currently uses a mutable tag (
@v0.35.0). For release workflows, prefer pinning to the exact commit digest to reduce supply-chain risk. Semantic version tags can be retagged or updated by maintainers, making commit SHAs more secure.To find the correct commit SHA for v0.35.0, run:
git ls-remote --tags https://github.com/aquasecurity/trivy-action v0.35.0Then update the action reference to use the full commit SHA instead of the version tag.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/publish-release.yml at line 38, Replace the mutable tag reference "uses: aquasecurity/trivy-action@v0.35.0" with the action pinned to the exact commit SHA: run git ls-remote --tags https://github.com/aquasecurity/trivy-action v0.35.0 to get the commit digest and update the uses line to "uses: aquasecurity/trivy-action@<COMMIT_SHA>" so the workflow references the immutable commit instead of the semantic tag.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/central-publish.yml:
- Line 38: The Trivy Action is referenced by tag ("uses:
aquasecurity/trivy-action@v0.35.0") which should be pinned to a specific commit
SHA; update that line to use the exact commit SHA (e.g. "uses:
aquasecurity/trivy-action@<COMMIT_SHA>") instead of the tag, matching the same
SHA pinning approach used in the other publish workflow so both workflows are
consistently hardened.
In @.github/workflows/publish-release.yml:
- Line 38: Replace the mutable tag reference "uses:
aquasecurity/trivy-action@v0.35.0" with the action pinned to the exact commit
SHA: run git ls-remote --tags https://github.com/aquasecurity/trivy-action
v0.35.0 to get the commit digest and update the uses line to "uses:
aquasecurity/trivy-action@<COMMIT_SHA>" so the workflow references the immutable
commit instead of the semantic tag.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7340d09a-cca8-44c3-88ec-06731ac2b4b1
📒 Files selected for processing (2)
.github/workflows/central-publish.yml.github/workflows/publish-release.yml
…age authentication instead of deprecated secrets.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/pull-request.yml:
- Around line 27-33: Replace use of the repository-scoped GITHUB_TOKEN in the
"Build the Package" step by wiring a personal access token (PAT) with
read:packages scope (e.g., secrets.BALLERINA_BOT_TOKEN) into the
packageUser/packagePAT env vars used by the Gradle build; update the same change
in the analogous "windows-build" job so both jobs set packageUser and packagePAT
from the PAT secret instead of github.actor/GITHUB_TOKEN to allow resolving
maven.pkg.github.com/ballerina-platform/* dependencies across organizations.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 80193fcf-facd-4fc9-9974-82fd7d994048
📒 Files selected for processing (2)
.github/workflows/build-with-bal-test-graalvm.yml.github/workflows/pull-request.yml
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
$title
Summary by CodeRabbit