$ show openclaw/clawscan
ClawScan is a Go-based CLI tool for composable security scanning of AI agent skills and plugins. It orchestrates multiple external scanners (e.g., Snyk, VirusTotal, Socket, AIG, Cisco, SkillSpector) against skill directories, collects raw evidence, and optionally feeds results to an LLM judge for evaluation. The tool supports profile-based configuration (built-in profiles like `clawhub` and `openclaw-install-policy`), Docker sandboxing, declarative gate rules for automated policy enforcement, and benchmark execution against datasets like SkillTrustBench and clawhub-security-signals. It is distributed via npm (`@openclaw/clawscan`) and GitHub Releases, with a rich CI/CD pipeline including automated runtime image builds, dependency updates, and a Hugging Face leaderboard for security signals research. While primarily an application, it has strong data/research elements through its benchmark infrastructure and leaderboard submission validation.
The LLM identified 3 files worth highlighting for reuse:
Defines the `ScannerAdapter` interface and a registry of built-in scanners. Each scanner implements `ID()`, `Requirements()`, `Info()`, `InstallPlan()`, and `Run()` methods, allowing uniform execution and installation. The registry supports both built-in and user-defined scanners, making the system extensible without modifying core code. This pattern is reusable for any multi-tool orchestration system.
Implements a Docker-based sandbox for running scanners in isolated containers. Supports configurable images, mount points, environment variable passthrough, and metadata recording. The `dockerCommandRunner` wraps a host `CommandRunner` with container lifecycle management. This abstraction can be extracted and reused for any CLI tool that needs secure, reproducible execution environments.
Resolves scanner profiles from built-in definitions, project-level `.clawscan.yml` files, and CLI overrides. Handles YAML parsing, schema validation, and merging of sandbox settings, gate rules, judges, and user-defined scanners. The resolver pattern is cleanly separated from execution logic and can be reused for any multi-source configuration system.