Skip to content

Commit fdc7f7e

Browse files
authored
[3.13] Default GHA permissions to contents: read (GH-148346) (#148387)
(cherry picked from commit 9c9df8a)
1 parent 8e369d3 commit fdc7f7e

19 files changed

+39
-19
lines changed

.github/workflows/add-issue-header.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ on:
1212
# Only ever run once
1313
- opened
1414

15-
permissions: {}
15+
permissions:
16+
contents: read
1617

1718
jobs:
1819
add-header:

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ on:
1111
- 'main'
1212
- '3.*'
1313

14-
permissions: {}
14+
permissions:
15+
contents: read
1516

1617
concurrency:
1718
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#concurrency
@@ -540,6 +541,7 @@ jobs:
540541
needs.build-context.outputs.run-ci-fuzz == 'true'
541542
|| needs.build-context.outputs.run-ci-fuzz-stdlib == 'true'
542543
permissions:
544+
contents: read
543545
security-events: write
544546
strategy:
545547
fail-fast: false

.github/workflows/jit.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ on:
1818
- '!**/*.ini'
1919
workflow_dispatch:
2020

21-
permissions: {}
21+
permissions:
22+
contents: read
2223

2324
concurrency:
2425
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}

.github/workflows/lint.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: Lint
22

33
on: [push, pull_request, workflow_dispatch]
44

5-
permissions: {}
5+
permissions:
6+
contents: read
67

78
env:
89
FORCE_COLOR: 1

.github/workflows/mypy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ on:
3030
- "Tools/requirements-dev.txt"
3131
workflow_dispatch:
3232

33-
permissions: {}
33+
permissions:
34+
contents: read
3435

3536
env:
3637
PIP_DISABLE_PIP_VERSION_CHECK: 1

.github/workflows/new-bugs-announce-notifier.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ on:
55
types:
66
- opened
77

8-
permissions: {}
8+
permissions:
9+
contents: read
910

1011
jobs:
1112
notify-new-bugs-announce:

.github/workflows/require-pr-label.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ on:
44
pull_request:
55
types: [opened, reopened, labeled, unlabeled, synchronize]
66

7-
permissions: {}
7+
permissions:
8+
contents: read
89

910
jobs:
1011
label:

.github/workflows/reusable-cifuzz.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ on:
1313
required: true
1414
type: string
1515

16-
permissions: {}
16+
permissions:
17+
contents: read
1718

1819
jobs:
1920
cifuzz:

.github/workflows/reusable-context.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ on: # yamllint disable-line rule:truthy
4848
description: Whether to run the Windows tests
4949
value: ${{ jobs.compute-changes.outputs.run-windows-tests }} # bool
5050

51-
permissions: {}
51+
permissions:
52+
contents: read
5253

5354
jobs:
5455
compute-changes:

.github/workflows/reusable-docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ on:
44
workflow_call:
55
workflow_dispatch:
66

7-
permissions: {}
7+
permissions:
8+
contents: read
89

910
concurrency:
1011
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}

0 commit comments

Comments
 (0)