chore: add URL_HASH when downloading sentry-native.zip#3626
chore: add URL_HASH when downloading sentry-native.zip#3626buenaflor merged 1 commit intorelease/9.16.1from
URL_HASH when downloading sentry-native.zip#3626Conversation
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) <noreply@anthropic.com>
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
|
#skip-changelog
Note: after this PR
update-native.shshould be updated to fetch the hash and updateCMakeCache.txt