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

ROX-23123: Verifying File Integrity while updating offline bundle #1497

Merged
merged 4 commits into from
May 16, 2024
Merged
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
13 changes: 5 additions & 8 deletions scripts/ci/jobs/diff-dumps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,11 @@ upload_offline_dump() {

file_to_check="scanner-v4-defs-${latest_version}.zip"

if curl --silent --show-error --max-time 60 --retry 3 -o $file_to_check https://definitions.stackrox.io/v4/offline-bundles/$file_to_check; then
# If the file exists, add it to scanner-vuln-updates.zip
zip scanner-vuln-updates.zip "$file_to_check"
echo "$file_to_check added to scanner-vuln-updates.zip"
else
echo "$file_to_check does not exist."
exit 1
fi
curl --silent --show-error --fail --max-time 60 --retry 3 -o $file_to_check https://definitions.stackrox.io/v4/offline-bundles/$file_to_check
unzip -l "$file_to_check"
zip scanner-vuln-updates.zip "$file_to_check"
daynewlee marked this conversation as resolved.
Show resolved Hide resolved
echo "$file_to_check added to scanner-vuln-updates.zip"

"${cmd[@]}" gsutil cp scanner-vuln-updates.zip gs://scanner-support-public/offline/v1/scanner-vuln-updates.zip
}

Expand Down
Loading