-
Notifications
You must be signed in to change notification settings - Fork 286
59 lines (55 loc) · 1.86 KB
/
Copy pathcodeql.yml
File metadata and controls
59 lines (55 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# CodeQL 安全扫描:Python + TypeScript + Actions 三语言矩阵并行,
# 用内置 security-extended 套件,结果(SARIF)自动上传 GitHub Security 面板。
# Python/TS 为解释型,无需 build,autobuild 即可。
name: CodeQL
on:
pull_request:
paths:
- "backend/**"
- "cli/**"
- "plugins/openclaw/**"
- "web/**"
- ".github/workflows/**"
push:
branches: [main]
paths:
- "backend/**"
- "cli/**"
- "plugins/openclaw/**"
- "web/**"
- ".github/workflows/**"
schedule:
- cron: "0 6 * * *"
concurrency:
group: codeql-${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
actions: read
contents: read
security-events: write
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- language: python
config: ./.github/codeql/codeql-python.yml
- language: javascript-typescript
config: ./.github/codeql/codeql-ts.yml
- language: actions
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- uses: github/codeql-action/init@411bbbe57033eedfc1a82d68c01345aa96c737d7 # v4
with:
languages: ${{ matrix.language }}
config-file: ${{ matrix.config }}
queries: security-extended
- uses: github/codeql-action/autobuild@411bbbe57033eedfc1a82d68c01345aa96c737d7 # v4
- uses: github/codeql-action/analyze@411bbbe57033eedfc1a82d68c01345aa96c737d7 # v4
continue-on-error: true # 未开 Code Scanning 时上传会失败;不阻塞(findings 不影响退出码)
with:
category: "/security/${{ matrix.language }}"