fix(ci): least-privilege permissions + fork-safe concurrency keys

- evals.yml / evals-periodic.yml evals jobs: explicit contents:read +
  packages:read (container-image pull) and persist-credentials:false —
  the jobs that execute PR-authored code with three provider API keys
  ran on the repo-default token grant with the token written into
  .git/config
- permissions blocks for the 4 workflows that had none (skill-docs,
  make-pdf-gate, windows-free-tests, windows-setup-e2e)
- fork-safe concurrency keys: actionlint, skill-docs, make-pdf-gate,
  windows-setup-e2e switch from head_ref to PR-number keying — a bare
  branch name carries no fork prefix, so same-name branches from two
  forks shared one group and cancelled each other's runs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-08-29 04:39:36 +00:00
co-authored by Claude Fable 5
parent 9fbd0700ff
commit e2904be7a4
7 changed files with 46 additions and 7 deletions
+4 -4
View File
@@ -6,11 +6,11 @@ on:
branches: [main]
pull_request:
# Cancel superseded runs for the same branch (matches evals.yml,
# windows-free-tests.yml, etc.). head_ref is set on pull_request; ref_name is
# the fallback for push so a rapid push series doesn't pile up stale lint runs.
# PR-number keyed (run_id fallback for push): a bare branch name carries no
# fork prefix, so same-name branches from two forks would share one group and
# cancel each other's runs (same rationale as free-tests.yml).
concurrency:
group: actionlint-${{ github.head_ref || github.ref_name }}
group: actionlint-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
# Lint needs nothing from the token; the job runs a third-party image with