fix(workspace): gate fixes after the security pass — warn-only advisories, drift gate sees new files, PATH guard appends, literal rm path, prctl arguments as unsigned long
check-all.sh gains a warn-only cargo deny check advisories stage (no nightly job runs yet) and the ts-rs drift gate uses git status --porcelain so a new untracked type file fails too (same in ci.yml); rust-env.sh appends an absolute ~/.cargo/bin only; wasm-build.sh removes the literal packages/core-wasm/pkg; the worker passes the unused prctl arguments as c_ulong and its SAFETY comments no longer claim the kernel checks them.
This commit is contained in:
1 parent
6e2bbec4b0
commit
e58c7be362
5 files changed
+37
-17
No files matched your search
+12
-2
@@ -15,8 +15,18 @@ stage() {
|
||||
|
||||
stage "rust: fmt, clippy, tests, ts-rs export, cargo-deny (native toolchain)"
|
||||
bash scripts/rust-check.sh
|
||||
stage "rust: committed TypeScript types match the Rust contracts"
|
||||
git diff --exit-code -- packages/core-wasm/types
|
||||
stage "rust: committed TypeScript types match the Rust contracts (no modified or new file)"
|
||||
drift="$(git status --porcelain -- packages/core-wasm/types)"
|
||||
if [ -n "$drift" ]; then
|
||||
echo "packages/core-wasm/types differs from the committed types:" >&2
|
||||
echo "$drift" >&2
|
||||
exit 1
|
||||
fi
|
||||
stage "rust: RustSec advisories (warn-only until the CI/CD step; the release gate blocks)"
|
||||
# Out of the blocking path on purpose (RUST_ARCHITECTURE_REVIEW VIII.3); printed here because
|
||||
# no nightly job runs yet. Needs the network for the advisory database.
|
||||
(cd . && . scripts/rust-env.sh && cargo deny check advisories) \
|
||||
|| echo "== advisories: findings or no network above; review before a release"
|
||||
stage "wasm: browser module (the core-wasm proofs run on it in the Node pipeline)"
|
||||
bash scripts/wasm-build.sh
|
||||
stage "node: typecheck, tests, lint, build"
|
||||
|
||||
+9
-3
@@ -1,10 +1,16 @@
|
||||
# Sourced by the Rust scripts (never executed): puts the user-level rustup toolchain on
|
||||
# PATH when the calling shell did not. Non-interactive shells skip ~/.bashrc, so editor
|
||||
# tasks, git hooks and agent shells start without ~/.cargo/bin. rustup then selects the
|
||||
# channel pinned by rust-toolchain.toml. Nothing here installs anything.
|
||||
# channel pinned by rust-toolchain.toml. Nothing here installs anything. The directory is
|
||||
# appended, never prepended (the guard only fires when no cargo is on PATH, and the system
|
||||
# tools used by the scripts must keep resolving first), and only when it is absolute.
|
||||
cargo_bin="${CARGO_HOME:-$HOME/.cargo}/bin"
|
||||
if ! command -v cargo >/dev/null 2>&1 && [ -x "$cargo_bin/cargo" ]; then
|
||||
PATH="$cargo_bin:$PATH"
|
||||
case "$cargo_bin" in
|
||||
/*) ;;
|
||||
*) cargo_bin="" ;;
|
||||
esac
|
||||
if ! command -v cargo >/dev/null 2>&1 && [ -n "$cargo_bin" ] && [ -x "$cargo_bin/cargo" ]; then
|
||||
PATH="$PATH:$cargo_bin"
|
||||
export PATH
|
||||
fi
|
||||
unset cargo_bin
|
||||
@@ -25,7 +25,7 @@ fi
|
||||
cargo build -p faunosteo-wasm --release --target wasm32-unknown-unknown --locked --features proofs
|
||||
|
||||
out=packages/core-wasm/pkg
|
||||
rm -rf "$out"
|
||||
rm -rf packages/core-wasm/pkg
|
||||
wasm-bindgen --target web --out-dir "$out" --out-name faunosteo_wasm \
|
||||
target/wasm32-unknown-unknown/release/faunosteo_wasm.wasm
|
||||
|
||||
|
||||
Reference in new issue
Block a user