Expand description
Unified, human-facing view of lean-ctx’s two independent security planes:
- Containment — the path jail + shell-command gating. Protects the machine from the agent (what files a tool may touch, what binaries the shell may run).
- Secret-exfiltration defense — secret/
.envredaction. Protects your secrets from the LLM provider (API keys masked before they reach the model).
These are orthogonal by design: a usability-first user can drop containment
(lean-ctx yolo) while still never leaking credentials to the provider, and
vice-versa. This module is the single source of truth both the
lean-ctx security command and lean-ctx doctor read from, so the CLI
status screen and the doctor board can never disagree.
It is a pure read of config + env (no side effects), which keeps it cheap to call and safe to use inside deterministic output paths.
Structs§
- Security
Posture - A snapshot of every security-relevant switch, resolved exactly the way the runtime enforces it (env → config → secure default).
Enums§
- Jail
State - Effective state of the filesystem path jail.
- Posture
Level - Coarse, derived label summarising the whole posture for at-a-glance display.