Skip to content
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

Bias future-year-proofing for the most recent year #1941

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deployment/clouddeploy/gke-workers/base/nvd-cve-osv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ spec:
env:
- name: WORK_DIR
value: /tmp
- name: IN_SCOPE_YEARS
value: "2023 2022 2021 2020 2019 2018 2017 2016"
- name: FIRST_INSCOPE_YEAR
value: "2016"
restartPolicy: OnFailure
volumes:
- name: "ssd"
Expand Down
5 changes: 1 addition & 4 deletions vulnfeeds/cmd/nvd-cve-osv/run_cve_to_osv_generation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ gcloud --no-user-output-enabled storage -q cp "${NVD_GCS_PATH}/*-????.json" "${W
echo "Downloading latest CPE Git repository map"
gcloud --no-user-output-enabled storage -q cp "${CPEREPO_GCS_PATH}" "${WORK_DIR}"

# Dirty hack to get around https://stackoverflow.com/questions/68528541/env-variable-array
# https://stackoverflow.com/questions/9293887/reading-a-space-delimited-string-into-an-array-in-bash/9294015
IN_SCOPE_YEARS=($IN_SCOPE_YEARS)
for (( YEAR = 2002 ; YEAR <= $(date +%Y) ; YEAR++ )); do
for (( YEAR = $(date +%Y) ; YEAR >= ${FIRST_INSCOPE_YEAR} ; YEAR-- )); do
# Run OSV record generation.
echo "Converting NVD CVE records from ${YEAR} to OSV"
/usr/local/bin/nvd-cve-osv \
Expand Down
Loading