-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (54 loc) · 2.03 KB
/
Copy pathcodeql.yml
File metadata and controls
61 lines (54 loc) · 2.03 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
name: codeql
# Required by the `main` branch ruleset (`code_scanning` with
# `alerts_threshold: errors`). Runs on PRs and pushes so the ruleset's
# auto-merge condition can clear, and on a weekly cron so newly-published
# CodeQL queries surface regressions on existing code without a push.
on:
pull_request:
push:
branches: [main, v3]
schedule:
# Mondays 06:13 UTC — odd minute to avoid the hourly-cron stampede.
- cron: "13 6 * * 1"
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true
# Least-privilege: only `security-events: write` for findings upload.
# No run: step consumes untrusted external input (issue/PR/commit text);
# the only template expansion is `matrix.language`, a static list.
permissions:
security-events: write
actions: read
contents: read
jobs:
analyze:
name: analyze (${{ matrix.language }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language:
# CodeQL's Rust extractor only supports `build-mode: none`
# (source-only) — see CodeQL 2.25+ release notes. No cargo
# build step needed; the extractor parses .rs files directly.
- rust
# JS/TS extracts source files directly. Covers .ts, .tsx,
# .js, and `<script>` blocks inside .vue files (the JS/TS
# extractor reads Vue SFCs natively).
- javascript-typescript
steps:
- uses: actions/checkout@v4
- name: initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: none
# `security-and-quality` is configured in
# .github/codeql-config.yml. That config also ignores generated
# first-party extension UI assets so CodeQL reports source issues
# instead of minified bundle internals.
config-file: ./.github/codeql-config.yml
- name: perform CodeQL analysis
uses: github/codeql-action/analyze@v3
with:
category: /language:${{ matrix.language }}