Skip to content

Unknown top-level config keys are silently ignored, so a typo'd denyWrite fails open with no warning #434

Description

@pearson-tfl

SandboxRuntimeConfigSchema in sandbox-config.js is not .strict() at the top level. A settings file containing "denyWriteTypo": ["/Users/me"] and "allowEverything": true loads without warning and the command runs (srt 0.0.67, macOS 26.5.2, Node v22.23.1). The boundary itself still enforces correctly, so this is not an escape – but the failure is silent. An operator who mistypes a key in filesystem.denyWrite gets a policy that appears to apply and protects nothing.

Sub-schemas already reject unknown keys (the credentials.injectHosts comment at sandbox-config.js:559 describes exactly this reasoning); the top level does not.

Suggested fix: .strict() on the top-level object, or a stderr warning naming each unrecognised key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions