Skip to content

chore: add URL_HASH when downloading sentry-native.zip#3626

Merged
buenaflor merged 1 commit into
release/9.16.1from
chore/native-zip-add-hash
Apr 7, 2026
Merged

chore: add URL_HASH when downloading sentry-native.zip#3626
buenaflor merged 1 commit into
release/9.16.1from
chore/native-zip-add-hash

Conversation

@buenaflor

@buenaflor buenaflor commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

#skip-changelog

Note: after this PR update-native.sh should be updated to fetch the hash and update CMakeCache.txt

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]>
Copilot AI review requested due to automatic review settings April 7, 2026 11:54
@buenaflor
buenaflor requested a review from denrase as a code owner April 7, 2026 11:54
@buenaflor
buenaflor changed the base branch from main to release/9.16.1 April 7, 2026 11:54
@codecov

codecov Bot commented Apr 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.94%. Comparing base (4417709) to head (086b50d).
⚠️ Report is 2 commits behind head on release/9.16.1.
✅ All tests successful. No failed tests found.

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           
Flag Coverage Δ
sentry 87.81% <ø> (ø)
sentry_dio 97.73% <ø> (ø)
sentry_drift 93.57% <ø> (ø)
sentry_file 63.52% <ø> (ø)
sentry_firebase_remote_config 100.00% <ø> (ø)
sentry_flutter 91.38% <ø> (ø)
sentry_hive 72.51% <ø> (ø)
sentry_isar 73.66% <ø> (ø)
sentry_link 3.95% <ø> (ø)
sentry_logging 97.01% <ø> (ø)
sentry_sqflite 88.40% <ø> (ø)
sentry_supabase 97.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread packages/flutter/sentry-native/CMakeCache.txt

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 a sha256 value.
  • Add URL_HASH SHA256=... to FetchContent_Declare(...) for sentry-native.
  • Record the current sentry-native.zip SHA-256 in the CMakeCache.txt properties 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.

Comment thread packages/flutter/sentry-native/sentry-native.cmake
Comment thread packages/flutter/sentry-native/CMakeCache.txt
Comment thread packages/flutter/sentry-native/sentry-native.cmake
@buenaflor
buenaflor merged commit a7757ee into release/9.16.1 Apr 7, 2026
152 of 153 checks passed
@buenaflor
buenaflor deleted the chore/native-zip-add-hash branch April 7, 2026 11:59
@sentry

sentry Bot commented Apr 7, 2026

Copy link
Copy Markdown

Sentry Build Distribution

App Name App ID Version Configuration Install Page
sentry_flutter_example io.sentry.flutter.sample 9.16.1 (1) Release Install Build

buenaflor added a commit that referenced this pull request Apr 11, 2026
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]>
buenaflor added a commit that referenced this pull request Apr 13, 2026
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]>
buenaflor added a commit that referenced this pull request Apr 13, 2026
* 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]>
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