security: harden GitHub Actions release workflow#1
Merged
ParthJadhav merged 1 commit intomainfrom Mar 16, 2026
Merged
Conversation
- Fix script injection: replace all ${{ inputs.version }} in run blocks
with env vars to prevent shell injection via crafted version strings
- Pin tauri-apps/tauri-action to commit SHA (was using mutable @v0 tag)
— this action has access to all signing secrets
- Move validation step before checkout so it fails fast before any
secrets are loaded
- Scope permissions per-job instead of workflow-wide: version-bump and
build-and-release get contents:write, update-homebrew gets contents:read
- Use jq --arg for safe JSON value injection instead of string interpolation
- Use awk -v for safe variable passing instead of shell expansion in awk
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
${{ inputs.version }}inrun:blocks replaced with environment variables to prevent shell injection via crafted version stringstauri-apps/tauri-action@v0→@84b9d35b...— this action has access to all signing secrets (Apple certs, Azure creds, Tauri signing key)actions/checkoutso it fails fast before any secrets/tokens are loadedcontents: writewith per-job scoping —update-homebrewnow only getscontents: readjq --arginstead of string interpolation,awk -vinstead of shell expansion in awkRemaining manual actions
These can't be fixed via code:
main— currently unprotected, any collaborator can force-pushRELEASE_TOKENPAT scope — ensure it's a fine-grained PAT with minimal permissions (justcontents: writeon this repo)HOMEBREW_TAP_TOKENscope — ensure it's scoped only tohomebrew-supervisorrepoTest plan
workflow_dispatchto verify version bumping still works with env vars🤖 Generated with Claude Code