Remote Process Scan Deep Dive
This document describes the current remote process scan architecture and integration points.
1. Scope#
This document describes the current remote process scan architecture and integration points.
It covers:
- Config and mode gates.
- Verdict correlation model.
- Telemetry and runner enforcement behavior.
- Current implementation depth and next hardening steps.
Primary implementation anchors:
security/processscan_types.gosecurity/processscan_config.gosecurity/processscan_correlator.gosecurity/processscan_manager.gosecurity/processscan_windows.gorunner/runner.go
2. Control Surface#
There is none. Remote process scanning is off in every shipped binary and
cannot be turned on from outside the process. The whole model lives in
remoteScanConfigState, a package-level RemoteScanConfig in
security/processscan_config.go, written only by
SetRemoteScanConfigForTesting. Mutant takes no configuration from environment
variables, and no flag has been added for this subsystem yet. See
CONFIGURATION_POLICY.md.
The fields, and what they hold in a shipped binary:
Enabled--false. Master gate for manager execution.isRemoteProcessScanEnabled()returns it, soRunRemoteProcessScanreportsenabled=falseand the runner skips enforcement entirely.Mode--observe.
off: disabled path.observe: telemetry only.enforce: policy block on critical verdict.
ResolveRemoteScanConfig coerces any unrecognised value back to observe.
Allowlist-- empty. Process names to skip;parseRemoteProcessAllowlisthas no source to read from and returns an empty set. It remains as the seam a future--scan-allowlist <file>would fill.HighRiskScore/CriticalScore--70/85, the scores where the "high" and "critical" risk bands start.ResolveRemoteScanConfigraisesCriticalScoretoHighRiskScoreif a caller sets them inverted.
A process cap and a scan interval were fields here until 2.6.0, and nothing read either one.
The Enabled: true paths documented in the rest of this file are exercised by
tests, which set the config directly. They are not reachable by an operator.
3. Data Model#
Core types:
RemoteProcessTarget
PID,Name,Executable
RemoteProcessSignal
Name,Detected,Weight,Confidence,Detail,Evidence
ProcessRiskVerdict
PID,Name,FinalScore,RiskBand,Signals
RemoteScanConfig
- gate flags, thresholds, scope tuning, and allowlist
4. Correlation Logic#
CorrelateProcessSignals rules:
- Sum only weights where
Detected=true. - Cap final score at
100. - Assign risk band from score:
<40->low40..69->medium70..84->high>=85->critical
Normalization behavior:
- If scanner returns verdicts with raw signals but no score, manager computes normalized score and band.
- If scanner already returns score-only verdicts, manager preserves score and backfills risk band.
5. Manager Execution Flow#
RunRemoteProcessScan(stage) behavior:
- Resolve config from env.
- Exit with
enabled=falsewhen disabled or mode isoff. - Record invocation telemetry.
- Execute platform scanner (
scanRemoteProcesses). - On scanner error:
- Record
remote_process_scan_errortelemetry. - Return error with
enabled=true.
- Normalize verdicts and emit score-band telemetry.
Telemetry events emitted by manager:
remote_process_scan_invokedremote_process_scan_errorremote_process_suspiciousremote_process_critical
6. Runner Enforcement Semantics#
Runner path:
- Called in anti-rev pipeline after local process protection probes.
- Executed at both
pre-decodeandpre-executionstages.
Decision behavior:
observemode:
- Never blocks execution.
- Keeps telemetry for visibility.
enforcemode:
- Blocks only when any verdict score is
>= CriticalScore. - High but non-critical verdicts are advisory.
- Scanner errors:
- Non-blocking.
- Still counted in telemetry.
7. Current Implementation Depth#
Implemented:
- Types/config parsing with safe defaults.
- Correlator and risk-band mapping.
- Telemetry integration.
- Runner observe/enforce policy integration.
- Unit coverage for config, correlator, manager, and runner behavior.
Current limitation:
ScanRemoteProcessesWindowsis currently a safe no-op returningnil, nil.- This means manager and policy plumbing are production-wired, while detector signal depth is not yet implemented.
8. Hardening Backlog#
Recommended next increments:
- Implement Windows process enumeration and target filtering.
- Add module/memory/thread/hook inspectors that emit weighted signals.
- Add score calibration fixtures to control false positives.
- Extend coverage with platform-specific integration tests.
- Add per-verdict evidence export path for incident workflows.