ci(repo): harden workflow shell-injection surface#8875
Conversation
Move attacker-influenced ${{ }} expressions out of run: blocks and into env in the two fork-PR-reachable ci.yml guard steps (check-permissions echoes github.actor/github.triggering_actor/the permission level; require-changeset compares github.event.pull_request.user.login), so a crafted actor name or PR author login can no longer be interpolated into the shell. Drop the unused actions: write from e2e-staging.yml (no step consumes it; contents: read is enough). Annotate the labeler workflow_run trigger as an intentional, guarded handshake so zizmor's dangerous-triggers audit does not flag it. Closes the High-confidence zizmor template-injection and excessive-permissions findings in these files; zizmor adoption as a CI check is tracked with Security (SEC-307).
🦋 Changeset detectedLatest commit: 64713f9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughGitHub Actions workflows are hardened against template injection by moving ChangesCI Template Injection and Permission Hardening
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Comment |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
These are the High-confidence shell-injection findings zizmor surfaced in the workflow guards. The load-bearing change is in
ci.yml: the check-permissions and require-changeset steps interpolatedgithub.actor,github.triggering_actor, andpull_request.user.loginstraight intorun:shell, all reachable from a fork PR, so a crafted username could inject. They now pass throughenvand are referenced as quoted shell vars; the comparison and skip logic is unchanged.Two smaller ones come along:
e2e-staging.ymlcarried anactions: writethat no step uses (dropped tocontents: read), and the labelerworkflow_runtrigger is annotated as the intentional, guarded handshake so zizmor stops flagging it.Best merged after #8874, which adds the actionlint config and clears the unrelated
ci.ymlfinding in the same file. zizmor adoption as a check, and the remaining lower-severity findings, are tracked with Security (SEC-307).Summary by CodeRabbit
Release Notes
Bug Fixes
Chores