# Threat model ## Assets Assets within Camlet's product boundary include AT Protocol refresh credentials, short-lived access tokens, SSH-controlled Git operations, repository metadata, private local paths, source changes, and authority/provenance information. ## Trust boundaries - command-line and standard-input data; - repository-controlled configuration and Git remotes; - PDS, Bobbin, knot, appview, and Spindle endpoints; - redirects, DNS, TLS, proxies, and untrusted response bodies; - local `git`, `jj`, `rad`, keyring, and browser-launch executables; - terminal, logs, JSON output, diagnostics, and crash reporting; - synchronization between separately writable source hosts. ## Security invariants - Credentials are bound to an expected origin and are never forwarded on redirects. - Bobbin reads are unauthenticated unless the protocol operation explicitly requires authentication. - Response size and content type are validated before decoding. - External processes use argv execution without a shell. - Repository configuration cannot choose arbitrary executables. - Executables are resolved only from absolute `PATH` entries and are constrained to an internal allowlist. - Delegated Git and Jujutsu processes receive a minimal environment. Tool-specific control variables, including `GIT_*`, `JJ_*`, and SSH command overrides, are not inherited. - Read-only Git inspection disables optional locks, hooks, and filesystem monitors; Jujutsu inspection ignores the working copy so it does not snapshot repository state. - Process execution has a timeout, bounded stdout and stderr, null standard input, and typed failures. - Raw remote URLs remain inside the inspection boundary and are never rendered; only validated derived repository identities enter output. - Plaintext credential persistence is disabled by default. - Diagnostic data is local by default and explicitly exported after redaction. - Synchronization uses expected-old-commit guards and stops on divergence. - The supported `repo view` profile accepts only `did:plc` identities resolved through the fixed `plc.directory` origin. - Network-discovered services must be HTTPS origin-only endpoints. Redirects, proxies, netrc, credentials, cookies, response retries, and compressed response decoding are disabled. A request may try another already validated DNS address only when no response was received from the preceding address. - Every service hostname is resolved under a monotonic operation deadline. All returned addresses are checked against explicit IPv4 special-purpose ranges and the IANA allocated IPv6 unicast prefixes with special-purpose exclusions. Each allowed address may be attempted under the shared deadline after a connection failure. Every attempted address is pinned for its connection, and the actual peer is checked again before an HTTP request is sent. - Response headers and bodies are bounded. Content type, content encoding, duplicate trust-critical JSON keys, and cross-authority repository identities are validated before output. ## Read-only command boundaries `camlet context` executes allowlisted local Git and Jujutsu programs and remains offline. `camlet repo view` and `camlet repo list` perform credential-free public HTTPS reads through PLC, knot, and owner-PDS authorities. `camlet issue list` performs credential-free public HTTPS reads against an explicit Bobbin origin and labels its result as an aggregated observation that cannot prove absence. `camlet issue view` additionally reads the base issue and accepted related records from their author PDS services, verifies the referenced repository through the existing PLC, knot, and owner-PDS chain, and rejects cross-authority disagreement. Its Bobbin relation set still cannot prove absence. These command paths do not intentionally mutate repository state or persist credentials. Authenticated and write-capable commands require threat-model coverage before they are introduced.