https://github.com/python/cpython/commit/fdc7f7e742113e8ad4a267c44d852154d4b15c95
commit: fdc7f7e742113e8ad4a267c44d852154d4b15c95
branch: 3.13
author: Hugo van Kemenade <[email protected]>
committer: gpshead <[email protected]>
date: 2026-04-11T17:06:41-07:00
summary:
[3.13] Default GHA permissions to `contents: read` (GH-148346) (#148387)
(cherry picked from commit 9c9df8ac8cbb8f539b3f342d01e40b7a0a57dcbf)
files:
M .github/workflows/add-issue-header.yml
M .github/workflows/build.yml
M .github/workflows/jit.yml
M .github/workflows/lint.yml
M .github/workflows/mypy.yml
M .github/workflows/new-bugs-announce-notifier.yml
M .github/workflows/require-pr-label.yml
M .github/workflows/reusable-cifuzz.yml
M .github/workflows/reusable-context.yml
M .github/workflows/reusable-docs.yml
M .github/workflows/reusable-macos.yml
M .github/workflows/reusable-san.yml
M .github/workflows/reusable-ubuntu.yml
M .github/workflows/reusable-wasi.yml
M .github/workflows/reusable-windows-msi.yml
M .github/workflows/reusable-windows.yml
M .github/workflows/stale.yml
M .github/workflows/verify-ensurepip-wheels.yml
M .github/workflows/verify-expat.yml
diff --git a/.github/workflows/add-issue-header.yml
b/.github/workflows/add-issue-header.yml
index 00b7ae50cb9935..4c25976b9c24f7 100644
--- a/.github/workflows/add-issue-header.yml
+++ b/.github/workflows/add-issue-header.yml
@@ -12,7 +12,8 @@ on:
# Only ever run once
- opened
-permissions: {}
+permissions:
+ contents: read
jobs:
add-header:
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index a45f2c069a755d..c50d060051bc4c 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -11,7 +11,8 @@ on:
- 'main'
- '3.*'
-permissions: {}
+permissions:
+ contents: read
concurrency:
#
https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#concurrency
@@ -540,6 +541,7 @@ jobs:
needs.build-context.outputs.run-ci-fuzz == 'true'
|| needs.build-context.outputs.run-ci-fuzz-stdlib == 'true'
permissions:
+ contents: read
security-events: write
strategy:
fail-fast: false
diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml
index f19394227d090c..a9e9b8e3a4cd8a 100644
--- a/.github/workflows/jit.yml
+++ b/.github/workflows/jit.yml
@@ -18,7 +18,8 @@ on:
- '!**/*.ini'
workflow_dispatch:
-permissions: {}
+permissions:
+ contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index fb2b94b7362308..e9a4eb2b0808cb 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -2,7 +2,8 @@ name: Lint
on: [push, pull_request, workflow_dispatch]
-permissions: {}
+permissions:
+ contents: read
env:
FORCE_COLOR: 1
diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml
index 61c8562a338a01..0c97ba4861dbc2 100644
--- a/.github/workflows/mypy.yml
+++ b/.github/workflows/mypy.yml
@@ -30,7 +30,8 @@ on:
- "Tools/requirements-dev.txt"
workflow_dispatch:
-permissions: {}
+permissions:
+ contents: read
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
diff --git a/.github/workflows/new-bugs-announce-notifier.yml
b/.github/workflows/new-bugs-announce-notifier.yml
index 14860e56600d06..e585657dde6881 100644
--- a/.github/workflows/new-bugs-announce-notifier.yml
+++ b/.github/workflows/new-bugs-announce-notifier.yml
@@ -5,7 +5,8 @@ on:
types:
- opened
-permissions: {}
+permissions:
+ contents: read
jobs:
notify-new-bugs-announce:
diff --git a/.github/workflows/require-pr-label.yml
b/.github/workflows/require-pr-label.yml
index ebc5699d490841..206f24cf9d5fb3 100644
--- a/.github/workflows/require-pr-label.yml
+++ b/.github/workflows/require-pr-label.yml
@@ -4,7 +4,8 @@ on:
pull_request:
types: [opened, reopened, labeled, unlabeled, synchronize]
-permissions: {}
+permissions:
+ contents: read
jobs:
label:
diff --git a/.github/workflows/reusable-cifuzz.yml
b/.github/workflows/reusable-cifuzz.yml
index f06b193d3715fb..9b49e7fd26f007 100644
--- a/.github/workflows/reusable-cifuzz.yml
+++ b/.github/workflows/reusable-cifuzz.yml
@@ -13,7 +13,8 @@ on:
required: true
type: string
-permissions: {}
+permissions:
+ contents: read
jobs:
cifuzz:
diff --git a/.github/workflows/reusable-context.yml
b/.github/workflows/reusable-context.yml
index 6416115b1de058..8ed6873104db7b 100644
--- a/.github/workflows/reusable-context.yml
+++ b/.github/workflows/reusable-context.yml
@@ -48,7 +48,8 @@ on: # yamllint disable-line rule:truthy
description: Whether to run the Windows tests
value: ${{ jobs.compute-changes.outputs.run-windows-tests }} # bool
-permissions: {}
+permissions:
+ contents: read
jobs:
compute-changes:
diff --git a/.github/workflows/reusable-docs.yml
b/.github/workflows/reusable-docs.yml
index e1c35021432ad0..bee44e8df27663 100644
--- a/.github/workflows/reusable-docs.yml
+++ b/.github/workflows/reusable-docs.yml
@@ -4,7 +4,8 @@ on:
workflow_call:
workflow_dispatch:
-permissions: {}
+permissions:
+ contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
diff --git a/.github/workflows/reusable-macos.yml
b/.github/workflows/reusable-macos.yml
index dbc6fd3774a5ba..e7e2a0afd341f7 100644
--- a/.github/workflows/reusable-macos.yml
+++ b/.github/workflows/reusable-macos.yml
@@ -12,7 +12,8 @@ on:
required: true
type: string
-permissions: {}
+permissions:
+ contents: read
env:
FORCE_COLOR: 1
diff --git a/.github/workflows/reusable-san.yml
b/.github/workflows/reusable-san.yml
index f5e7f48b860b2f..82d6759b6347e3 100644
--- a/.github/workflows/reusable-san.yml
+++ b/.github/workflows/reusable-san.yml
@@ -12,7 +12,8 @@ on:
type: boolean
default: false
-permissions: {}
+permissions:
+ contents: read
env:
FORCE_COLOR: 1
diff --git a/.github/workflows/reusable-ubuntu.yml
b/.github/workflows/reusable-ubuntu.yml
index 3f1abce25c9684..f03908afc14b83 100644
--- a/.github/workflows/reusable-ubuntu.yml
+++ b/.github/workflows/reusable-ubuntu.yml
@@ -9,7 +9,8 @@ on:
type: boolean
default: false
-permissions: {}
+permissions:
+ contents: read
env:
FORCE_COLOR: 1
diff --git a/.github/workflows/reusable-wasi.yml
b/.github/workflows/reusable-wasi.yml
index e9c032f93bbf2d..2e5d4b8dd56618 100644
--- a/.github/workflows/reusable-wasi.yml
+++ b/.github/workflows/reusable-wasi.yml
@@ -3,7 +3,8 @@ name: Reusable WASI
on:
workflow_call:
-permissions: {}
+permissions:
+ contents: read
env:
FORCE_COLOR: 1
diff --git a/.github/workflows/reusable-windows-msi.yml
b/.github/workflows/reusable-windows-msi.yml
index e836944f465bb3..e690224f35537b 100644
--- a/.github/workflows/reusable-windows-msi.yml
+++ b/.github/workflows/reusable-windows-msi.yml
@@ -8,7 +8,8 @@ on:
required: true
type: string
-permissions: {}
+permissions:
+ contents: read
env:
FORCE_COLOR: 1
diff --git a/.github/workflows/reusable-windows.yml
b/.github/workflows/reusable-windows.yml
index 41ba50d8665d80..919ab4a4fb33b7 100644
--- a/.github/workflows/reusable-windows.yml
+++ b/.github/workflows/reusable-windows.yml
@@ -17,7 +17,8 @@ on:
type: boolean
default: false
-permissions: {}
+permissions:
+ contents: read
env:
FORCE_COLOR: 1
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index 42ddb713c10393..1fbc4a20dbc7dd 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -4,7 +4,8 @@ on:
schedule:
- cron: "0 */6 * * *"
-permissions: {}
+permissions:
+ contents: read
jobs:
stale:
diff --git a/.github/workflows/verify-ensurepip-wheels.yml
b/.github/workflows/verify-ensurepip-wheels.yml
index 4ac25bc909b13f..cb40f6abc0b3b7 100644
--- a/.github/workflows/verify-ensurepip-wheels.yml
+++ b/.github/workflows/verify-ensurepip-wheels.yml
@@ -13,7 +13,8 @@ on:
- '.github/workflows/verify-ensurepip-wheels.yml'
- 'Tools/build/verify_ensurepip_wheels.py'
-permissions: {}
+permissions:
+ contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
diff --git a/.github/workflows/verify-expat.yml
b/.github/workflows/verify-expat.yml
index e193dfa4603e8a..472a11db2da5fb 100644
--- a/.github/workflows/verify-expat.yml
+++ b/.github/workflows/verify-expat.yml
@@ -11,7 +11,8 @@ on:
- 'Modules/expat/**'
- '.github/workflows/verify-expat.yml'
-permissions: {}
+permissions:
+ contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]