Skip to content

Commit 81ee948

Browse files
[action] Use github code scan instead of LGTM. (#12402)
* [action] Add code scan for python
1 parent 158371d commit 81ee948

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.github/codeql/codeql-config.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name: "CodeQL config"
2+
queries:
3+
- uses: security-and-quality
4+
- uses: security-extended

.github/workflows/codeql-analysis.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# For more infomation, please visit: https://github.com/github/codeql-action
2+
3+
name: "CodeQL"
4+
5+
on:
6+
push:
7+
branches:
8+
- 'master'
9+
- '202[0-9][0-9][0-9]'
10+
pull_request:
11+
branches:
12+
- 'master'
13+
- '202[0-9][0-9][0-9]'
14+
15+
jobs:
16+
analyze:
17+
name: Analyze
18+
runs-on: ubuntu-latest
19+
permissions:
20+
actions: read
21+
contents: read
22+
security-events: write
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
language: [ 'python' ]
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v3
32+
33+
# Initializes the CodeQL tools for scanning.
34+
- name: Initialize CodeQL
35+
uses: github/codeql-action/init@v2
36+
with:
37+
config-file: ./.github/codeql/codeql-config.yml
38+
languages: ${{ matrix.language }}
39+
40+
- name: Perform CodeQL Analysis
41+
uses: github/codeql-action/analyze@v2
42+
with:
43+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)