fix(ci): prevent workflow script injection via env vars#112
Merged
Conversation
pmathew92
approved these changes
Jul 16, 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.
Changes
This PR remediates a GitHub Workflow script injection vulnerability in the CI/publish workflows. Untrusted
${{ }}expressions (action inputs and secrets) were being interpolated directly into shellrun:scripts, allowing anyone able to invoke the workflow to inject arbitrary shell commands and potentially exfiltrate secrets. Per GitHub's secure-use guidance, the fix moves these values intoenv:blocks and references them as quoted shell variables so the shell treats them as data, not code..github/actions/setup/action.yml—inputs.gradle/inputs.kotlinmoved to anenv:block ($GRADLE/$KOTLIN) and referenced as quoted shell variables in the sdkmanrun:step..github/workflows/publish.yml— theOSSR_USERNAME,OSSR_PASSWORD,SIGNING_KEY, andSIGNING_PASSWORDsecrets moved to anenv:block on thepublishAndroidLibraryPublicationToMavenRepositorystep; also removed a stray trailing"after-PisSnapshot=false.No endpoints, classes, methods, public APIs, or UI are affected — the change is confined to CI workflow configuration.
Not changed (verified safe):
inputs.java(with:field ofsetup-java),github.event.inputs.branch(ref:ofcheckout), and the concurrencygroup:expressions are consumed by the Actions runner, not a shell, so they are not injection vectors.Alternatives considered: Restricting inputs via
choice-type parameters was considered but rejected — the env-var pattern is GitHub's recommended mitigation, is minimally invasive, and preserves the existing flexibility of the composite action's version inputs.References
SEC-8159
Testing
yaml.safe_load— both parse cleanly).docker run --rm -v "$PWD":/repo -w /repo rhysd/actionlint:latest -colorGRADLE='6.7.1; touch pwned') is now treated as a literal argument tosdkrather than executed as a command.releaseenvironment and real Maven Central credentials; the change is limited to how existing secrets are passed and does not alter the gradle command's behavior.[ ] This change adds test coverage — N/A (workflow configuration; no unit-testable surface)
[x] This change has been tested on the latest version of the platform/language or why not — validated via YAML parsing and injection simulation; live publish run not exercised (requires protected
releaseenvironment + credentials).Checklist
[x] I have read the Auth0 general contribution guidelines
[x] I have read the Auth0 Code of Conduct
[x] All existing and new tests complete without errors