ci: harden workflows — least-privilege tokens, SHA-pinned release action, wrapper validation#216
Open
dipenpradhan wants to merge 1 commit into
Open
Conversation
- Replace archived marvinpinto/action-automatic-releases@latest (mutable tag, token access) with softprops/action-gh-release pinned to a commit SHA - Add least-privilege permissions blocks to android.yml, build.yml and master-apk-create.yml (default token was write-all) - Add a Gradle wrapper validation workflow (checksums of gradle-wrapper.jar verified against official distributions) Refs Gurupreet#215 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Item 1 (+5) of #215 — workflow hardening with zero new infrastructure:
marvinpinto/action-automatic-releases@latestinmaster-apk-create.yml: that action is archived/unmaintained, referenced by a mutable tag, and receivesGITHUB_TOKEN. Nowsoftprops/action-gh-release, pinned to a commit SHA (b430933…= v3.0.0), updating the same rollinglatest-masterprerelease.permissions:blocks onandroid.yml,build.yml(contents: read) andmaster-apk-create.yml(contents: writefor the release). Previously these inherited the default token permissions. The issue-creation workflows already had scoped permissions.wrapper-validation.yml:gradle/actions/wrapper-validation(SHA-pinned, v6.1.0) verifies every checked-ingradle-wrapper.jaragainst official Gradle checksums on pushes and PRs — a tampered wrapper JAR is invisible in code review.Verification
Tested end-to-end on the fork (
dipenpradhan/ComposeCookBook): the hardened workflows ran on a push to its master — including the release step, which successfully created/updated thelatest-masterprerelease with the APK via the new pinned action.Refs #215
🤖 Generated with Claude Code
cc @Gurupreet for review