2021-02-28 11:55:31 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
here="$(dirname "$0")"
|
|
|
|
src_root="$(readlink -f "${here}/..")"
|
|
|
|
|
|
|
|
cd "${src_root}"
|
|
|
|
|
2023-02-10 20:47:48 -08:00
|
|
|
# `cargo-audit` doesn't give us a way to do this nicely, so hammer it is...
|
|
|
|
dep_tree_filter="grep -Ev '│|└|├|─'"
|
|
|
|
|
|
|
|
while [[ -n $1 ]]; do
|
|
|
|
if [[ $1 = "--display-dependency-trees" ]]; then
|
|
|
|
dep_tree_filter="cat"
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2021-02-28 11:55:31 -08:00
|
|
|
cargo_audit_ignores=(
|
|
|
|
# Potential segfault in the time crate
|
|
|
|
#
|
2022-10-26 07:39:17 -07:00
|
|
|
# Blocked on chrono updating `time` to >= 0.2.23
|
2021-02-28 11:55:31 -08:00
|
|
|
--ignore RUSTSEC-2020-0071
|
2023-01-09 10:23:18 -08:00
|
|
|
|
|
|
|
# tokio: vulnerability affecting named pipes on Windows
|
|
|
|
#
|
|
|
|
# Exception is a stopgap to unblock CI
|
|
|
|
# https://github.com/solana-labs/solana/issues/29586
|
|
|
|
--ignore RUSTSEC-2023-0001
|
2023-08-14 13:01:18 -07:00
|
|
|
|
|
|
|
--ignore RUSTSEC-2022-0093
|
2021-02-28 11:55:31 -08:00
|
|
|
)
|
2023-02-10 20:47:48 -08:00
|
|
|
scripts/cargo-for-all-lock-files.sh audit "${cargo_audit_ignores[@]}" | $dep_tree_filter
|
2023-03-15 20:58:08 -07:00
|
|
|
# we want the `cargo audit` exit code, not `$dep_tree_filter`'s
|
|
|
|
exit "${PIPESTATUS[0]}"
|