Skip to content

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

Merged
buenaflor merged 1 commit intorelease/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 intorelease/9.16.1from
chore/native-zip-add-hash

Conversation

@buenaflor
Copy link
Copy Markdown
Contributor

@buenaflor buenaflor commented Apr 7, 2026

#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) <noreply@anthropic.com>
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
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

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.

Copy link
Copy Markdown
Contributor

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

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.

@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
Copy link
Copy Markdown

sentry bot commented Apr 7, 2026

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

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