Skip to content

Commit 54de3bf

Browse files
committed
fix(ci): gosec 跳过自动生成的代码文件避免扫描超时
为 gosec 添加 -exclude-generated 标志,跳过带有 "// Code generated" 注释的文件(如 wire_gen.go), 防止安全扫描因分析自动生成代码而超时。
1 parent 4587c3e commit 54de3bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/security-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: |
3535
go install github.com/securego/gosec/v2/cmd/gosec@latest
3636
# exclude ent/ — auto-generated ORM code, not subject to manual security review
37-
gosec -conf .gosec.json -severity high -confidence high -exclude-dir=ent ./...
37+
gosec -conf .gosec.json -severity high -confidence high -exclude-generated -exclude-dir=ent ./...
3838
3939
frontend-security:
4040
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)