File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 1
- name : " CodeQL Python Security Scan"
1
+ name : " CodeQL Python Security and Quality Scan"
2
2
3
3
on :
4
- pull_request :
5
- branches : [ main, master ]
6
- types : [opened, synchronize, reopened]
7
4
push :
8
5
branches : [ main, master ]
6
+ pull_request :
7
+ branches : [ main, master ]
9
8
10
9
permissions :
11
10
contents : read
@@ -18,21 +17,26 @@ jobs:
18
17
runs-on : ubuntu-latest
19
18
20
19
steps :
20
+ # 1. 检出代码
21
21
- name : Checkout repository
22
22
uses : actions/checkout@v4
23
23
with :
24
24
fetch-depth : 0
25
25
26
+ # 2. 初始化 CodeQL
26
27
- name : Initialize CodeQL
27
28
uses : github/codeql-action/init@v3
28
29
with :
29
30
languages : python
30
- queries : +security-extended,+security-and-quality
31
+ # 不指定 queries,Action 会默认跑安全 + 质量查询
31
32
33
+ # 3. 自动构建
32
34
- name : Autobuild
33
35
uses : github/codeql-action/autobuild@v3
34
36
37
+ # 4. 执行分析
35
38
- name : Perform CodeQL Analysis
36
39
uses : github/codeql-action/analyze@v3
37
40
with :
41
+ # 不指定 queries,Action 会自动跑安全 + 质量规则
38
42
upload : true
You can’t perform that action at this time.
0 commit comments