Untrusted customer code runs as root with every secret in the environment: clippy build scripts, the repository's own eslint binary, npm install scripts and the Nix build with sandbox=false. The MVP decision is that this is off in production — firmware builds belong to Firmwerk, and these capabilities return later as sandboxed Werkbank jobs.
What to change
A production flag disables pipeline/lint/clippy.rs and lint/eslint.rs (which executes the repo's own node_modules/.bin).
Disable npm install, cargo generate-lockfile and cargo metadata in pipeline/sbom/mod.rs:57,112,141. Read lockfiles only, or use --ignore-scripts.
Disable the firmware Nix build in pipeline/firmware_sbom.rs / orchestrator.rs:1001-1036. Keep firmwerk_coredetect.
Every remaining subprocess gets env_clear() plus a PATH/HOME allowlist, kill_on_drop(true) and a timeout.
Acceptance
With PW_FEATURES=source_only / APP_ENV=production, no scan stage executes code from the customer repository; the affected stages report skipped with a reason instead of failing the run.
SBOM extraction works from lockfiles alone on the demo targets, with the golden baselines unchanged or updated deliberately.
No subprocess inherits the agent environment: a test asserts env_clear() and the allowlist.
Every subprocess has a timeout and kill_on_drop(true); no orphaned child survives a cancelled scan.
Nix is not invoked at all on the production path (image change tracked in MVP-0.8).
## Goal
Untrusted customer code runs as root with every secret in the environment: clippy build scripts, the repository's own eslint binary, `npm install` scripts and the Nix build with `sandbox=false`. The MVP decision is that this is **off in production** — firmware builds belong to Firmwerk, and these capabilities return later as sandboxed Werkbank jobs.
## What to change
- A production flag disables `pipeline/lint/clippy.rs` and `lint/eslint.rs` (which executes the repo's own `node_modules/.bin`).
- Disable `npm install`, `cargo generate-lockfile` and `cargo metadata` in `pipeline/sbom/mod.rs:57,112,141`. Read lockfiles only, or use `--ignore-scripts`.
- Disable the firmware Nix build in `pipeline/firmware_sbom.rs` / `orchestrator.rs:1001-1036`. Keep `firmwerk_core` *detect*.
- Every remaining subprocess gets `env_clear()` plus a PATH/HOME allowlist, `kill_on_drop(true)` and a timeout.
## Acceptance
- [ ] With `PW_FEATURES=source_only` / `APP_ENV=production`, no scan stage executes code from the customer repository; the affected stages report `skipped` with a reason instead of failing the run.
- [ ] SBOM extraction works from lockfiles alone on the demo targets, with the golden baselines unchanged or updated deliberately.
- [ ] No subprocess inherits the agent environment: a test asserts `env_clear()` and the allowlist.
- [ ] Every subprocess has a timeout and `kill_on_drop(true)`; no orphaned child survives a cancelled scan.
- [ ] Nix is not invoked at all on the production path (image change tracked in MVP-0.8).
sharang
added this to the Production MVP milestone 2026-09-20 20:16:03 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Goal
Untrusted customer code runs as root with every secret in the environment: clippy build scripts, the repository's own eslint binary,
npm installscripts and the Nix build withsandbox=false. The MVP decision is that this is off in production — firmware builds belong to Firmwerk, and these capabilities return later as sandboxed Werkbank jobs.What to change
pipeline/lint/clippy.rsandlint/eslint.rs(which executes the repo's ownnode_modules/.bin).npm install,cargo generate-lockfileandcargo metadatainpipeline/sbom/mod.rs:57,112,141. Read lockfiles only, or use--ignore-scripts.pipeline/firmware_sbom.rs/orchestrator.rs:1001-1036. Keepfirmwerk_coredetect.env_clear()plus a PATH/HOME allowlist,kill_on_drop(true)and a timeout.Acceptance
PW_FEATURES=source_only/APP_ENV=production, no scan stage executes code from the customer repository; the affected stages reportskippedwith a reason instead of failing the run.env_clear()and the allowlist.kill_on_drop(true); no orphaned child survives a cancelled scan.