Skip to content

ci: pin third-party actions to commit SHAs - #160

Merged
Helldez merged 1 commit into
mainfrom
ci/pin-actions
Aug 4, 2026
Merged

ci: pin third-party actions to commit SHAs#160
Helldez merged 1 commit into
mainfrom
ci/pin-actions

Conversation

@Helldez

@Helldez Helldez commented Aug 4, 2026

Copy link
Copy Markdown
Owner

nttld/setup-ndk@v1 and softprops/action-gh-release@v2 ran from mutable major tags inside the
android-apk job, which holds a contents: write token. Whoever controls those tags upstream could
have pointed them at unreviewed code with permission to rewrite this repository's release assets.

Both are now pinned to a commit SHA, with the human-readable version in a trailing comment:

Action SHA Version
nttld/setup-ndk ed92fe6 v1.6.0
softprops/action-gh-release 3bb1273 v2.6.2

Each SHA was resolved through the API and checked against the tag it belongs to, rather than copied
by hand. action-gh-release is pinned at the v2 line it was already on; moving to v3 is a separate
decision, not something to slip into a hardening change.

GitHub-owned actions (checkout, setup-java, upload-artifact) stay on major tags. Pinning them
too would be needed to turn on the repository's SHA-pinning enforcement, at the cost of an SHA bump
on every upstream release, for a materially smaller risk.

The release signing keystore was never reachable through this path. It lives only in
release-apk.yml, which runs no third-party action and triggers only on release: published and
workflow_dispatch, both of which already require write access.

CI exercises the setup-ndk pin on this PR. The action-gh-release pin only runs on a tag push, so
it stays unproven until the next release: that is why the SHA was resolved rather than typed.

Alongside this change, and not visible in the diff, the repository now has secret scanning with push
protection enabled, a ruleset blocking deletion and force-push on release tags v*, and the same on
main.

nttld/setup-ndk and softprops/action-gh-release ran from mutable major
tags inside the APK job, which holds a contents:write token. Whoever
controls those tags upstream could have pointed them at unreviewed code
with permission to rewrite this repo's release assets.

Both now resolve to a fixed commit, with the human-readable version in a
trailing comment. GitHub-owned actions stay on major tags: pinning them
would cost an SHA bump on every upstream release for a materially
smaller risk.

The signing keystore was never reachable this way. It lives only in
release-apk.yml, which runs no third-party action and triggers only on
events that already require write access.
@Helldez
Helldez merged commit 8c8c8f1 into main Aug 4, 2026
5 checks passed
@Helldez
Helldez deleted the ci/pin-actions branch August 4, 2026 10:19
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.

1 participant