Repository navigation
74 lines (69 loc) · 2.15 KB
/
Copy pathaudit.yml
File metadata and controls
74 lines (69 loc) · 2.15 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
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Security Audit
on:
push:
branches: [main]
paths:
- "Cargo.toml"
- "Cargo.lock"
- "go/ressrf/go.mod"
- "go/ressrf/go.sum"
- "go-native/ressrf/go.mod"
- "go-native/ressrf/go.sum"
pull_request:
branches: [main]
paths:
- "Cargo.toml"
- "Cargo.lock"
- "go/ressrf/go.mod"
- "go/ressrf/go.sum"
- "go-native/ressrf/go.mod"
- "go-native/ressrf/go.sum"
schedule:
- cron: "0 6 * * *" # Daily at 06:00 UTC
permissions: {}
concurrency:
group: audit-${{ github.ref }}
cancel-in-progress: true
jobs:
cargo-audit:
name: cargo audit
runs-on: ubuntu-latest
permissions:
contents: read # checkout
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- run: rustup toolchain install stable --profile minimal
- name: Install cargo-audit
run: cargo install cargo-audit --locked
- run: cargo audit
govulncheck:
name: govulncheck (${{ matrix.module }})
runs-on: ubuntu-latest
permissions:
contents: read # checkout
strategy:
fail-fast: false
matrix:
# Both Go modules need an independent scan: they share the
# workspace but each has its own go.mod / go.sum.
module: [go/ressrf, go-native/ressrf]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: ${{ matrix.module }}/go.mod
cache-dependency-path: ${{ matrix.module }}/go.sum
- name: Install govulncheck
# setup-go sets GOTOOLCHAIN=local. Latest govulncheck may need a
# newer compiler than the module pin, so let the install step
# fetch one. The scan below still uses the module's toolchain.
env:
GOTOOLCHAIN: auto
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run govulncheck
working-directory: ${{ matrix.module }}
run: govulncheck ./...