Repository navigation
67 lines (59 loc) · 2.05 KB
/
Copy pathcodeql.yml
File metadata and controls
67 lines (59 loc) · 2.05 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: CodeQL
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: "23 4 * * 1"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: codeql-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-24.04
timeout-minutes: 60
env:
TMPDIR: ${{ github.workspace }}/tmp
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
# The Actions extractor also analyzes Bash embedded in workflow `run:`
# steps. CodeQL does not provide a standalone Bash language extractor.
language:
- rust
- actions
- python
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Prepare workspace temp directory
run: mkdir -p "$TMPDIR"
# The runner image stopped shipping `zstd`, which the pinned bundle below
# needs: `tar --zstd ...` dies with "zstd: Cannot exec: No such file or
# directory" and every Analyze job fails in Initialize CodeQL before a
# single line is analyzed.
- name: Ensure zstd can unpack the CodeQL bundle
run: sudo apt-get update -qq && sudo apt-get install -y -qq zstd
- name: Initialize CodeQL
uses: github/codeql-action/init@24c54180a607b1449ed407dd24f251e4e9147c8d # v4
with:
# CodeQL 2.26.4 regresses Rust analysis enough to terminate the hosted runner.
# Remove this pin after https://github.com/github/codeql/issues/22463 is fixed.
tools: https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.26.3/codeql-bundle-linux64.tar.zst
languages: ${{ matrix.language }}
build-mode: none
- name: Analyze
uses: github/codeql-action/analyze@24c54180a607b1449ed407dd24f251e4e9147c8d # v4
with:
category: /language:${{ matrix.language }}