瀏覽代碼

ci: tighten build permissions and CodeQL path coverage

Limit the build workflow token to contents:read by default, and
include lang/** so language-tooling changes trigger CodeQL.

Co-authored-by: Cursor <cursoragent@cursor.com>
jamesread 21 小時之前
父節點
當前提交
b0f6a2ccad
共有 2 個文件被更改,包括 5 次插入0 次删除
  1. 3 0
      .github/workflows/build-and-release.yml
  2. 2 0
      .github/workflows/codeql-analysis.yml

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

@@ -52,6 +52,9 @@ on:
       - 'var/macos/**'
       - 'var/windows/**'
 
+permissions:
+  contents: read
+
 jobs:
   build:
     runs-on: ubuntu-latest

+ 2 - 0
.github/workflows/codeql-analysis.yml

@@ -18,6 +18,7 @@ on:
       - '.github/workflows/codeql-analysis.yml'
       - 'frontend/**'
       - 'integration-tests/**'
+      - 'lang/**'
       - 'proto/**'
       - 'service/**'
     branches: [main, next]
@@ -26,6 +27,7 @@ on:
       - '.github/workflows/codeql-analysis.yml'
       - 'frontend/**'
       - 'integration-tests/**'
+      - 'lang/**'
       - 'proto/**'
       - 'service/**'
     branches: [main, next]