Skip to content

Security and Stability

Andrew Paolucci edited this page Dec 2, 2026 · 3 revisions

Security & Stability Considerations (guap-kit)

Because guap-kit processes untrusted disk, registry, network, browser, and mobile evidence across nine downstream Rust suites, security hardening lives at the lowest shared layer:

  1. Memory-Safe Parsing (#![forbid(unsafe_code)]): guap-table, guap-export, guap-gui-iced, and guap-mcp completely forbid unsafe code at the crate root. Windows FFI is confined strictly to guap-gui-win32's native-host module.
  2. Adversarial Query Resilience (guap-table): GuapQuery bounds AST expression depth and regex matching safely, preventing stack exhaustion and integer-to-float precision loss (> 2^53).
  3. Spreadsheet & Browser XSS Defense (guap-export): Neutralizes CWE-1236 formula triggers (=, +, -, @, \t, \r, including after whitespace/BOM) in CSV/TSV exports and locks HTML reports behind strict offline Content-Security-Policy headers (default-src 'none').
  4. Custody Tamper-Evidence (guap-export): Pairs dual SHA-256 + SHA-512 file hashing with deterministic binary Merkle trees (RFC 6962 0x00/0x01 domain separation in StrictV2) so any byte change in an exported report invalidates the root hash.
  5. Fail-Closed AI Automation, Schema Validation & Protected Roots (guap-mcp): Defaults PolicyGate to PolicyMode::ReadOnlyOnly, evaluates -32003 (POLICY_DENIED) and validate_write_paths against protected_roots before -32602 (INVALID_PARAMS) schema checks (validate_against_schema), gates guap/rollback on restorable == true, and persists RollbackStore directories with 0700 Unix permissions (0600 atomic temp files) and strict snapshot_id traversal validation.
  6. RDP / Elevated Admin Stability (guap-gui-win32): Avoids WebView2, Chromium, and GPU driver dependencies so administrator forensic sessions over Windows Server RDP remain responsive and crash-free, while enforcing ForensicCaseLock and UsbForensics read-only locks inside GuapShellState.

Clone this wiki locally