ci: pin trivy-action in reusable workflow#11593
Conversation
Signed-off-by: Patrick Stephens <pat@telemetryforge.io>
📝 WalkthroughWalkthroughRemoved two manual container-build GitHub Actions workflows and pinned Trivy action references in existing workflows to specific commit SHAs to avoid using the moving Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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
🤖 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/call-build-images.yaml:
- Line 307: The pinned Trivy Action reference (uses:
aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8) is
vulnerable and relies on deleted upstream artifacts; update the action to a
secure, supported tag such as v0.34.2 or a recent stable tag (e.g., v0.35.0) by
replacing the commit pin with the release tag (uses:
aquasecurity/trivy-action@v0.34.2 or `@v0.35.0`) so the workflow uses the patched
release that fixes CVE-2026-26189 and avoids the supply-chain breakage.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9fb5f3ee-32ac-4cc9-9d8b-c00f685c0139
📒 Files selected for processing (3)
.github/workflows/build-branch-containers.yaml.github/workflows/build-legacy-branch.yaml.github/workflows/call-build-images.yaml
💤 Files with no reviewable changes (2)
- .github/workflows/build-branch-containers.yaml
- .github/workflows/build-legacy-branch.yaml
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fa3e35d342
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: Patrick Stephens <pat@telemetryforge.io>
|
@coderabbitai please review |
|
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
🧹 Nitpick comments (2)
.github/workflows/cron-trivy.yaml (2)
57-57: Update stale inline comment to match the pinned ref.The comment still says
masteris deliberate, but Line 59 is now SHA-pinned. Consider updating it to avoid future confusion during incident response.Suggested comment tweak
- # Deliberately chosen master here to keep up-to-date. + # Pinned to a known-good commit SHA to avoid floating refs.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/cron-trivy.yaml at line 57, The inline comment that reads "Deliberately chosen master here to keep up-to-date." is now inaccurate because the workflow uses a SHA-pinned ref; update that comment to reflect the SHA-pinning (e.g., "Deliberately pinned to a specific SHA to ensure reproducible runs") and ensure it sits immediately adjacent to the SHA-pinned ref in the cron-trivy workflow so future readers understand the intent.
59-59: Immutable action pin correctly applied—good supply-chain hardening.Verification confirms all
aquasecurity/trivy-actionreferences in the repository are now pinned to commit SHAs with no floating refs. However, the inline comment at Line 57 stating "Deliberately chosen master here to keep up-to-date" is stale and should be removed or updated.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/cron-trivy.yaml at line 59, Remove or update the stale inline comment "Deliberately chosen master here to keep up-to-date" that now contradicts the pinned action usage (uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1); either delete the comment or replace it with a brief note explaining that the action is intentionally pinned to a commit SHA for supply-chain security.
🤖 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/cron-trivy.yaml:
- Line 57: The inline comment that reads "Deliberately chosen master here to
keep up-to-date." is now inaccurate because the workflow uses a SHA-pinned ref;
update that comment to reflect the SHA-pinning (e.g., "Deliberately pinned to a
specific SHA to ensure reproducible runs") and ensure it sits immediately
adjacent to the SHA-pinned ref in the cron-trivy workflow so future readers
understand the intent.
- Line 59: Remove or update the stale inline comment "Deliberately chosen master
here to keep up-to-date" that now contradicts the pinned action usage (uses:
aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1); either
delete the comment or replace it with a brief note explaining that the action is
intentionally pinned to a commit SHA for supply-chain security.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 30495290-1b91-4a55-8a9e-2765cf1b5168
📒 Files selected for processing (2)
.github/workflows/call-build-images.yaml.github/workflows/cron-trivy.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/call-build-images.yaml
Resolves #11594 on an issue with trivy-action: https://www.stepsecurity.io/blog/trivy-compromised-a-second-time---malicious-v0-69-4-release by pinning to the same SHA as the cron-trivy workflow.
Investigation shown on #11594, this PR pins the SHA to the same as the regular scan job for now which is not compromised. Related to #11590 as we update to the latest SHA as well for it.
This PR removes the legacy workflows we no longer use for building old branches as well.
Enter
[N/A]in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-testlabel to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.
Summary by CodeRabbit
Release Notes
Chores