]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ci: tighten codeql and labeler even more 21366/head
authorEvgeny Vereshchagin <evvers@ya.ru>
Sun, 14 Nov 2021 09:41:42 +0000 (09:41 +0000)
committerEvgeny Vereshchagin <evvers@ya.ru>
Sun, 14 Nov 2021 10:51:07 +0000 (10:51 +0000)
by moving the read permissions to the top level and
granting additional permissions to the specific jobs.
It should help to prevent new jobs that could be added
there eventually from having write access to resources they
most likely would never need.

.github/workflows/codeql-analysis.yml
.github/workflows/labeler.yml

index c003cc517965f082baa47de9fcf13c72ed5fac69..460002eaeb1354730e68564fec4fc5ce00509ecf 100644 (file)
@@ -11,6 +11,9 @@ on:
   schedule:
     - cron: '0 1 * * *'
 
+permissions:
+  contents: read
+
 jobs:
   analyze:
     name: Analyze
@@ -20,7 +23,6 @@ jobs:
       cancel-in-progress: true
     permissions:
       actions: read
-      contents: read
       security-events: write
 
     strategy:
index 800f8877a3f616d685092110a7ff3e5f48174a27..34d9d63d42c913f320ee5e4665e3bdb7cd41fff5 100644 (file)
@@ -9,11 +9,12 @@ on:
 
 permissions:
   contents: read
-  pull-requests: write
 
 jobs:
   triage:
     runs-on: ubuntu-latest
+    permissions:
+      pull-requests: write
     steps:
     - uses: actions/labeler@69da01b8e0929f147b8943611bee75ee4175a49e
       with: