Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.sandbox.policy

Canonical immutable security-policy snapshots and their model-facing view.

A snapshot is created once for a root environment, inherited unchanged by child environments, and replaced only by an explicit environment rebuild. Enforcement and context both derive from this value.

Canonical immutable security-policy snapshots and their model-facing view.

A snapshot is created once for a root environment, inherited unchanged by
child environments, and replaced only by an explicit environment rebuild.
Enforcement and context both derive from this value.
raw docstring

access-viewclj

(access-view policy workspace-roots)

Build the string-keyed model context from the exact enforcement snapshot. workspace-roots are the live session overlay; configured grants remain immutable. Paths under HOME render as ~/… without changing enforcement.

Build the string-keyed model context from the exact enforcement snapshot.
`workspace-roots` are the live session overlay; configured grants remain
immutable. Paths under HOME render as `~/…` without changing enforcement.
sourceraw docstring

draft-policiesclj

(draft-policies policy)

Canonical {root-path -> draft policy} for catalog roots that opt out of the default :shared isolation. Empty for a catalog that declares no draft key.

Canonical `{root-path -> draft policy}` for catalog roots that opt out of the
default `:shared` isolation. Empty for a catalog that declares no `draft` key.
sourceraw docstring

extension-grantclj

(extension-grant ext-name grant {:keys [home vis-home]})

Check one filesystem grant from an extension declaration and return {:path :mode :reason}, or throw. grant has the wire keys path, mode and reason. The path must be absolute after ~ expansion. The checks use its resolved form, but the grant keeps the path as declared, so the jail can follow its links. A grant must not cover the filesystem root, the home directory or vis-home: these hold the user's files and the Vis credentials.

Check one filesystem grant from an extension declaration and return
`{:path :mode :reason}`, or throw. `grant` has the wire keys `path`, `mode` and
`reason`. The path must be absolute after `~` expansion. The checks use its
resolved form, but the grant keeps the path as declared, so the jail can follow
its links. A grant must not cover the filesystem root, the home directory or
`vis-home`: these hold the user's files and the Vis credentials.
sourceraw docstring

home-relativeclj

(home-relative path)
(home-relative path home)

Render an absolute path under HOME as ~ / ~/…; leave other paths absolute.

Render an absolute path under HOME as `~` / `~/…`; leave other paths absolute.
sourceraw docstring

no-search-rootsclj

(no-search-roots policy)

Roots excluded from the DEFAULT grep sweep; explicit paths still reach them. Catalog search: false roots stay excluded with the jail on or off. With the jail disabled, host filesystem roots are also excluded so granting unrestricted explicit access does not make an unscoped grep crawl the machine.

Roots excluded from the DEFAULT grep sweep; explicit paths still reach
them. Catalog `search: false` roots stay excluded with the jail on or off. With
the jail disabled, host filesystem roots are also excluded so granting
unrestricted explicit access does not make an unscoped grep crawl the machine.
sourceraw docstring

outside-write-rulesclj

(outside-write-rules policy rules extra-roots)

The resolved write rules that policy cannot grant: with the jail on, a rule whose directory lies outside every writable root of policy and extra-roots. A disabled jail writes everywhere that no deny rule closes.

The resolved write rules that `policy` cannot grant: with the jail on, a rule whose
directory lies outside every writable root of `policy` and `extra-roots`. A disabled jail
writes everywhere that no deny rule closes.
sourceraw docstring

read-write-rootsclj

(read-write-roots policy)

Filesystem roots available read/write to common model tools. With the jail enabled this is the configured allowlist. A disabled jail adds every host filesystem root, but the configured catalog keeps leading it: a named project root stays a root of its own, with its guidance and its default search scope.

Filesystem roots available read/write to common model tools. With the jail
enabled this is the configured allowlist. A disabled jail adds every host
filesystem root, but the configured catalog keeps leading it: a named project
root stays a root of its own, with its guidance and its default search scope.
sourceraw docstring

resolve-rulesclj

(resolve-rules rules base-dir home)

Resolve path rules to canonical absolute patterns, like the configured deny rules. A relative rule resolves against base-dir; a missing tail stays, so a rule can name a file that does not exist yet.

Resolve path rules to canonical absolute patterns, like the configured deny rules. A
relative rule resolves against `base-dir`; a missing tail stays, so a rule can name a
file that does not exist yet.
sourceraw docstring

restrictclj

(restrict policy {:keys [write read_only deny]})

Narrow policy, the parent's policy, with a subagent file grant. files holds the :write, :read_only and :deny rules. Each rule also covers files that are created later. :write limits writes to its rules: other writable roots stay readable only. A write rule that policy cannot grant grants nothing.

Narrow `policy`, the parent's policy, with a subagent file grant. `files` holds the
`:write`, `:read_only` and `:deny` rules. Each rule also covers files that are created
later. `:write` limits writes to its rules: other writable roots stay readable only. A
write rule that `policy` cannot grant grants nothing.
sourceraw docstring

rule-rootclj

(rule-root rule)

The directory that an OS sandbox can grant for one write rule: a literal rule itself, or the literal ancestor directory of a glob.

The directory that an OS sandbox can grant for one write rule: a literal rule itself, or
the literal ancestor directory of a glob.
sourceraw docstring

snapshotclj

(snapshot config)
(snapshot config
          {:keys [base-dir home]
           :or {base-dir (System/getProperty "user.dir")
                home (System/getProperty "user.home")}})

Build the immutable canonical security policy from validated string-keyed configuration. Relative and home-relative paths become absolute; symlinks are resolved at this boundary. Recognized host Java installations are process-only read grants, excluded from default searches unless already explicitly granted.

Build the immutable canonical security policy from validated string-keyed
configuration. Relative and home-relative paths become absolute; symlinks are
resolved at this boundary. Recognized host Java installations are process-only
read grants, excluded from default searches unless already explicitly granted.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close