struct

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)
Source

Class 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.

Source

Instance methods

auto_approve?
Source
deny_read
Source
enabled?
Source
network
Source
ports
Source
required?
Source
unsandboxed

Command prefixes that run outside the sandbox. git push and npm install are the everyday reasons someone would otherwise turn the whole thing off.

Source
write
Source
write_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.

Source