This commit was merged in pull request #296.
This commit is contained in:
1 parent
cc3a9c7130
commit
06d2f458e6
17 files changed
+458
-89
No files matched your search
@@ -81,6 +81,34 @@ address is refused.
|
||||
aimed at `10.x` PLCs on purpose, so it sets `PW_ALLOW_PRIVATE_TARGETS=1`. A
|
||||
hardened cloud deployment ignores that variable — it shares a network with the
|
||||
platform's own services.
|
||||
## What the scanner runs on your code
|
||||
|
||||
Nearly every stage only *reads* your code: Semgrep, gitleaks, Syft, Ruff and the
|
||||
PLC parser parse files and never execute them. Four stages are different, because
|
||||
the tool has to run the project to do its job:
|
||||
|
||||
| Stage | What it executes |
|
||||
|---|---|
|
||||
| `cargo clippy` | compiles the crate, so `build.rs` and proc macros run |
|
||||
| ESLint | the repository's own `node_modules/.bin/eslint`, with JavaScript config files |
|
||||
| `pip-compile` | builds source distributions to read their metadata, running `setup.py` |
|
||||
| Firmware reproducible build | the project's build system, through Nix |
|
||||
|
||||
In a shared deployment those stages are **off**: the scanner holds many
|
||||
tenants' data, and a lint warning is worth less than the blast radius of
|
||||
running a stranger's build. Lockfile-based dependency resolution still happens —
|
||||
npm runs with `--ignore-scripts`, and `cargo generate-lockfile` and
|
||||
`cargo metadata` resolve without compiling — so your SBOM is unaffected. For a
|
||||
complete firmware SBOM, build with Firmwerk on your side and import the bundle.
|
||||
|
||||
A single-tenant or sandboxed deployment can turn them on with
|
||||
`PW_ALLOW_UNTRUSTED_CODE_EXEC=1`; a hardened deployment ignores it. The stages
|
||||
return later as sandboxed Werkbank jobs.
|
||||
|
||||
Every external tool also runs with an empty environment apart from a short
|
||||
allowlist (`PATH`, `HOME`, `TMPDIR`, and its own cache variables), so the
|
||||
agent's credentials are not visible to it, and it is killed when its timeout
|
||||
expires.
|
||||
|
||||
## Deduplication and Fingerprinting
|
||||
|
||||
|
||||
Reference in new issue
Block a user