Compare commits
1 commit
a14258b147
...
2740621fee
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2740621fee |
1 changed files with 2 additions and 14 deletions
|
|
@ -86,18 +86,12 @@ jobs:
|
||||||
#
|
#
|
||||||
# CRATES must mirror the crates named in .cargo/audit.toml. Adding an
|
# CRATES must mirror the crates named in .cargo/audit.toml. Adding an
|
||||||
# entry there without adding its crate here leaves it unguarded.
|
# entry there without adding its crate here leaves it unguarded.
|
||||||
#
|
|
||||||
# Every check echoes its result, including the passing ones. A guard that
|
|
||||||
# is silent on success cannot be told apart in the log from a guard that
|
|
||||||
# never ran — which is the same silent-skip failure mode this step exists
|
|
||||||
# to catch, one level up.
|
|
||||||
- name: Verify suppressed advisories are still unreachable
|
- name: Verify suppressed advisories are still unreachable
|
||||||
run: |
|
run: |
|
||||||
set -u
|
set -u
|
||||||
CRATES="quick-xml rsa"
|
CRATES="quick-xml rsa"
|
||||||
TARGETS="x86_64-unknown-linux-gnu x86_64-pc-windows-msvc"
|
TARGETS="x86_64-unknown-linux-gnu x86_64-pc-windows-msvc"
|
||||||
rc=0
|
rc=0
|
||||||
checks=0
|
|
||||||
for crate in $CRATES; do
|
for crate in $CRATES; do
|
||||||
for target in $TARGETS; do
|
for target in $TARGETS; do
|
||||||
# An absent crate exits 0 with empty stdout ("nothing to print"
|
# An absent crate exits 0 with empty stdout ("nothing to print"
|
||||||
|
|
@ -110,12 +104,9 @@ jobs:
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if [ -n "$out" ]; then
|
if [ -n "$out" ]; then
|
||||||
echo "FAIL: $crate is now compiled for $target — its .cargo/audit.toml suppression is no longer justified (see #310)."
|
echo "$crate is now compiled for $target — its .cargo/audit.toml suppression is no longer justified (see #310)."
|
||||||
rc=1
|
rc=1
|
||||||
else
|
|
||||||
echo "ok: $crate absent from $target"
|
|
||||||
fi
|
fi
|
||||||
checks=$((checks + 1))
|
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
# Canary: a crate known to be present. If this stops being found, the
|
# Canary: a crate known to be present. If this stops being found, the
|
||||||
|
|
@ -123,12 +114,9 @@ jobs:
|
||||||
canary=$(cargo tree --manifest-path src-tauri/Cargo.toml --locked \
|
canary=$(cargo tree --manifest-path src-tauri/Cargo.toml --locked \
|
||||||
-i tar --target x86_64-unknown-linux-gnu 2>/dev/null) || true
|
-i tar --target x86_64-unknown-linux-gnu 2>/dev/null) || true
|
||||||
if [ -z "$canary" ]; then
|
if [ -z "$canary" ]; then
|
||||||
echo "FAIL: canary 'tar' was not found although it is a known dependency. The guard is not proving anything."
|
echo "Canary failed: 'tar' was not found although it is a known dependency. The guard is not proving anything."
|
||||||
rc=1
|
rc=1
|
||||||
else
|
|
||||||
echo "ok: canary 'tar' found for x86_64-unknown-linux-gnu"
|
|
||||||
fi
|
fi
|
||||||
echo "Suppression guard: $checks checks, exit $rc"
|
|
||||||
exit $rc
|
exit $rc
|
||||||
|
|
||||||
- name: cargo test
|
- name: cargo test
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue