-
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (41 loc) · 1.2 KB
/
Copy pathcode-scanning.yml
File metadata and controls
45 lines (41 loc) · 1.2 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
name: Code scanning
on:
push:
branches: [master]
pull_request:
schedule:
- cron: "0 6 * * 1"
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
clippy:
name: clippy (SARIF)
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@1.97.1
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@v2
with:
tool: clippy-sarif,sarif-fmt
# Collect clippy findings as SARIF for the GitHub Security tab. This does not
# gate the build (the lint job already enforces -D warnings); it surfaces
# findings over time in code scanning.
- name: clippy -> SARIF
run: cargo clippy --workspace --all-targets --all-features --message-format=json
| clippy-sarif | tee results.sarif | sarif-fmt
continue-on-error: true
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: results.sarif
category: clippy