chore(ci): 为工作流声明最小权限 (contents: read) (#96)

修复 CodeQL actions/missing-workflow-permissions 告警:ci.yml 未显式声明
GITHUB_TOKEN 权限,默认可写。构建/测试仅需读取仓库内容,故收敛为 contents: read。
This commit is contained in:
Wu Qing
2026-06-01 00:27:24 +08:00
committed by GitHub
parent 37092f3167
commit bf0e91db57

View File

@@ -6,6 +6,10 @@ on:
pull_request:
branches: [main, master]
# 最小权限:构建/测试仅需读取仓库内容,显式声明以收敛默认的可写令牌。
permissions:
contents: read
jobs:
backend:
name: Go Build & Test