Skip to content

ci: declare contents:read on Flash Attention Benchmark workflow#176

Open
arpitjain099 wants to merge 1 commit into
pytorch:mainfrom
arpitjain099:chore/flash-attention-permissions
Open

ci: declare contents:read on Flash Attention Benchmark workflow#176
arpitjain099 wants to merge 1 commit into
pytorch:mainfrom
arpitjain099:chore/flash-attention-permissions

Conversation

@arpitjain099
Copy link
Copy Markdown

The Flash Attention Benchmark workflow runs nightly on linux.dgx.b200.8, checks out this repo + Dao-AILab/flash-attention, and runs the benchmark scripts. There's no GitHub API write beyond actions/checkout.

This patch pins the job to permissions: contents: read, matching the per-job permission blocks already declared by tritonbench.yml, tritonbench-bisect.yml, vllm-benchmark.yml, vllm-ci-test.yml, vllm-profiling.yml, sglang-benchmark.yml, and pytorch-bisect.yaml.

With explicit scope:

  • the workflow token can't be widened by a future change to the repo default
  • the SLSA / OpenSSF Scorecard Token-Permissions check passes for this file
  • a hypothetical compromise of actions/checkout (cf. tj-actions/changed-files CVE-2025-30066) stays boxed in read-only

inductor.yml is the other workflow without an explicit permissions: block, but it calls the reusable pytorch/test-infra/.github/workflows/linux_job.yml@main workflow. Declaring permissions on the caller would intersect with the callee's grant, so I've left it out of this PR.

No behavioural change.

The benchmark-flash-attn job clones this repo, clones Dao-AILab/flash-attention
into a sibling path, and runs benchmarks on linux.dgx.b200.8. No GitHub API
write beyond actions/checkout.

Style matches the per-job permissions blocks already used by
tritonbench.yml, vllm-benchmark.yml, and the other hardened workflows in
this repo (typically id-token:write + contents:read).

inductor.yml is the other workflow without permissions, but it's a caller
of pytorch/test-infra/.github/workflows/linux_job.yml@main, so adding
permissions there would intersect with the reusable workflow's grant.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
@meta-cla meta-cla Bot added the cla signed label May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant