Skip to content

Commit bfc7b33

Browse files
authored
Merge pull request Wei-Shaw#675 from wucm667/fix/gosec-timeout-exclude-ent-dir
fix(ci): 修复 gosec 扫描因 ent 生成代码导致超时的问题
2 parents 3bae525 + f30f890 commit bfc7b33

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/security-scan.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ permissions:
1212
jobs:
1313
backend-security:
1414
runs-on: ubuntu-latest
15+
timeout-minutes: 15
1516
steps:
1617
- uses: actions/checkout@v4
1718
- name: Set up Go
@@ -32,7 +33,8 @@ jobs:
3233
working-directory: backend
3334
run: |
3435
go install github.com/securego/gosec/v2/cmd/gosec@latest
35-
gosec -conf .gosec.json -severity high -confidence high ./...
36+
# exclude ent/ — auto-generated ORM code, not subject to manual security review
37+
gosec -conf .gosec.json -severity high -confidence high -exclude-dir=ent ./...
3638
3739
frontend-security:
3840
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)