Skip to content

Commit d7f76a6

Browse files
authored
Merge pull request #5141 from modelcontextprotocol/v2/chore/5091-workflow-token-permissions
ci: declare read-only GITHUB_TOKEN permissions in python.yml and typescript.yml
2 parents c41c367 + ce15905 commit d7f76a6

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)