瀏覽代碼

build: harden main.yml permissions
Signed-off-by: Alex <[email protected]>

Alex 3 年之前
父節點
當前提交
ddb39dd0f4
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      .github/workflows/main.yml

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

@@ -8,6 +8,8 @@ name: build
       - '5.5'
       - '5.5'
   # Allows you to run this workflow manually from the Actions tab
   # Allows you to run this workflow manually from the Actions tab
   workflow_dispatch:
   workflow_dispatch:
+permissions:
+  contents: read # to fetch code (actions/checkout)
 jobs:
 jobs:
   build:
   build:
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest