Skip to content

Commit 838c602

Browse files
authored
[3.14] Default GHA permissions to contents: read (GH-148346) (#148386)
(cherry picked from commit 9c9df8a)
1 parent af2f518 commit 838c602

21 files changed

+43
-21
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
@@ -637,6 +638,7 @@ jobs:
637638
needs.build-context.outputs.run-ci-fuzz == 'true'
638639
|| needs.build-context.outputs.run-ci-fuzz-stdlib == 'true'
639640
permissions:
641+
contents: read
640642
security-events: write
641643
strategy:
642644
fail-fast: false

.github/workflows/jit.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ on:
1212
paths: *paths
1313
workflow_dispatch:
1414

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

1718
concurrency:
1819
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
@@ -32,7 +32,8 @@ on:
3232
- "Tools/requirements-dev.txt"
3333
workflow_dispatch:
3434

35-
permissions: {}
35+
permissions:
36+
contents: read
3637

3738
env:
3839
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-dnm:

.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
@@ -54,7 +54,8 @@ on: # yamllint disable-line rule:truthy
5454
description: Whether to run the Windows tests
5555
value: ${{ jobs.compute-changes.outputs.run-windows-tests }} # bool
5656

57-
permissions: {}
57+
permissions:
58+
contents: read
5859

5960
jobs:
6061
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)