Skip to content

fix(ci): harden workflows against injection - #173

Merged
zfarrell merged 4 commits into
mainfrom
fix/workflow-template-injection
Oct 22, 2026
Merged

zfarrell merged 4 commits into
mainfrom
fix/workflow-template-injection

Conversation

@zfarrell

Copy link
Copy Markdown
Contributor

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.

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)
@zfarrell
zfarrell requested a review from a team as a code owner October 22, 2026 02:50
@zfarrell
zfarrell requested review from eddietejeda and removed request for a team October 22, 2026 02:50
Comment thread .github/workflows/integration-tests.yml Outdated
Comment thread .github/workflows/regenerate.yml Outdated
Comment thread .github/workflows/regenerate.yml

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Blocking Issues

  • .github/workflows/integration-tests.yml:29: The scenario-parity check failed. actions/create-github-app-token got 404 Not Found from GET /repos/hotdata-dev/www.hotdata.dev/installation. Adding repositories: www.hotdata.dev caused this failure. The org-wide token used before this change worked.
  • .github/workflows/regenerate.yml:28: The repositories list contains the same www.hotdata.dev entry. Every regenerate dispatch will fail at token creation. No CI job on this PR runs regenerate.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 the permission-* inputs.
  • Confirm that scenario-parity passes. Run regenerate.yml once before merge, or dry-run its token step.

Comment thread .github/workflows/integration-tests.yml
claude[bot]
claude Bot previously approved these changes Oct 22, 2026
@zfarrell
zfarrell merged commit 0248653 into main Oct 22, 2026
3 checks passed
@zfarrell
zfarrell deleted the fix/workflow-template-injection branch October 22, 2026 18:22
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