LOKI LogoLOKIv1.10.0

Security Policy (SECURITY.md)

Supported versions, vulnerability disclosure, and the 7 non-negotiable security invariants enforced by LOKI.

Supported Versions & Reporting

Security updates are provided for the latest release line (1.9.x / 1.10.x). If you discover a security vulnerability (such as a bypass of the target authorization gate, a leak of sensitive credentials in scrubbed HARs or recorded journeys, a path traversal or command injection vector, or an escape from local-only infrastructure chaos), do not open a public GitHub issue. Report it privately via [GitHub Private Vulnerability Reporting](https://github.com/MatiSca99/LOKI/security/advisories/new) (48h acknowledgment, 7d triage & remediation plan).

Core Security Guardrails & Invariants

FlagTypeDefaultDescription
A. Target Authorization Gatesafety.pyAlways enforcedensure_target_authorized() allows localhost (127.0.0.1, ::1, 0.0.0.0) without friction and blocks any remote host until confirmed interactively (typing the exact hostname) or via --authorized. Stored in .loki/authorized_targets.json (gitignored).
B. Network HAR Scrubbingscrubber.pyFail-closedNetworkScrubber.scrub_har_file() redacts auth headers, cookies, JWTs, API keys (sk-, ghp_, AIza), PEM keys, and sensitive query/body params before writing network.har. If scrubbing fails, the HAR is deleted.
C. Journey Credential Maskingrecorder.py*******loki record masks input[type='password'] and fields matching password, passwd, pwd, secret, token, api_key, apikey, cvv, cvc, credit_card, card_number, or ssn as "*******" before saving .loki/journeys/<name>.json.
D. Ephemeral Browser Sandboxsandbox.pyIsolatedEvery chaos run launches a fresh Playwright BrowserContext with zero shared cookies, localStorage, or profile state from the host user's personal browser.
E. Local-Only Infra Chaosinfra_chaos.pyLocalhost onlyloki infra (kill, pause, cpu-stress, memory-stress) acts strictly on local OS processes and local Docker containers, never remote hosts or cloud APIs.
F. Safe CodeHealer Patchinghealer.py.loki.bak + verifyCodeHealer confines file resolution inside the repository root (relative_to), creates <file>.loki.bak before patching, verifies via repro_test.py, and rolls back automatically if the crash persists.
G. AI Provider & Key Hygieneconfig.pyEnv varsAPI keys are read from environment variables (GEMINI_API_KEY or api_key_env), never hardcoded in source or committed to .loki/ artifacts.