-
Notifications
You must be signed in to change notification settings - Fork 234
chores: Add Trivy Scanner GH Workflow #187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds a new GitHub Actions workflow Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer
participant GH as GitHub
participant Runner as Actions Runner
participant Repo as Repository
participant Trivy as Trivy Action
Dev->>GH: Open or synchronize PR to branch matching "*.*"
GH->>Runner: Trigger "Vulnerability Scan" workflow
Runner->>Repo: actions/checkout
Runner->>Trivy: Run aquasecurity/trivy-action (mode: repo, path: ./)
Trivy->>Trivy: Scan repository (filter: CRITICAL, HIGH)
alt Vulnerabilities found (CRITICAL/HIGH)
Trivy-->>Runner: exit-code 1 (fail)
Runner-->>GH: Report failed check
else No matching vulnerabilities
Trivy-->>Runner: exit-code 0 (pass)
Runner-->>GH: Report successful check
end
Note over Trivy: Env vars set for Trivy DB and Java DB repositories
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/vuln-scan.yml(1 hunks)
🔇 Additional comments (1)
.github/workflows/vuln-scan.yml (1)
1-30: Well-structured vulnerability scanning workflow.The workflow configuration is sound: it triggers on PRs to appropriate branches (main and stage/*) for opened/synchronized events, uses a modern checkout action, and configures Trivy with reasonable security gates (CRITICAL and HIGH severities, exit on findings, ignore unfixed vulnerabilities). The dual database repository setup provides good resilience.
zinic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Closes: BED-6789
Description
Run vulnerability analysis using Trivy scanner
Motivation and Context
How Has This Been Tested?
Verification via pipeline
Screenshots (if appropriate):
Types of changes
Checklist:
Summary by CodeRabbit