Files
coder/.github/zizmor.yml
T
Ethan 155e98914d ci: broaden workflow path filter and fix zizmor lint findings (#24323)
## What

The `lint-actions` CI job only ran when `.github/workflows/ci.yaml` or
`.github/actions/**` changed. New workflow files like `backport.yaml`
and `cherry-pick.yaml` were never linted by zizmor, allowing several
findings to land undetected.

## Changes

**`.github/workflows/ci.yaml`** — Broaden the `ci` path filter from
`".github/workflows/ci.yaml"` to `".github/workflows/**"` so
`lint-actions` runs when any workflow file changes.

**`.github/workflows/backport.yaml`**:
- Move permissions from workflow-level to job-level (`detect` →
`contents: read`, `backport` → `contents: write` + `pull-requests:
write`) — fixes `excessive-permissions`
- Replace `${{ matrix.branch }}` in `run:` block with `$BRANCH` env var
— fixes `template-injection`
- Add `persist-credentials: false` to both checkouts — fixes
`artipacked`

**`.github/workflows/cherry-pick.yaml`** — Add `persist-credentials:
false` to checkout — fixes `artipacked`

**`.github/zizmor.yml`** — Ignore `dangerous-triggers` for
`backport.yaml` and `cherry-pick.yaml`. Both use `pull_request_target`
intentionally — they only run post-merge (`merged == true`) and don't
check out or execute untrusted PR code.
2026-04-14 16:34:12 +10:00

13 lines
397 B
YAML

rules:
cache-poisoning:
ignore:
- "ci.yaml:187"
dangerous-triggers:
ignore:
# Both workflows use pull_request_target intentionally: they need
# write access to create backport/cherry-pick branches and PRs.
# They only run after merge (merged == true) and do not check out
# or execute untrusted PR code.
- "backport.yaml"
- "cherry-pick.yaml"