-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (55 loc) · 1.85 KB
/
Copy pathcodeql.yml
File metadata and controls
57 lines (55 loc) · 1.85 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
# CodeQL security analysis — advanced setup.
#
# GitHub's dynamically-configured scanning only analyzes the no-build
# languages it supports (JS/TS, Go, Python), which silently skips the Rust
# reference implementation — including the sdks/c crate, whose actual code
# is Rust behind a C ABI. This workflow adds Rust (CodeQL public preview,
# build-mode: none) and Actions workflow scanning alongside the big three.
#
# c-cpp is deliberately absent: the only C sources are the generated header
# and one example; the implementation CodeQL should look at is the Rust.
#
# go/javascript-typescript/python overlap with the dynamic scanning is
# intentional, not accidental: the Code Quality product runs quality
# queries, while this workflow runs the security suite — those three
# languages had no security-suite analysis before this workflow. Alert
# dedup handles any rule overlap.
name: CodeQL
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "23 5 * * 1" # weekly, Monday 05:23 UTC
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
security-events: write
contents: read
actions: read
strategy:
fail-fast: false
matrix:
include:
- language: go
build-mode: autobuild
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
- language: rust
build-mode: none
- language: actions
build-mode: none
steps:
- uses: actions/checkout@v6
- uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- uses: github/codeql-action/analyze@v4
with:
category: "/language:${{ matrix.language }}"