supply-chain: honest self-attestation posture (dep-scan, build provenance, install guard)
dep-scan.sh: capture govulncheck's real exit code and feed the reachability gate only on exit 0 (clean) or 3 (vulns found). Any other exit (crash, timeout, 137) is now INFRA, so a truncated-but-parseable JSON stream can no longer parse clean and yield a falsely attested posture. npm ci / npm audit / cargo audit stderr is captured and surfaced on failure (no more 2>/dev/null). Dockerfile: the posture-builder stage no longer curl|sh's rustup.rs. The Rust toolchain is COPY --from=rust:1-bookworm (canonical official image, same base as desktop-builder) with RUSTUP_HOME/CARGO_HOME set -- stronger provenance than TLS-TOFU rustup, no pipe-to-shell inside the stage that produces the attestation. docker compose build will validate the new layer. linux.sh.tmpl: guard the posture check under set -e so an un-attested (exit 3) or blocked (exit 4) verdict degrades honestly instead of aborting the install before POSTURE_RC is captured. ETHOS #1 (errors are history), #3 (assume failure). CI-002 + CI-003.
This commit is contained in:
parent
8ee6d001f3
commit
e0765c29f4
3 changed files with 66 additions and 20 deletions
|
|
@ -517,8 +517,15 @@ if blocked:
|
|||
if not p.get("attested"):
|
||||
sys.exit(3)
|
||||
POSTURE_EOF
|
||||
# set -e is active (line 8); capture the posture rc the same way the manifest
|
||||
# block above does (479-482). Without this guard, the python's exit 3 (un-attested)
|
||||
# or 4 (blocked) aborts the script before POSTURE_RC is ever assigned — turning the
|
||||
# designed "warn on un-attested" into a hard install refusal and negating the
|
||||
# offline-degrades-honestly posture the build emits.
|
||||
set +e
|
||||
python3 "$POSTURE_CHECK" "$TMP_MANIFEST"
|
||||
POSTURE_RC=$?
|
||||
set -e
|
||||
rm -f "$POSTURE_CHECK"
|
||||
if [ "$POSTURE_RC" = "4" ]; then
|
||||
rm -f "$TMP_MANIFEST"
|
||||
|
|
|
|||
Loading…
Reference in a new issue