Repository navigation
47 lines (44 loc) · 1.48 KB
/
Copy pathcodeql.yml
File metadata and controls
47 lines (44 loc) · 1.48 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
name: CodeQL
on:
push:
branches: [main]
pull_request:
schedule:
- cron: "41 3 * * 4"
permissions:
contents: read
security-events: write
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# python covers scripts/: cover_gate.py and docs_sync_check.py gate the
# build, so these project tools receive the same analysis as Go and JS.
language: [go, javascript-typescript, python]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
if: matrix.language == 'go'
with:
go-version-file: go.mod
cache: true
- uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# Keeps the generated web bundle out of scope; see the config file.
config-file: ./.github/codeql/codeql-config.yml
# The default suite is the narrow one. security-extended adds the
# lower-precision security queries. High-severity results fail the
# job via scripts/codeql_fail_on_findings.py after upload.
queries: security-extended
- uses: github/codeql-action/autobuild@v4
- uses: github/codeql-action/analyze@v4
with:
category: "/language:${{ matrix.language }}"
output: results
upload: always
- name: Fail on high-severity CodeQL findings
run: python3 scripts/codeql_fail_on_findings.py results