Skip to content

Commit f9c1454

Browse files
committed
Add cargo audit
1 parent 1e45745 commit f9c1454

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.pre-commit-audit-config.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Use a separate pre-commit config that runs only when Rust dependencies
2+
# are added, removed or modified.
3+
repos:
4+
- repo: local
5+
hooks:
6+
- id: audit
7+
name: audit
8+
language: system
9+
files: 'Cargo\.lock|Cargo\.toml$'
10+
# FIXME
11+
# RUSTSEC-2021-0131 --> https://rustsec.org/advisories/RUSTSEC-2021-0131
12+
# RUSTSEC-2021-0124 --> https://rustsec.org/advisories/RUSTSEC-2021-0124
13+
entry: cargo audit --ignore RUSTSEC-2021-0131 --ignore RUSTSEC-2021-0124
14+
pass_filenames: false
15+
16+
default_language_version:
17+
python: python3

.taskcluster.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,13 @@ tasks:
4343
rustup component add clippy rustfmt &&
4444
rustup toolchain install nightly &&
4545
curl -L https://github.com/est31/cargo-udeps/releases/download/v0.1.25/cargo-udeps-v0.1.25-x86_64-unknown-linux-gnu.tar.gz | tar xz -C /usr/local/cargo/bin --strip-components 2 &&
46+
curl -L https://github.com/rustsec/rustsec/releases/download/cargo-audit%2Fv0.16.0/cargo-audit-x86_64-unknown-linux-musl-v0.16.0.tgz | tar xzv -C /usr/local/cargo/bin --strip-components 1 &&
4647
git clone --quiet ${repository} &&
4748
cd rust-code-analysis &&
4849
git -c advice.detachedHead=false checkout ${head_rev} &&
4950
pip3 install --quiet pre-commit &&
5051
pre-commit run -a --show-diff-on-failure &&
52+
pre-commit run --show-diff-on-failure -c .pre-commit-audit-config.yaml &&
5153
cargo test --workspace --verbose --all-features &&
5254
cd enums &&
5355
cargo build --verbose --all-features"

0 commit comments

Comments
 (0)