Skip to content

Harden dependency provenance, operator surfaces, and runtime guards - #1

Open
dbowm91 wants to merge 1 commit into
mainfrom
audit/security-followups-006-009
Open

dbowm91 wants to merge 1 commit into
mainfrom
audit/security-followups-006-009

Conversation

@dbowm91

@dbowm91 dbowm91 commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR carries the dependency refresh already staged on the working tree plus the security-audit follow-ups from plans 006 and 009.

Dependency refresh

  • fancy-regex 0.20, sha2/sha1 0.11, md5 0.8, toml 1.2, toml_edit 0.25, unicode_names2 4.0.
  • Eggup pin moves to fe763189, whose graph resolves zip 9.6.1.
  • Config/Cargo inspection and text/calc call sites adapted to the new APIs.

Audit follow-ups

  • 006 — dependency provenance and source policy: deny.toml allow-lists exactly the reviewed Eggup repository; scripts/check-dependency-provenance.py scans every dependency table and fails the release gate fast; docs updated. cargo package remains intentionally blocked until 007.
  • 009 — operator-surface hardening: absolute %SystemRoot% PowerShell resolution with fail-closed path validation; Unix staging directories created 0700; Windows claude/vscode render JSON config blocks instead of cmd.exe one-liners.
  • 009 — runtime safety guards: single compile_fancy construction point with 250k backtrack / 4 MiB delegate limits; schema-pattern errors propagate through config_preflight; unsafe_code = "deny" with two narrow allows.
  • 007/008: registered with evidence; 007 is blocked on an Eggup registry release (eggup-archive 0.2.0 still requires zip ^6.0.0), 008 is ADR-0002-gated and not implemented.

Test plan

  • cargo fmt --all -- --check
  • cargo run --locked --features dev-tools --bin generate-docs -- --check
  • cargo clippy --locked --all-targets --all-features -- -D warnings
  • cargo test --locked --all-features -- --skip parity --test-threads=4
  • cargo test --locked --doc
  • cargo deny check advisories bans licenses sources
  • python3 scripts/check-dependency-provenance.py --self-test (10/10)
  • python3 scripts/check-dependency-provenance.py exits 1 by design, naming plan 007

Notes

  • Windows behavior was reviewed statically; no native Windows execution was performed.
  • cargo package still exits 101 until 007 lands.
  • scripts/release-check.sh requires a clean tree and is covered by the equivalent individual gate commands above.

Dependency refresh carried in this change:
- fancy-regex 0.20, sha2/sha1 0.11, md5 0.8, toml 1.2, toml_edit 0.25,
  unicode_names2 4.0, and the Eggup pin at fe763189 (zip 9.6.1).
- Adapt config/Cargo inspection and text/calc call sites to the new APIs.

Security audit follow-ups:
- 006: allow-list the reviewed Eggup git source and add a fail-fast
  dependency-provenance preflight to the release gate; packaging stays
  intentionally blocked until 007.
- 009 operator surface: resolve Windows PowerShell from %SystemRoot%,
  create Unix staging directories 0700 at creation, and render Windows
  claude/vscode setup as JSON config blocks.
- 009 substrate: explicit fancy-regex limits (250k backtrack steps,
  4 MiB delegate), propagate schema-pattern errors through
  config_preflight, and deny unsafe_code package-wide with two narrow
  allows.
- Register 007 (blocked on an Eggup registry release) and 008
  (ADR-0002-gated) with evidence.

Plans 006/009 are implemented; 007 is blocked and 008 is proposed.
Verified with fmt, generate-docs, clippy -D warnings, the full test
suite (skip parity, 4 threads), doc tests, cargo-deny, and the
provenance self-test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant