Smith::Sandbox::Policy
Inherits Struct < Value < Object
Constructors
new(enabled : Bool = false, auto_approve : Bool = false, required : Bool = false, network : Network = Network::Allow, ports : Array(Int32) = [] of Int32, write : Array(String) = [] of String, write_defaults : Bool = true, deny_read : Array(String) = [] of String, unsandboxed : Array(String) = [] of String)
SourceClass methods
parse_network(raw : String | Nil) : Tuple(Network, Array(Int32))
"allow" | "deny" | "ports:443,80". An unreadable value falls back to the default rather than failing the start — the same posture the rest of the config takes.
Instance methods
auto_approve?
Sourcedeny_read
Sourceenabled?
Sourcenetwork
Sourceports
Sourcerequired?
Sourceunsandboxed
Command prefixes that run outside the sandbox. git push and
npm install are the everyday reasons someone would otherwise turn the
whole thing off.
write
Sourcewrite_defaults?
Whether DEFAULT_WRITE_PATHS still apply. write adds to them rather
than replacing them: the first path somebody adds must not be the moment
their build stops working.