From da5ebb391df4508ff4d19672699b33e5754e582a Mon Sep 17 00:00:00 2001 From: Rob Lazzurs Date: Sun, 22 Nov 2026 23:48:41 +0000 Subject: [PATCH] Pin every action to a commit SHA, and let Dependabot move them Every `uses:` named a tag, and a tag can be moved to different code after it was reviewed. That is how tj-actions/changed-files reached thousands of repositories. Here a moved tag would run in jobs holding a contents: write token, the release PAT, or the exporter build users type their Apple ID into. Each action is now on the latest release, pinned to the commit its tag points at, with the full version in a trailing comment. Four were major bumps: actions/checkout v4 -> v7 and actions/setup-python v5 -> v7 in macadi-host.yml, astral-sh/setup-uv v5 -> v10 in the three exporter workflows, and softprops/action-gh-release v2 -> v3 in both release workflows. None of the inputs these workflows pass changed; the notes are in the pull request. .github/dependabot.yml checks the github-actions ecosystem weekly and groups every bump into one PR, moving SHAs and comments together. Co-Authored-By: Claude Opus 5.5 --- .github/dependabot.yml | 19 +++++++++++++++++++ .github/workflows/adi-on-bionic.yml | 10 +++++----- .github/workflows/build-debug.yml | 18 +++++++++--------- .github/workflows/build-release.yml | 14 +++++++------- .github/workflows/check-adi-libraries.yml | 4 ++-- .github/workflows/check-gsa-edge.yml | 4 ++-- .github/workflows/exporter-build-check.yml | 6 +++--- .github/workflows/macadi-host.yml | 8 ++++---- .github/workflows/macos-exporter-python.yml | 16 ++++++++-------- .github/workflows/macos-scripts-python.yml | 6 +++--- .github/workflows/native-stubs.yml | 2 +- .github/workflows/static-checks.yml | 4 ++-- .github/workflows/update-contributors.yml | 6 +++--- CONTRIBUTING.md | 8 ++++++++ 14 files changed, 76 insertions(+), 49 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..c99d07a2 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,19 @@ +# Every `uses:` in .github/workflows is pinned to a full commit SHA, with the release it came from +# in a trailing comment (`uses: actions/checkout@ # v7.0.1`). A tag can be moved to point at +# different code after it was reviewed; a commit cannot. Dependabot reads the comment and moves +# both together, so this is what keeps the pins from going stale. +# +# A Dependabot PR touches only .github/, and the build and static checks do not run for that path +# (AGENTS.md rule 16). Run them by hand against its branch before merging. +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + groups: + github-actions: + patterns: + - "*" + commit-message: + prefix: CI diff --git a/.github/workflows/adi-on-bionic.yml b/.github/workflows/adi-on-bionic.yml index 7624161a..9bcaf4bc 100644 --- a/.github/workflows/adi-on-bionic.yml +++ b/.github/workflows/adi-on-bionic.yml @@ -41,7 +41,7 @@ jobs: name: Build the probe and stubs with the NDK runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # Both ABIs are cross-compiled here: the arm64 runner image has no Android SDK, and the NDK # ships no linux-aarch64 host toolchain. @@ -72,7 +72,7 @@ jobs: done file dist/*/*/* - - uses: actions/upload-artifact@v7 + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: probe path: dist/ @@ -113,9 +113,9 @@ jobs: extract: extract_bionic_apex.sh runs-on: ${{ matrix.runner }} steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: actions/download-artifact@v8 + - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: name: probe path: dist @@ -127,7 +127,7 @@ jobs: # The runtime is 46-65 MB once trimmed to what is needed, against a 430-720 MB image, so it is # cached. Keyed on the image and the script that extracts it. Saved only by a passing job. - - uses: actions/cache@v6 + - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 id: runtime-cache with: path: runtime diff --git a/.github/workflows/build-debug.yml b/.github/workflows/build-debug.yml index c5e4595a..1c3ddae9 100644 --- a/.github/workflows/build-debug.yml +++ b/.github/workflows/build-debug.yml @@ -58,10 +58,10 @@ jobs: timeout-minutes: 45 steps: - name: Checkout code - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set Up JDK - uses: actions/setup-java@v6 + uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0 with: distribution: 'zulu' java-version: '17' @@ -175,7 +175,7 @@ jobs: # Costs nothing on a green run; it is the difference between a diagnosis and a guess. - name: Upload logcat and raw results if: always() - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: instrumented-logcat path: | @@ -185,7 +185,7 @@ jobs: - name: Upload test reports if: always() - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: instrumented-test-reports path: app/build/reports/androidTests/ @@ -196,7 +196,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set current date as env variable run: echo "date_today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV @@ -206,7 +206,7 @@ jobs: run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV - name: Set Up JDK - uses: actions/setup-java@v6 + uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0 with: distribution: 'zulu' # See 'Supported distributions' for available options java-version: '17' @@ -259,7 +259,7 @@ jobs: # Covers app/src/main/python (the module Chaquopy packages into the APK). # Runs on plain CPython - it imports no Android or Java types. - name: Set up Python - uses: actions/setup-python@v7 + uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: '3.12' @@ -276,7 +276,7 @@ jobs: # Upload Artifact Build # Noted For Output [main_project_module]/build/outputs/apk/debug/ - name: Upload APK Debug - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: ${{ env.date_today }} - ${{ env.app_name }} - ${{ env.repository_name }} - APK(s) debug generated path: ${{ env.main_project_module }}/build/outputs/apk/debug/ @@ -288,7 +288,7 @@ jobs: # and committed. Always, so a failed run that still got far enough is not a dead end. - name: Upload the exported Room schemas if: always() - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: room-schemas path: ${{ env.main_project_module }}/schemas/ diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index a653b9c1..713c7a8d 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -30,7 +30,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # Nothing rewrites versionName from the tag: it is what the app reports about itself in # Settings and in bug reports, and it is baked into the APK. So a tag that disagrees @@ -57,7 +57,7 @@ jobs: run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV - name: Set Up JDK - uses: actions/setup-java@v6 + uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0 with: distribution: 'zulu' # See 'Supported distributions' for available options java-version: '17' @@ -92,7 +92,7 @@ jobs: # Covers app/src/main/python, the module Chaquopy packages into the APK. - name: Set up Python - uses: actions/setup-python@v7 + uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: '3.12' @@ -137,14 +137,14 @@ jobs: # Upload Artifact Build # Noted For Output [main_project_module]/build/outputs/apk/debug/ - name: Upload APK Debug - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: ${{ env.date_today }} - ${{ env.app_name }} - ${{ env.repository_name }} - APK(s) debug generated path: ${{ env.main_project_module }}/build/outputs/apk/debug/ # Noted For Output [main_project_module]/build/outputs/apk/release/ - name: Upload APK Release - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: ${{ env.date_today }} - ${{ env.app_name }} - ${{ env.repository_name }} - APK(s) release generated path: ${{ env.main_project_module }}/build/outputs/apk/release/ @@ -172,7 +172,7 @@ jobs: echo "UNICORN_SOURCE=unicorn-$(basename "$url")" >> "$GITHUB_ENV" - name: Upload APK Release Asset to GitHub Release - uses: softprops/action-gh-release@v2 + uses: softprops/action-gh-release@8a0cd651e5b2365bd640854a3fa5dfc70e4875f3 # v3.0.4 if: github.event_name == 'release' with: files: | @@ -183,7 +183,7 @@ jobs: # Noted For Output [main_project_module]/build/outputs/bundle/release/ # - name: Upload AAB (App Bundle) Release - ${{ env.repository_name }} - # uses: actions/upload-artifact@v7 + # uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 # with: # name: ${{ env.date_today }} - ${{ env.app_name }} - ${{ env.repository_name }} - App bundle(s) AAB release generated # path: ${{ env.main_project_module }}/build/outputs/bundle/release/ diff --git a/.github/workflows/check-adi-libraries.yml b/.github/workflows/check-adi-libraries.yml index eac89b5a..bc7dff90 100644 --- a/.github/workflows/check-adi-libraries.yml +++ b/.github/workflows/check-adi-libraries.yml @@ -31,9 +31,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: actions/setup-python@v7 + - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: '3.12' diff --git a/.github/workflows/check-gsa-edge.yml b/.github/workflows/check-gsa-edge.yml index f0ba61a8..ebfe1d14 100644 --- a/.github/workflows/check-gsa-edge.yml +++ b/.github/workflows/check-gsa-edge.yml @@ -27,9 +27,9 @@ jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: actions/setup-python@v7 + - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: '3.12' diff --git a/.github/workflows/exporter-build-check.yml b/.github/workflows/exporter-build-check.yml index 53ab5edc..344cf36a 100644 --- a/.github/workflows/exporter-build-check.yml +++ b/.github/workflows/exporter-build-check.yml @@ -38,15 +38,15 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Python ${{ env.PYINSTALLER_PYTHON_VER }} - uses: actions/setup-python@v7 + uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: ${{ env.PYINSTALLER_PYTHON_VER }} - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 # --frozen: exactly what uv.lock records. A build check that resolved something else would be # checking a bundle nobody is going to ship. diff --git a/.github/workflows/macadi-host.yml b/.github/workflows/macadi-host.yml index 3b253e2b..e8ec3559 100644 --- a/.github/workflows/macadi-host.yml +++ b/.github/workflows/macadi-host.yml @@ -35,9 +35,9 @@ jobs: host: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: "3.12" @@ -66,9 +66,9 @@ jobs: against-adi-core: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: "3.12" diff --git a/.github/workflows/macos-exporter-python.yml b/.github/workflows/macos-exporter-python.yml index b5795521..53a0a48a 100644 --- a/.github/workflows/macos-exporter-python.yml +++ b/.github/workflows/macos-exporter-python.yml @@ -53,7 +53,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # Nothing in this pipeline rewrites VERSION in python/exporter/version.py: the tag names the # artifact, and the app keeps whatever was committed. So a tag that disagrees with the @@ -75,12 +75,12 @@ jobs: # Do everything strictly for the python version used in the release build... - name: Set up Python ${{ env.PYINSTALLER_PYTHON_VER }} - uses: actions/setup-python@v7 + uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: ${{ env.PYINSTALLER_PYTHON_VER }} - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 # --frozen: exactly what uv.lock records, or fail. FindMy.py is pinned there by commit, # because it is a branch rather than a release - so a release build cannot silently pick up @@ -186,15 +186,15 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Python ${{ env.PYINSTALLER_PYTHON_VER }} (${{ matrix.arch }}) - uses: actions/setup-python@v7 + uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: ${{ env.PYINSTALLER_PYTHON_VER }} - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 # tkinter is not part of a stock Python on macOS or Linux, and the wizard is a tkinter app - # without this the build succeeds and the binary dies at import on a user's machine. Windows @@ -396,7 +396,7 @@ jobs: echo "UPLOAD_PATH=${{ github.workspace }}/output/$ASSET" >> $GITHUB_ENV - name: Upload PyInstaller Artifact - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: ${{ env.UPLOAD_ASSET }} path: ${{ env.UPLOAD_PATH }} @@ -408,7 +408,7 @@ jobs: # here, and failed with 403 "Resource not accessible by integration" after both binaries # had already been built. The v1.0.5 release published with no assets attached. - name: Upload Release Asset to GitHub Release - uses: softprops/action-gh-release@v2 + uses: softprops/action-gh-release@8a0cd651e5b2365bd640854a3fa5dfc70e4875f3 # v3.0.4 with: files: ${{ env.UPLOAD_PATH }} # Explicit because a manual run is not on a tag: github.ref is the branch, and without diff --git a/.github/workflows/macos-scripts-python.yml b/.github/workflows/macos-scripts-python.yml index 38ea49ed..e91168ab 100644 --- a/.github/workflows/macos-scripts-python.yml +++ b/.github/workflows/macos-scripts-python.yml @@ -61,15 +61,15 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v7 + uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: ${{ matrix.python-version }} - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 # --frozen: install exactly what uv.lock records and fail if it disagrees with pyproject.toml, # rather than quietly resolving something else. That is what makes the lock mean anything - diff --git a/.github/workflows/native-stubs.yml b/.github/workflows/native-stubs.yml index 3620ffb1..8d8b605a 100644 --- a/.github/workflows/native-stubs.yml +++ b/.github/workflows/native-stubs.yml @@ -43,7 +43,7 @@ jobs: runs-on: ${{ matrix.runner }} steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # clang, because the NDK is clang: the stubs should be compiled by the compiler family that # builds them for the APK. Both are preinstalled on GitHub's Ubuntu images. diff --git a/.github/workflows/static-checks.yml b/.github/workflows/static-checks.yml index 2e16f71c..c29d1747 100644 --- a/.github/workflows/static-checks.yml +++ b/.github/workflows/static-checks.yml @@ -40,10 +40,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Python - uses: actions/setup-python@v7 + uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: '3.12' diff --git a/.github/workflows/update-contributors.yml b/.github/workflows/update-contributors.yml index cb625f2f..9bcc0032 100644 --- a/.github/workflows/update-contributors.yml +++ b/.github/workflows/update-contributors.yml @@ -64,9 +64,9 @@ jobs: && github.event.pull_request.user.type != 'Bot') steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: actions/setup-python@v7 + - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: '3.12' @@ -99,7 +99,7 @@ jobs: fi - name: Open a PR if anything changed - uses: peter-evans/create-pull-request@v8 + uses: peter-evans/create-pull-request@3ffccacd46053766916f087ce41d627c0b8cf2d1 # v8.1.3 with: commit-message: Update the bundled contributor list title: Update the bundled contributor list diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6bafeb9c..1303d4eb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -983,6 +983,14 @@ run regardless: each AES entry carries a fresh random salt. | `macadi-host.yml` | `app/src/main/cpp/macadi/**`, `app/src/test/macadi-host/**`, `MacCoreAdi*.java`, `scripts/locate_mac_coreadi.py`, `scripts/adi-emulator-diff/**` | Fetches Apple's macOS CoreADI with the app's own range request, checks both pinned hashes, builds the emulated Mac's native core for the host and has it load the library; a second job runs `compare-libmacadi.sh`, the port against os-findmy-e's `adi-core` byte for byte. Nothing sent to Apple beyond the download. A few minutes each, mostly building Unicorn | | `waiting-on-reporter.yml` | a comment on an issue, daily | Removes the `waiting on reporter` label when the issue's author replies. Daily, comments once on any labelled issue quiet for 14 days, and again only after somebody else has commented. Never closes anything. Both triggers run the copy on `main`, so a PR cannot exercise it; `workflow_dispatch` defaults to a dry run that prints what it would post | +**Every action is pinned to a commit, not a tag**: `uses: actions/checkout@<40-char sha> # v7.0.1`. +A tag can be moved to different code after anyone looked at it, and several of these jobs hold a +write token or a release key. Pin a new `uses:` the same way, to the commit its release tag points +at, with the full version in the comment. Dependabot (`.github/dependabot.yml`) opens one grouped +PR a week moving the SHAs and comments together. That PR touches only `.github/`, so the build +and static checks do not run on it by themselves (rule 16 in AGENTS.md); dispatch them against its +branch before merging. + The instrumented job needs KVM on the runner; the workflow enables it first. It runs the same `:app:testEmulatorDebugAndroidTest` managed device you run locally, so there is no second emulator definition in CI to keep in step with `app/build.gradle.kts`.