浏览代码

Add specific permissions to workflows under .github/workflows (#704)

* Restrict permissions for the GITHUB_TOKEN in .github/workflows/release.yml

* Restrict permissions for the GITHUB_TOKEN in .github/workflows/test.yml

Co-authored-by: Step Security <[email protected]>
Varun Sharma 3 年之前
父节点
当前提交
22e46b846c
共有 2 个文件被更改,包括 4 次插入0 次删除
  1. 2 0
      .github/workflows/release.yml
  2. 2 0
      .github/workflows/test.yml

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

@@ -21,6 +21,8 @@ on:
       - ".github/workflows/*.yml"
 jobs:
   build:
+    permissions:
+      contents: write
     strategy:
       matrix:
         # Include amd64 on all platforms.

+ 2 - 0
.github/workflows/test.yml

@@ -19,6 +19,8 @@ on:
 
 jobs:
   test:
+    permissions:
+      contents: read
     runs-on: ${{ matrix.os }}
     strategy:
       fail-fast: false