-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (73 loc) · 2.3 KB
/
security-audit.yml
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
75
76
77
78
79
80
81
82
name: Security audit
on:
push:
branches:
- $default-branch
pull_request:
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CLICOLOR: 1
jobs:
cargo_udep:
name: Cargo check dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust nightly
uses: dtolnay/rust-toolchain@nightly
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@main
- name: Install udeps
run: cargo binstall cargo-udeps
- name: Run udeps
run: cargo +nightly udeps
security_audit:
permissions:
issues: write # to create issues (actions-rs/audit-check)
checks: write # to create check (actions-rs/audit-check)
runs-on: ubuntu-latest
# Prevent sudden announcement of a new advisory from failing ci:
continue-on-error: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
cargo_deny:
permissions:
issues: write # to create issues (actions-rs/audit-check)
checks: write # to create check (actions-rs/audit-check)
runs-on: ubuntu-latest
strategy:
matrix:
checks:
- bans licenses sources
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check ${{ matrix.checks }}
rust-version: nightly
cargo_prusti:
name: Cargo Prusti static analysis
permissions:
issues: write # to create issues (actions-rs/audit-check)
checks: write # to create check (actions-rs/audit-check)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: viperproject/prusti-action@master
with:
path: .
cargo_Rudra:
name: Cargo Rudra check memory safety
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Rudra
uses: sslab-gatech/Rudra@master
# Possible other tools:
# https://github.com/model-checking/kani
# https://github.com/mcarton/rust-herbie-lint