-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
chore: enhance vuln monitor #8570
chore: enhance vuln monitor #8570
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8570 +/- ##
==========================================
- Coverage 70.48% 64.32% -6.16%
==========================================
Files 515 607 +92
Lines 23150 30421 +7271
==========================================
+ Hits 16317 19568 +3251
- Misses 5776 9387 +3611
- Partials 1057 1466 +409
... and 385 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
deploy/vuln-monitor/scan.sh
Outdated
|
||
set -xeo pipefail | ||
# Variables that will be substituted by trigger configuration or valued provided through command line with --substitutions flag. | ||
if [ -z "$_TAG_FILTER" ]; then |
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.
Is the _TAG_FILTER
variable used? Might make sense to delete it if not
deploy/vuln-monitor/scan.sh
Outdated
# We should only scan lts images within 1 year window from the first patch of the release. | ||
targeted_base_tags="$(gcloud container images list-tags "$base_image" --filter="timestamp.datetime > -P1Y AND tags~v.*\.1-lts" --format='value(tags)')" | ||
for line in $targeted_base_tags; do | ||
IFS=',' read -ra t <<< "${line}" |
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.
nit: the other IFS call uses double quotes (","
), might make sense to use consistent style
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!
Related: #8503
Description
one year
.Test Plan
test-bin-scanning
build trigger in skaffold project, I tested this morning and related vuls were already created by myrun
, you can close some of those issues and trigger the build to see the result, this should work as the description.Monitor Frenquency
/deploy/cloudbuild
anddeploy/cloudbuild-release-lts
.