Skip to content

Security: SecurityRonin/shellhist-forensic

Security

SECURITY.md

Security Policy

shellhist-forensic is designed to parse untrusted shell command-history files — including those acquired from compromised or actively hostile systems. Hostile input is the expected case, not an edge case. Robustness against crafted history files, malformed records, and garbled encodings is a core design goal, and we take reports of crashes, hangs, or memory-safety issues seriously.

Supported versions

Version Supported
0.1.x ✅ — current release line, receives security fixes
< 0.1 ❌ — pre-release, unsupported

Security fixes are released against the latest published 0.1.x line.

Reporting a vulnerability

Do not open a public GitHub issue for a security vulnerability.

Report privately, by either:

Please include:

  • the affected version and target triple,
  • a minimal reproducing history file or byte buffer (a fuzz corpus entry is ideal),
  • the observed behaviour (panic, hang, excessive allocation, mis-parse) and the expected behaviour.

We aim to acknowledge a report within a few business days and to coordinate disclosure once a fix is available.

Security posture

shellhist-forensic is hardened against adversarial input by construction:

  • #![forbid(unsafe_code)] across both crates — no unsafe, no C bindings, no FFI, anywhere.
  • No panics on malicious input — parsing is lenient (lossy UTF-8) and bounds-checked; a truncated or garbled file degrades to plain lines rather than crashing. Arithmetic is checked or saturating.
  • Bounded reads — line and record scanning is bounded; the reader refuses to spin on a non-terminating record.
  • Fail loud where it matters — a genuine error surfaces with context rather than as a silent default or a silently-wrong parse.

Fuzzing

Continuous fuzzing with cargo-fuzz backs the hardening above. Five targets cover the parsers that consume attacker-controlled bytes:

Target Surface
bash bash history: plain, #<epoch> timestamps, multi-line commands
zsh zsh EXTENDED_HISTORY records + backslash continuation
fish fish nearly-YAML record parsing + unescape
powershell PowerShell PSReadLine backtick continuation
forensic the full parse → audit pipeline

Panics found by fuzzing are fixed and pinned as regression tests.

For how to run the targets yourself, see CONTRIBUTING.md.

There aren't any published security advisories