How do I report a vulnerability?
Privately, through GitHub's advisory form or by the email address in rlg's security policy. Please do not open a public issue. Include a minimal reproducer, the affected version and your assessment of the impact. The policy aims to acknowledge a report within 5 business days. Only the latest published 0.0.x release receives security fixes.
Where is unsafe code allowed?
unsafe_code is denied in every crate of the workspace. The exceptions are calls across a C boundary, each in a marked module with a safety comment: syslog(3) for the macOS sink in rlg, and the thread and user ID calls in rlg-ebpf.
What limits does it put on resources?
- The ring buffer is bounded at 65,536 records; when it is full, the oldest are dropped and counted, so a burst cannot grow memory without limit.
rlg-otlpcaps a collector's response headers at 16 KiB, times out every request and refuseshttps://endpoints, since it has no TLS stack of its own.rlg-mcpreads only regular files under its log root (--root, elseRLG_MCP_ROOT, else the current directory with a warning); a path outside it, through.., an absolute path or a symlink, gets one refusal message. Reads are bounded at 64 MiB per file, 1 MiB per line (longer lines are skipped), 10,000 records per answer and 1,000 glob matches. Its HTTP transports cap a message at 1 MiB and open sessions at 64 by default.--rootbecomes required from the first release on or after 2027-02-26.- No field can forge a record: since 0.0.21 every text format escapes control characters and its own delimiters, and journald values with line breaks use the binary field form.
rlg-otlprefuses an endpoint URL with control characters, spaces or non-ASCII, and resolves DNS within the request deadline.- Log files are created
0640and directories0750on Unix, and rotation never overwrites an archive. Config'sDebugoutput andConfig::diffhideenv_varsvalues, andrlg-towerlogs a trace header only when it is atraceparentor a short plain id.- Records still in the buffer when the process is killed, before the
FlushGuardis dropped, are lost.
The threat model names every trust boundary, what protects it and what is still open.
What is checked, and how often?
| Check | What it covers | When |
|---|---|---|
| Miri | Undefined behaviour in the engine and the syslog call | Every push to main, and pull requests touching the engine |
| Loom | The shutdown handshake and the session counter under every thread interleaving | Pull requests touching the engine |
| Kani | The level conversion and the session counter, model-checked | Merges to main and weekly |
| cargo-fuzz | Five targets: record parsing, format names, config loading, redaction, rendering one line (render_one_line) | 30 seconds each when the Fuzz Smoke workflow is run by hand |
| proptest | Format output, the single-line NDJSON rule, filters | Every test run |
| cargo-semver-checks | Unannounced breaking changes | Pull requests touching the crates |
The test suite holds line coverage at 95% or more.
How is the supply chain controlled?
cargo denychecks licences, advisories and sources, over all features.cargo vetrequires every dependency to be audited, imported from a trusted audit set, or exempted with a reason.- Crates are published from CI through crates.io Trusted Publishing.
- Every release carries SPDX and CycloneDX bills of materials, signed keyless with Sigstore.
Verifying a release
For release 0.0.15 and later, each bill of materials has a Sigstore bundle beside it. With cosign 3 or later:
TAG=v0.0.23
BASE="https://github.com/sebastienrousseau/rlg/releases/download/"
for; do
done
Each file should print Verified OK. Releases up to 0.0.14 carry a .sig and a .crt per file instead; the verification runbook covers both, and how to check a release tag's SSH signature against the keys in KEYS.asc. The prebuilt binaries are listed with their SHA-256 in each release's SHA256SUMS file.
The rlg-mcp container image
Since 0.0.21 the ghcr.io/sebastienrousseau/rlg-mcp image is built with provenance and an SBOM and signed keyless with cosign. Verify it before you run it: