Skip to content

add prime prod registry validation#365

Open
jferrazbr wants to merge 1 commit intorancher:masterfrom
jferrazbr:checksum-validation
Open

add prime prod registry validation#365
jferrazbr wants to merge 1 commit intorancher:masterfrom
jferrazbr:checksum-validation

Conversation

@jferrazbr
Copy link
Copy Markdown

No description provided.

@jferrazbr jferrazbr force-pushed the checksum-validation branch from fe915da to 1787701 Compare March 27, 2026 15:14
@jferrazbr jferrazbr marked this pull request as ready for review March 27, 2026 15:16
@jferrazbr jferrazbr requested review from a team March 27, 2026 15:16
@jiaqiluo jiaqiluo requested a review from Copilot March 27, 2026 17:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens driver download integrity by requiring and enforcing SHA-256 checksum validation when a custom --driver-download-url is provided, and prevents publishing to the Prime Prod registry for RC tags.

Changes:

  • Fail fast in entrypoint.sh when --driver-download-url is used without a corresponding --driver-hash.
  • Make download_driver.sh treat download failures as fatal and always validate the downloaded driver against the provided SHA-256 hash.
  • Gate the “Prime Prod Registry” publish step in the release workflow to skip *-rc* tags.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
package/entrypoint.sh Requires a driver hash whenever a custom driver URL is provided.
package/download_driver.sh Makes curl failures fatal and enforces checksum validation via sha256sum -c.
.github/workflows/release.yaml Skips Prime Prod publishing for RC-tagged releases.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +23 to +25
if ! echo "$2 $driver_file" | sha256sum -c -; then
echo "downloaded file $driver_file failed sha256 checksum"
exit 1
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checksum verification builds the sha256sum -c input using echo "$2 $driver_file". echo is not portable (may interpret -n/escapes) and this also breaks if driver_file expands to multiple matches or contains whitespace/newlines. Prefer using printf to format a single checksum line, and consider ensuring exactly one downloaded file is selected before running sha256sum -c (e.g., fail if multiple files match the prefix).

Copilot uses AI. Check for mistakes.
macedogm
macedogm previously approved these changes Mar 27, 2026
@jferrazbr jferrazbr force-pushed the checksum-validation branch from 1787701 to edef886 Compare March 27, 2026 19:51
@jferrazbr jferrazbr changed the title checksum validation add prime prod registry validation Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants