Repository navigation
fix(docker): add local image scanning for Trivy when not pushing to registry - #14
Conversation
…egistry Previously, Trivy scanning would fail when images weren't pushed to a registry because it tried to reference a non-existent remote image. This change: - Exports local images to a tarball when push is disabled - Uses Trivy's `input` parameter to scan the local tarball - Keeps registry-based scanning for pushed images Fixes scanning failures in PR builds and local testing scenarios. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThe pull request refactors Trivy scanning in the Docker workflow by replacing a single scan step with a conditional three-step sequence. It now exports local images to a tarball for scanning when images aren't pushed to a registry, while maintaining separate logic for registry-based scans. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (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 |
Summary
Problem
Previously, Trivy scanning would fail when
pushwas disabled because it tried to reference a non-existent remote image usingimage-ref. This caused scan failures in:Solution
/tmp/image.tarwhen push is disabledinputparameter to scan the local tarballTest plan
push: false- should export and scan local imagepush: true- should scan registry image as before🤖 Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.