You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CodexReviewer correctness finding on #781: the scanner skip was wired from a
single service-wide isolation mode (cfg.DockerIsolation.ResolvedMode()), but
isolation resolves per-server — a per-server isolation.mode overrides the
global (internal/upstream/core IsolationManager). So a server pinned to
isolation.mode:docker would wrongly have its Docker scanners skipped under a
global sandbox default, and vice versa, contradicting the per-server design and
the served docs.
Thread the scanned server's RESOLVED mode through the scan:
- ScanRequest.IsolationMode carries the per-server mode; engine.StartScan uses
effectiveIsolationMode(req) (per-server wins, else engine-wide default) and
passes it to resolveScanners(ids, mode).
- Service.SetIsolationModeResolver injects a per-server resolver; StartScan
(both passes) populates req.IsolationMode via resolveIsolationMode(server).
- server.go wires the resolver from core.IsolationManager.ResolveMode against
the live per-server config; SetIsolationMode stays as the engine-wide default
fallback. Scanner package stays decoupled from the resolver.
Tests: per-server override cases (docker under global sandbox runs Docker
scanners; sandbox/none under global docker skips), effectiveIsolationMode
precedence, and Service.resolveIsolationMode fallback. go test -race +
golangci-lint v2 green.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
returnfmt.Sprintf("Docker-based scanner %s skipped: isolation mode %q runs no Docker containers, so Docker scanner plugins cannot run for this server. "+
258
+
"In-process scanners still ran. To run Docker scanners, set isolation.mode to \"docker\" for this server on a host with a working Docker daemon. "+
220
259
"See docs/errors/MCPX_DOCKER_SNAP_APPARMOR.md.", s.ID, mode)
0 commit comments