You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci: address zizmor findings across workflows (#1009)
* ci: harden dependabot-approve actor check and pin lunariajs/action
Two findings from a zizmor (static analysis for GitHub Actions) sweep:
- dependabot-approve: github.actor is spoofable. A PR whose HEAD commit
author is dependabot[bot] would pass this check even if the PR was
opened by another account (the Synacktiv Dependabot bypass). Use
github.event.pull_request.user.login, which is the PR opener and
cannot be spoofed. https://docs.zizmor.sh/audits/#bot-conditions
- lunaria: lunariajs/action was pinned to the mutable v1-prerelease
branch tag. Every other action in the repo is SHA-pinned. Pin to the
current branch tip with the v1-prerelease tag in a trailing comment
so dependabot can keep it updated.
* ci: address remaining zizmor medium findings
Sweep of the remaining zizmor medium findings:
artipacked (persist-credentials):
- lunaria: was missing it. Workflow is read-only -- now persist-credentials: false.
- sync-templates: was using the default. Sync step uses the app token via GH_TOKEN, not the persisted git credential -- persist-credentials: false.
- auto-extract, auto-format (same-repo), format-command (same-repo), query-counts-apply (same-repo), release: persistence is intentional (each pushes back using the app token). Make it explicit with persist-credentials: true and a one-line comment so zizmor stops flagging and reviewers see the why.
excessive-permissions (release.yml):
- Add workflow-level permissions: {} so the sync-templates call doesn't fall through to default repo permissions. The release job already declares its own scoped block; the called workflow's job-level permissions still take precedence.
secrets-inherit (release.yml -> sync-templates.yml):
- Replace secrets: inherit with an explicit secrets: { APP_ID, APP_PRIVATE_KEY } mapping. sync-templates declares them as required on its workflow_call: trigger.
After this commit + the upstream changes already in this PR, zizmor
reports 0 high / 0 medium findings on the workflows that aren't gated
behind the zizmor.yml config (which will land in a follow-up PR).
The remaining findings are dangerous-triggers on the six workflows
that use pull_request_target / workflow_run defensively, plus
excessive-permissions on cla.yml -- all known and accepted.
0 commit comments