Skip to content

Commit c938a66

Browse files
Make the copying more resilient (#2029)
Some filenames wind up with an embedded quote character or are very long due to the CPE vendor/product name and this seemed to cause some copy operations to fail.
1 parent de0024a commit c938a66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vulnfeeds/cmd/nvd-cve-osv/run_cve_to_osv_generation.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ for (( YEAR = $(date +%Y) ; YEAR >= ${FIRST_INSCOPE_YEAR} ; YEAR-- )); do
4646
# Copy results to staging area.
4747
echo "Copying NVD CVE records from ${YEAR} successfully converted to OSV to aggregated staging"
4848
find "${WORK_DIR}/nvd2osv/${YEAR}" -type f -name \*.json \
49-
| xargs cp -t "${WORK_DIR}/nvd2osv/gcs_stage"
49+
-exec cp '{}' "${WORK_DIR}/nvd2osv/gcs_stage/" \;
5050

5151
# Copy conversion summary to GCS bucket.
5252
DURABLE_OUTCOMES_CSV="${OSV_OUTPUT_GCS_PATH}/nvd-conversion-outcomes-${YEAR}-$(date -Iminutes).csv"

0 commit comments

Comments
 (0)