From 56076347bddb9b3c5176683a77f41bebdc7c2123 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 26 Jun 2024 07:39:45 +0200 Subject: [PATCH] APK file attestation --- .github/workflows/android.yml | 11 +++++++++++ FAQ.md | 19 +++++++++++++++++++ index.html | 26 +++++++++++++++++++++++--- 3 files changed, 53 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 9ff3ac030a..a428c9fb3b 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -11,6 +11,12 @@ on: description: 'Branch' required: true default: 'master' + +permissions: + id-token: write + contents: read + attestations: write + jobs: build: @@ -52,6 +58,11 @@ jobs: run: ./gradlew lintGithubRelease - name: Build with Gradle run: ./gradlew assembleGithubRelease assembleLargeRelease assemblePlayRelease uploadBugsnagGithub-releaseMapping uploadBugsnagLarge-releaseMapping uploadBugsnagPlay-releaseMapping + #https://docs.github.com/en/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v1 + with: + subject-path: 'app/build/outputs/apk/**/release/*.apk' - name: Upload to BitBucket run: | ./gradlew upload -Ptarget=play-preview-${{ github.event.inputs.branch }} diff --git a/FAQ.md b/FAQ.md index 396e9a2143..d2f596aeee 100644 --- a/FAQ.md +++ b/FAQ.md @@ -429,6 +429,7 @@ Anything on this list is in random order and *might* be added in the near future * [(202) What is DNSSEC and what is DANE?](#faq202) * [(203) Where is my sent message?](#faq203) * [(204) How do I use Gemini?](#faq204) +* [(205) How do I check the integrity of an APK file?](#faq205) [I have another question.](#get-support) @@ -5986,6 +5987,24 @@ This feature is experimental and requires version 1.2171 or later for the GitHub
+ +**(205) How do I check the integrity of an APK file?** + +You can verify in this way that an APK file was built and signed by a GitHub workflow: + +1. Install the [GitHub CLI](https://cli.github.com/) +2. Download and extract the [APK files](https://github.com/M66B/FairEmail/actions) +3. [Verify](https://docs.github.com/en/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds#verifying-artifact-attestations-with-the-github-cli) attestation of an APK file + + +``` +gh attestation verify xyz.apk -R M66B/FairEmail +``` + +Attestation of APK files is available from version 1.2209. + +
+

Get support

🌎 [Google Translate](https://translate.google.com/translate?sl=en&u=https%3A%2F%2Fm66b.github.io%2FFairEmail%2F%23get-support) diff --git a/index.html b/index.html index cac573ea28..39f7c86723 100644 --- a/index.html +++ b/index.html @@ -8,10 +8,19 @@