]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
ci: Add minimum GitHub token permissions for workflows (#1159)
authorVarun Sharma <varunsh@stepsecurity.io>
Tue, 13 Sep 2022 19:41:16 +0000 (12:41 -0700)
committerGitHub <noreply@github.com>
Tue, 13 Sep 2022 19:41:16 +0000 (21:41 +0200)
.github/workflows/build.yaml
.github/workflows/codeql-analysis.yaml

index fe1e01a4813d135a1522c201cb051c097103b1cf..47e00207b74ab09e22692e760883ac47b97d5b08 100644 (file)
@@ -11,6 +11,9 @@ defaults:
   run:
     shell: bash
 
+permissions:
+  contents: read
+
 jobs:
   build_and_test:
     env:
index 4ae74ed8bacced3fb09d2d5bf851a9362f5fb13c..517808c0483e5dc928dfe57c28a4ed4950eb0368 100644 (file)
@@ -17,8 +17,15 @@ on:
     # Full scan once a week
     - cron: '0 14 * * 3'
 
+permissions:
+  contents: read
+
 jobs:
   analyze:
+    permissions:
+      actions: read  # for github/codeql-action/init to get workflow details
+      contents: read  # for actions/checkout to fetch code
+      security-events: write  # for github/codeql-action/analyze to upload SARIF results
     name: Analyze
     runs-on: ubuntu-20.04