[Python-checkins] ci: add GitHub token permissions (#92999)

ewdurbin webhook-mailer at python.org
Sat May 21 03:55:35 EDT 2022


https://github.com/python/cpython/commit/b96e20c1d9be4e6d5ea3e48c9c97e5ecd02f6055
commit: b96e20c1d9be4e6d5ea3e48c9c97e5ecd02f6055
branch: main
author: Varun Sharma <varunsh at stepsecurity.io>
committer: ewdurbin <ewdurbin at gmail.com>
date: 2022-05-21T03:55:21-04:00
summary:

ci: add GitHub token permissions (#92999)

files:
M .github/workflows/build.yml
M .github/workflows/build_msi.yml
M .github/workflows/doc.yml
M .github/workflows/new-bugs-announce-notifier.yml

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e04633b711f2f..d800442ad07e3 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -22,6 +22,9 @@ on:
     - '3.8'
     - '3.7'
 
+permissions:
+  contents: read
+
 jobs:
   check_source:
     name: 'Check for source changes'
diff --git a/.github/workflows/build_msi.yml b/.github/workflows/build_msi.yml
index ec18735e9b9fa..6044ae0f7c29b 100644
--- a/.github/workflows/build_msi.yml
+++ b/.github/workflows/build_msi.yml
@@ -23,6 +23,9 @@ on:
     paths:
     - 'Tools/msi/**'
 
+permissions:
+  contents: read
+
 jobs:
   build_win32:
     name: 'Windows (x86) Installer'
diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml
index 8c4a034896126..9cd251648cdea 100644
--- a/.github/workflows/doc.yml
+++ b/.github/workflows/doc.yml
@@ -24,6 +24,9 @@ on:
     - 'Doc/**'
     - 'Misc/**'
 
+permissions:
+  contents: read
+
 jobs:
   build_doc:
     name: 'Docs'
diff --git a/.github/workflows/new-bugs-announce-notifier.yml b/.github/workflows/new-bugs-announce-notifier.yml
index 8cd834419f00b..b2b63472d8342 100644
--- a/.github/workflows/new-bugs-announce-notifier.yml
+++ b/.github/workflows/new-bugs-announce-notifier.yml
@@ -5,6 +5,9 @@ on:
     types:
       - opened
 
+permissions:
+  issues: read
+
 jobs:
   notify-new-bugs-announce:
     runs-on: ubuntu-latest
@@ -39,7 +42,7 @@ jobs:
                 assignee : issue.data.assignees.map(assignee => { return assignee.login }),
                 body   : issue.data.body
               };
-            
+
               const data = {
                 from: "CPython Issues <github at mg.python.org>",
                 to: "new-bugs-announce at python.org",



More information about the Python-checkins mailing list