Support Trivy source code scans #466
cjnosal
started this conversation in
Development
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The starboard operator currently watches pods to trigger a scan. In some cases it's desirable to scan an artifact before the code is deployed and running.
A new SourceReference CRD could be defined:
A new controller would then trigger a scan when a new SourceReference instance is created. The initial implementation could rely on the operator to update the CRD when a new commit is pushed.
The functionality could be extended to support polling the repo for new tags or commits on a branch if neither is specified. This may require a status field for the reconciler to capture what was scanned:
The implementation could largely reuse the logic of VulnerabilityReportReconciler.reconcilePods (read the artifact reference, check ownership, check for existing VulnerabilityReport/Job, check throttling, submit the scan). Changed would be needed in a few areas:
trivy repo
with appropriate parametersBeta Was this translation helpful? Give feedback.
All reactions