-
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (50 loc) · 1.73 KB
/
Copy pathcodeql.yml
File metadata and controls
57 lines (50 loc) · 1.73 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
name: codeql
on:
pull_request:
paths:
- "**/*.rs"
- "Cargo.toml"
- "Cargo.lock"
- ".github/workflows/codeql.yml"
push:
branches: [main]
schedule:
# Weekly on Tuesday 07:00 UTC. Offset from audit.yml's Monday cron so the
# two scheduled scans do not contend for runners or stack failure noise on
# the same day.
- cron: "0 7 * * 2"
# Least-privilege scopes. CodeQL needs `security-events: write`
# to upload SARIF results and `actions: read` to read workflow metadata for
# private repos; everything else stays read-only.
permissions:
actions: read
contents: read
security-events: write
# Cancel in-progress runs for the same ref when a newer commit lands. Scheduled
# runs use `github.run_id` so simultaneous cron firings (rare) do not cancel
# each other.
concurrency:
group: codeql-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: analyze (${{ matrix.language }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [rust]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0
with:
category: "/language:${{ matrix.language }}"