Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Threat model

What rlg trusts, what it does not, and what protects each boundary. Written for 0.0.21; update it with every change to a boundary. Report a weakness privately, as SECURITY.md describes.

Assets

  • Log integrity: a record says what the application logged, and no input can forge a record, a field or a journal entry.
  • Confidentiality of log content: secrets and personal data that reach a log stay where the operator sends them.
  • Confidentiality of the host: tools that read logs (rlg-mcp, rlg-cli, rlg-report) do not become a way to read other files.
  • Availability of the application: logging never blocks or crashes the caller; overload drops records and counts them.
  • Release integrity: what users install is what this repository built and signed.

Trust boundaries

#BoundaryUntrusted inputProtectionStatus
1Application to rlgMessage text, attribute keys and values, component, timeEvery text format escapes controls and its delimiters (log/escape.rs); JSON formats escape every control character; fuzzed by render_one_line0.0.21
2rlg to journaldThe formatted recordBinary field framing for values with newlines (sink/journal.rs); fixed PRIORITY and SYSLOG_IDENTIFIER0.0.21
3rlg to filesPaths from configFiles created 0640, directories 0750; rotation never replaces an archive. Symlink refusal and retention limits: 0.0.22Partial
4Config and environment to rlgTOML files, RLG_* and OTEL_* variablesConfig validation; env_vars values hidden from Debug and diff; OTLP endpoints refused unless printable ASCII; OTEL_EXPORTER_OTLP_HEADERS decoded and checked for line breaks0.0.21
5rlg-otlp to a collectorCollector responsesBounded response head (16 KiB), status line only, per-request deadline covering DNS, connect and read; plain http:// only, to a local collector (ADR 0015)0.0.21; TLS in WP-X1
6MCP clients to rlg-mcpTool arguments (paths, globs, counts), HTTP requestsReads only regular files under the log root (--root), with one refusal message; 64 MiB per file, 1 MiB per line, 10,000 records, 1,000 glob matches; Host and Origin checks, loopback bind by default (warning otherwise), session cap, 1 MiB message cap, stdin line cap. Required --root and a token for remote binds: 0.0.220.0.21
7HTTP clients to rlg-towerRequest path, trace headerTrace header kept only when it is a traceparent or a short plain id; path logged without the query0.0.21
8Log files to rlg-cli and rlg-reportRecords read from diskParsed with serde_json into typed records; terminal escaping of output is planned (plan WP-D2)Partial
9Dependencies and CI to releasesCrates, actions, tools, base imagescargo deny (advisories, yanked, bans, sources), cargo vet, SHA-pinned actions, pinned and checksummed tools, digest-pinned distroless images, signed tags, Sigstore signatures, SLSA provenance, signed container image with SBOM0.0.21

Out of scope

  • An attacker who can run code as the application’s user: they can write any log line and read any file the application can.
  • Confidentiality on the network between rlg-otlp and a non-local collector: the exporter has no TLS; run a collector on the same host or pod (ADR 0015) until WP-X1 adds TLS.
  • Denial of service by the application itself logging faster than the sink can write: records are dropped and counted, by design.

Assumptions

  • The OpenTelemetry Collector rlg-otlp sends to is operated by the same party as the application.
  • Log readers (people, SIEMs, journalctl) treat a record as data and do not execute it.
  • The unsafe code listed in SECURITY.md is reviewed with every change to it.