Skip to content

R4 Compliance Scanner

Andrew Paolucci edited this page Nov 28, 2026 · 1 revision

R4 Compliance Scanner (e2e-r4 — 56 Rules)

e2e-r4 enforces the strict R4 non-credential, non-hooking, clean-room boundary across all 13 public GUAP code workspaces (guap, guap-kit, guap-e2e, forensics2rust, sys2rust, net2rust, fs2rust, winctl2rust, mail2rust, mail2mail, chrome2rust, android2rust, and robocopy2rust) before release.


1. The Five Inspection Surfaces

  1. Filesystem, Manifests & Scripts (surface_fs.rs): Audits Cargo.toml dependencies and source/script files (.rs, .py, .ps1, .sh, .c, .h, .ts, .js) across all 13 target GUAP workspaces (excluding guap-e2e and e2e_harness self-definitions, with generic directory exclusion support via --exclude-dir, R4_EXCLUDE_DIRS, and .r4ignore).
  2. Rust AST Taint Analysis (rust_ast.rs): Uses syn to inspect concrete Rust AST symbols, FFI extern blocks, and constant bitflags without fragile regex false positives.
  3. Compiled Binary String Scans (surface_bin.rs): Inspects built PE (.exe/.dll), ELF (\x7fELF, .so/.so.<ver>), and Mach-O (32/64-bit and universal/fat .dylib/executables) binaries for both ASCII and UTF-16LE prohibited imports/strings.
  4. Live CLI Probing (surface_cli_mcp.rs): Probes top-level and subcommand --help trees across compiled executables and Python scripts (mail2mcp.py) to ensure no prohibited subcommands appear.
  5. Live MCP Schema & Dispatch Probing (surface_cli_mcp.rs): Verifies mcp --tools JSON schemas and runtime responses expose zero credential-dumping or process-injection tools.

2. Rule Families (56 Rules Total: 55 Compiled Rules + 1 Baseline Rule)

  • Credential & Plaintext Secret Prohibitions (R4-CRED-01..02, R4-API-CRED-01..08): Blocks cred2rust, password/secret dumping, CryptUnprotectData, VaultEnumerateItems, CredEnumerateW, CredReadW/CredReadDomainCredentialsW, LsaRetrievePrivateData, LsaOpenSecret, WLAN_PROFILE_GET_PLAINTEXT_KEY (0x0000_0004), and unredacted <keyMaterial>.
  • Injection, API Hooking & Process Hollowing Prohibitions (R4-INJ-01..06): Blocks CreateRemoteThread, NtCreateThreadEx, QueueUserAPC, external-DLL SetWindowsHookExW, cross-process WriteProcessMemory, SetThreadContext, NtUnmapViewOfSection/ZwUnmapViewOfSection, Detours/minhook/IAT patching, and RunAsDate.
  • Retired Legacy Tool Exclusions (R4-LEGACY-01..39): Verifies zero re-introduction of any of the 39 permanently excluded legacy Windows utilities.
  • R4-BASELINE-CHROME: Tracks documented pre-existing classification-only references without permitting regressions.