-
Notifications
You must be signed in to change notification settings - Fork 2
64 lines (57 loc) · 2.09 KB
/
Copy pathcodeql.yml
File metadata and controls
64 lines (57 loc) · 2.09 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
name: CodeQL
# Static analysis (code scanning) for the Rust workspace and the Angular
# frontend. Findings surface under the repository's Security > Code scanning
# tab and as PR annotations.
#
# Runners: matches the rest of CI on the self-hosted fleet so the runner-policy
# gate passes. Both languages use buildless extraction (build-mode: none), so
# no compiler/toolchain step is needed; a single label set covers both.
on:
push:
branches: [main]
paths-ignore: ["*.md", "docs/**", "AGENTS.md", "CONTRIBUTING.md", "SECURITY.md"]
pull_request:
paths-ignore: ["*.md", "docs/**", "AGENTS.md", "CONTRIBUTING.md", "SECURITY.md"]
schedule:
# Weekly, so advisories that appear after a quiet period are still caught.
- cron: "27 4 * * 1"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Dependabot PRs change dependency metadata only; skip to avoid spending a
# self-hosted runner on each. Skipped jobs report success, so a required
# check would not stay pending.
if: github.event_name != 'pull_request' || github.event.pull_request.user.type != 'Bot'
runs-on: [self-hosted, node-b, linux, x64, rust]
permissions:
# Uploading CodeQL results requires write on security events.
security-events: write
contents: read
actions: read
strategy:
fail-fast: false
matrix:
include:
# Rust CodeQL only supports buildless extraction (build-mode: none);
# it does not support autobuild.
- language: rust
build-mode: none
- language: javascript-typescript
build-mode: none
steps:
- uses: actions/checkout@v7
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"