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
{{ message }}
Repository navigation
scan <Dockerfile> fails with "unsupported target type" (scan router has no Dockerfile case) #400
Static scan of a Dockerfile on disk (deputy scan <Dockerfile>) fails for any Dockerfile with unsupported target type, even though a Dockerfile provider is registered.
Environment
deputy 0.0.0-dev, commit 1c97f17 (current main HEAD); go1.26.6, linux/amd64
Actual:Scan dockerfile: internal: scan failed: unsupported target type for "/tmp/Dockerfile". (exit 1). Reproduces on any Dockerfile; scanning a built image works, so it is specific to the on-disk Dockerfile target. Expected: Deputy statically analyzes the Dockerfile, or returns a clear "not supported yet" if intentional.
Root cause (confirmed path)
The dockerfile provider IS registered (internal/targets/providers/dockerfile.go:14) and resolves the Dockerfile. But the CLI scan path is runScanDockerfile (cli/cmd/scan.go) -> c.Vulns.Scan -> server routeScan (internal/server/scan_handler.go), and routeScan has no KindDockerfile case, so it falls through to the generic repository scan -> inventory.resolveRepositoryTarget -> unsupported target type at internal/inventory/collector.go:976. The inventory CollectDockerfile path (collector.go ~175) handles Dockerfiles correctly but is not reachable from deputy scan.
History: regression
Dockerfile scanning worked before via a dedicated Service.ScanDockerfile (commit ce233cb, 2026-01-07). The proto-first rewrite (2d60800, #7, 2026-01-12) replaced it with the Vulns.Scan/routeScan path, which shipped without a KindDockerfile case. Broken since, roughly 8.5 months.
Suggested direction
Add a KindDockerfile case to routeScan that dispatches to the existing Dockerfile analysis (the provider and CollectDockerfile logic already exist).
Activity