Browse Source

Add explicit read permissions to workflows (#2265)

Motivation:

* More secure GitHub Actions workflows

Modifications:

Add explicit 'contents: read' permissions to workflows that did not have
explicit permissions defined. This follows GitHub Actions security best
practices by limiting the default GITHUB_TOKEN permissions.

Result:

An extra layer of security.
Rick Newton-Rogers 2 months ago
parent
commit
a531ab9a4c
2 changed files with 6 additions and 0 deletions
  1. 3 0
      .github/workflows/ci.yaml
  2. 3 0
      .github/workflows/release.yml

+ 3 - 0
.github/workflows/ci.yaml

@@ -1,4 +1,7 @@
 name: CI
+
+permissions:
+  contents: read
 on:
   push:
     branches: ["release/1.x"]

+ 3 - 0
.github/workflows/release.yml

@@ -1,5 +1,8 @@
 name: Release
 
+permissions:
+  contents: read
+
 on:
   workflow_dispatch:
     inputs: