chore: add URL_HASH when downloading sentry-native.zip#3626
Conversation
Add SHA256 hash verification for the sentry-native FetchContent download. CMake will now reject the zip if it doesn't match the expected digest from the GitHub release asset. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/9.16.1 #3626 +/- ##
===============================================
Coverage 86.94% 86.94%
===============================================
Files 320 320
Lines 10789 10789
===============================================
Hits 9381 9381
Misses 1408 1408
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Pull request overview
Adds SHA-256 integrity verification for the sentry-native.zip archive fetched via CMake FetchContent, using a hash stored alongside the existing repo/version metadata.
Changes:
- Extend
load_cache(...)inputs to include asha256value. - Add
URL_HASH SHA256=...toFetchContent_Declare(...)forsentry-native. - Record the current
sentry-native.zipSHA-256 in theCMakeCache.txtproperties file.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/flutter/sentry-native/sentry-native.cmake | Adds sha256 cache key usage and enforces it via URL_HASH during FetchContent download. |
| packages/flutter/sentry-native/CMakeCache.txt | Stores the SHA-256 corresponding to the pinned sentry-native release ZIP. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sentry Build Distribution
|
This reverts the changes from #3621 and #3626, restoring FetchContent to use GIT_REPOSITORY/GIT_TAG instead of the release zip URL with SHA256 hash verification. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This reverts the changes from #3621 and #3626, restoring FetchContent to use GIT_REPOSITORY/GIT_TAG instead of the release zip URL with SHA256 hash verification. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
* chore: update packages/flutter/scripts/update-native.sh to 0.13.6 * revert: build: fetch sentry-native from release zip (#3621) This reverts the changes from #3621 and #3626, restoring FetchContent to use GIT_REPOSITORY/GIT_TAG instead of the release zip URL with SHA256 hash verification. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * docs: Add changelog entry for sentry-native zip revert Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> --------- Co-authored-by: GitHub <[email protected]> Co-authored-by: Giancarlo Buenaflor <[email protected]> Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]> Co-authored-by: Giancarlo Buenaflor <[email protected]>
#skip-changelog
Note: after this PR
update-native.shshould be updated to fetch the hash and updateCMakeCache.txt