Set read-only workflow tokens (#1958)
Fixes #1957. This PR ensures all workflows run with minimal permissions, instead of with `write-all` permissions. This will protect the project from supply-chain attacks. The change to codeql.yml is for consistency and future-proofing. Should another job eventually be added to the workflow, it will run with just `contents: read`. Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>
This commit is contained in:
1 parent
e017de2b77
commit
a28aa1b6a4
3 files changed
+10
-1
No files matched your search
@@ -2,6 +2,9 @@ name: CI
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
MacOS:
|
||||
runs-on: macos-13
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
name: CIFuzz
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
Fuzzing:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
name: "CodeQL"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master", "3.5" ]
|
||||
@@ -14,7 +17,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
|
||||
Reference in new issue
Block a user