Repository navigation
fix(ci): harden workflows against injection - #173
Merged
Merged
Conversation
Pass workflow_dispatch inputs and step outputs to run: scripts through
env instead of ${{ }} interpolation, closing the template injection in
cut-release.yml flagged by Aikido (critical).
Also:
- set persist-credentials: false on every checkout that doesn't push;
mark cut-release's checkouts true explicitly since release.sh pushes
(create-pull-request in regenerate.yml configures its own auth)
- scope GitHub App tokens to the repos and permissions each job uses
- add top-level permissions to regenerate.yml and integration-tests.yml
- quote the generator's --additional-properties argument (SC2086)
Contributor
There was a problem hiding this comment.
Review
Blocking Issues
.github/workflows/integration-tests.yml:29: Thescenario-paritycheck failed.actions/create-github-app-tokengot404 Not FoundfromGET /repos/hotdata-dev/www.hotdata.dev/installation. Addingrepositories: www.hotdata.devcaused this failure. The org-wide token used before this change worked..github/workflows/regenerate.yml:28: Therepositorieslist contains the samewww.hotdata.deventry. Everyregeneratedispatch will fail at token creation. No CI job on this PR runsregenerate.yml.
Action Required
- Use the repository name that the GitHub App installation reports, in both workflows. If the App cannot be scoped to that repository, remove
repositories:and keep thepermission-*inputs. - Confirm that
scenario-paritypasses. Runregenerate.ymlonce before merge, or dry-run its token step.
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.
Fixes the critical Aikido template-injection finding in cut-release.yml by moving inputs/outputs into env, and resolves the sdk-rust checkout credential-persistence finding. Also scopes GitHub App tokens and workflow permissions; zizmor goes from 9 high / 12 medium to 0.