Repository navigation
50 lines (46 loc) · 1.77 KB
/
Copy pathcodeql.yml
File metadata and controls
50 lines (46 loc) · 1.77 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
# CodeQL code scanning, in a workflow of its own rather than GitHub's default setup: default
# setup never analysed a pull request from a fork, and protection of main waits for CodeQL's
# results, so a contributor's pull request waited for ever. This one runs on every pull request,
# a fork's included once its workflows are approved, on main and weekly.
# Every language is analysed on every pull request, docs-only ones included: main's ruleset waits
# for CodeQL's results for each pull request, and a skipped analysis leaves it waiting (#396).
# What is read: .github/codeql/codeql-config.yml (test-only code is left out).
name: CodeQL
on:
pull_request:
# The merge queue: main's ruleset waits for CodeQL's results on the queue's commit too.
merge_group:
types: [checks_requested]
push:
branches: [main]
schedule:
- cron: '17 4 * * 1'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-24.04
permissions:
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [actions, python, rust]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
with:
languages: ${{ matrix.language }}
build-mode: none
config-file: ./.github/codeql/codeql-config.yml
- uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
with:
category: /language:${{ matrix.language }}