Skip to content

Commit ce15905

Browse files
cliffhallclaude
andcommitted
ci: declare read-only GITHUB_TOKEN permissions in python.yml and typescript.yml
Neither workflow declared a permissions block, so every job's token took the repository default. Scope it to contents: read in the file, which is all these jobs use. The other workflows already declare theirs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
1 parent c41c367 commit ce15905

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

‎.github/workflows/python.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ concurrency:
1212
group: ${{ github.workflow }}-${{ github.ref }}
1313
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1414

15+
# Every job here only reads the repository (checkout, caches, artifacts), so
16+
# the token is scoped in the file rather than inherited from the repository's
17+
# default workflow permission, which could be widened in the UI with no commit
18+
# (#5091).
19+
permissions:
20+
contents: read
21+
1522
jobs:
1623
detect-packages:
1724
timeout-minutes: 5

‎.github/workflows/typescript.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ concurrency:
1212
group: ${{ github.workflow }}-${{ github.ref }}
1313
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1414

15+
# Every job here only reads the repository (checkout, caches, artifacts), so
16+
# the token is scoped in the file rather than inherited from the repository's
17+
# default workflow permission, which could be widened in the UI with no commit
18+
# (#5091).
19+
permissions:
20+
contents: read
21+
1522
jobs:
1623
# Root-level guards: the checks over repo-wide tooling that no per-package
1724
# matrix leg covers. Created by #4863 for the skills gates; #4864 extended it

0 commit comments

Comments
 (0)