[action] Use github code scan instead of LGTM. (#12402)
* [action] Add code scan for python
This commit is contained in:
parent
94c8107f5e
commit
8a72000909
4
.github/codeql/codeql-config.yml
vendored
Normal file
4
.github/codeql/codeql-config.yml
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
name: "CodeQL config"
|
||||
queries:
|
||||
- uses: security-and-quality
|
||||
- uses: security-extended
|
43
.github/workflows/codeql-analysis.yml
vendored
Normal file
43
.github/workflows/codeql-analysis.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
# For more infomation, please visit: https://github.com/github/codeql-action
|
||||
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
- '202[0-9][0-9][0-9]'
|
||||
pull_request:
|
||||
branches:
|
||||
- 'master'
|
||||
- '202[0-9][0-9][0-9]'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'python' ]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
config-file: ./.github/codeql/codeql-config.yml
|
||||
languages: ${{ matrix.language }}
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
Loading…
Reference in New Issue
Block a user