|
|
Donner 0.5.1
Embeddable browser-grade SVG2 engine
|
Defense-in-depth hardening applied inside the sandbox child process immediately after startup, before it reads any untrusted input. See docs/design_docs/0023-editor_sandbox.md §"Milestone S6". More...
#include <cstddef>#include <cstdint>#include <string>Classes | |
| struct | donner::editor::sandbox::HardeningOptions |
| Knobs for which hardening measures to apply. Defaults match the "strict
production sandbox child" profile the design doc calls out. Tests and developer tools can relax individual measures — e.g., setting requireSandboxEnv = false makes the child runnable by hand under a debugger. More... | |
| struct | donner::editor::sandbox::HardeningResult |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Enumerations | |
| enum class | donner::editor::sandbox::HardeningStatus { kOk , kMissingSandboxEnv , kChdirFailed , kCloseFdsFailed , kResourceLimitFailed , kSeccompFailed } |
| Classifies the outcome of ApplyHardening. On any non-kOk status the child should exit with a usage error — hardening is all-or-nothing. More... | |
Functions | |
| HardeningResult | donner::editor::sandbox::ApplyHardening (const HardeningOptions &options={}) |
| Applies the requested hardening measures in order. Intended to be called exactly once at the start of the child's main(), after argv parsing but before reading stdin. Safe to call from multi-threaded code in theory, but the child is single-threaded by design and the caller is expected to run this before spawning any workers. | |
Defense-in-depth hardening applied inside the sandbox child process immediately after startup, before it reads any untrusted input. See docs/design_docs/0023-editor_sandbox.md §"Milestone S6".
S6.1 (this file) ships the portable hardening that works on Linux and macOS without extra dependencies:
S6.2 (follow-up): seccomp-bpf syscall allowlist on Linux, sandbox_init deny-all profile on macOS, and optional per-UID isolation. Those are intentionally out of scope for this milestone — they carry real risk of breaking the child in architecture-specific ways, and landing them behind unit tests needs more than a session's worth of iteration.
|
strong |
Classifies the outcome of ApplyHardening. On any non-kOk status the child should exit with a usage error — hardening is all-or-nothing.