Skip to content

Commit 4c2d39f

Browse files
ci: add audit action
Signed-off-by: Henry <mail@henrygressmann.de>
1 parent 6a7a6af commit 4c2d39f

2 files changed

Lines changed: 51 additions & 2 deletions

File tree

.github/workflows/audit.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Audit dependencies
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/audit.yaml"
7+
- "**/Cargo.toml"
8+
- "Cargo.lock"
9+
push:
10+
branches: [main, next]
11+
paths:
12+
- ".github/workflows/audit.yaml"
13+
- "**/Cargo.toml"
14+
- "Cargo.lock"
15+
schedule:
16+
# Every Monday at 12:30 UTC
17+
- cron: "30 12 * * 1"
18+
workflow_dispatch:
19+
20+
permissions:
21+
contents: read
22+
23+
jobs:
24+
scan-pr:
25+
if: github.event_name == 'pull_request'
26+
permissions:
27+
actions: read
28+
contents: read
29+
security-events: write
30+
uses: google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@a345acffa64b0eaede81a3d9aae6141214d9c8fc # v2.6.0
31+
with:
32+
runs-on: ubuntu-24.04
33+
upload-sarif: false
34+
scan-args: --lockfile=./Cargo.lock
35+
36+
scan:
37+
if: github.event_name != 'pull_request'
38+
permissions:
39+
actions: read
40+
contents: read
41+
security-events: write
42+
uses: google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@a345acffa64b0eaede81a3d9aae6141214d9c8fc # v2.6.0
43+
with:
44+
runs-on: ubuntu-24.04
45+
fail-on-vuln: false
46+
scan-args: --lockfile=./Cargo.lock

.github/workflows/test.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
schedule:
99
- cron: "0 0 * * 0"
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
build-wasm:
1316
name: Build wasm
@@ -18,7 +21,7 @@ jobs:
1821
submodules: true
1922
persist-credentials: false
2023
- name: Install Rust toolchain
21-
uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1.16.1
24+
uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
2225
with:
2326
toolchain: nightly
2427
components: rust-src
@@ -92,7 +95,7 @@ jobs:
9295
persist-credentials: false
9396

9497
- name: Install Rust toolchain
95-
uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1.16.1
98+
uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
9699
with:
97100
toolchain: ${{ matrix.rust }}
98101
rustflags: ""

0 commit comments

Comments
 (0)