Verify committed monero_c binaries against the pinned commit at release
What changed, and why it matters
This commit adds a new automated release step that checks whether the pre-built Monero native binaries included in the wallet match the exact source-code commit they are supposed to come from. It does not change app behavior or fix a bug; it is a hardening/verification improvement to the build pipeline.
No immediate action required. This is a defensive hardening change. Ensure the monero_c.sha256 file is kept up to date whenever native binaries are rebuilt, and confirm the pinned commit in pubspec.lock is trustworthy.
Security signals we found
Adds supply-chain/build-integrity verification for pre-built native binaries
Prevents release builds from shipping monero_c binaries that do not match the pinned commit
Adds checksum manifest for native libraries
Makes release builds depend on successful binary verification
Evidence from the diff
The change introduces a GitHub Actions job named verify-native that runs before the Android, Linux, Windows, and iOS release builds. It extracts the pinned monero_c commit hash from pubspec.lock, compares it to the commit recorded in a new monero_c.sha256 manifest header, and verifies the SHA-256 checksums of the committed native libraries. If the binaries do not match the pinned commit, the release fails. The monero_c.sha256 file is added with hashes for all platform binaries.
Changed components
.github/workflows/release.ymlmonero_c.sha256Android release buildLinux release buildWindows release buildiOS release buildInspect captured patch +33 / −4
### .github/workflows/release.yml
@@ -106,11 +106,30 @@ jobs:
echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_OUTPUT
echo "Using Flutter version: ${FLUTTER_VERSION}"
+ verify-native:
+ name: Verify monero_c binaries
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
+
+ - name: Binaries match the pinned monero_c commit
+ run: |
+ set -euo pipefail
+ EXPECTED=$(awk '/^ monero:/{f=1} f&&/resolved-ref:/{gsub(/"/,"",$2);print $2;exit}' pubspec.lock)
+ [ -n "$EXPECTED" ] || { echo "::error::no monero resolved-ref in pubspec.lock"; exit 1; }
+ MANIFEST=$(sed -n 's/^# monero_c //p' monero_c.sha256)
+ if [ "$EXPECTED" != "$MANIFEST" ]; then
+ echo "::error::monero_c.sha256 pins $MANIFEST but pubspec.lock pins $EXPECTED"
+ exit 1
+ fi
+ sha256sum -c monero_c.sha256
+
build-android:
name: Android
runs-on: ubuntu-latest
environment: Release
- needs: version
+ needs: [version, verify-native]
steps:
- name: Free up disk space
run: |
@@ -223,7 +242,7 @@ jobs:
name: Linux (x86_64)
runs-on: ubuntu-latest
environment: Release
- needs: version
+ needs: [version, verify-native]
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
@@ -289,7 +308,7 @@ jobs:
name: Windows (x64)
runs-on: windows-2022
environment: Release
- needs: version
+ needs: [version, verify-native]
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
@@ -338,7 +357,7 @@ jobs:
name: iOS
runs-on: macos-26
environment: Release
- needs: version
+ needs: [version, verify-native]
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
### monero_c.sha256
@@ -0,0 +1,10 @@
+# monero_c e31cbe2cc595fa9d640b35ffb45dc3afa91ec7b0
+c721efde6dd802bf97122cd71b45e9c755e40e6e762a754595511891e03cd8fc android/app/src/main/jniLibs/x86_64/libmonero_libwallet2_api_c.so
+3d7799055055027a1c0f1d81076b1bf272c354e07b85c42a757c97626e054b72 android/app/src/main/jniLibs/arm64-v8a/libmonero_libwallet2_api_c.so
+648a39c56f3d95b028ba305b8ea1f95ad16bee8cf0302df0e1fc6b99b341996d android/app/src/main/jniLibs/armeabi-v7a/libmonero_libwallet2_api_c.so
+abefc0f65a7a11be8194dd764bb5022a195d7622a7c5af5b6c7234afc7959d3a linux/monero_libwallet2_api_c.so
+71a952d59390524fb99082dca5cb2e997911be843be454d85a31fc16b562e4a8 windows/monero_libwallet2_api_c.dll
+71abe034d8408b8ccd245853fee3bb1d7aec9970c0065e60430d77f013b25329 windows/libwinpthread-1.dll
+e004b8946fca8a130712281e36133c55f2366877fcff0ae2f3836ab023bf0400 windows/libssp-0.dll
+932d96c1b40e90afe17f1c43e80f240e289d9771e4986c5cb51935bd50565d30 ios/Frameworks/MoneroWallet.xcframework/ios-arm64/MoneroWallet.framework/MoneroWallet
+527df8aa17e88d4af842b0cd121b80f2aaf473d6fdf65ccd6c685e2633f487a7 ios/Frameworks/MoneroWallet.xcframework/ios-arm64-simulator/MoneroWallet.framework/MoneroWalletWhy this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.