Skip to content
OpenAgentSkill
Browsing is open · Catalog captured 2026-11-21 · Automatic updates and account services are paused.
Development

clawscan-cli

Use when running or explaining the ClawScan CLI, including one-off agent-skill scans, benchmark runs, scanner fixtures, judge harness commands, env var validation, and interpreting clawscan-run-v1 and clawscan-benchmark-v1 artifacts.

openclaw · Static checks on file

Installation

Read the source and dependencies before running a command. Copying does not install or execute anything.

npx skills add openclaw/clawscan --skill clawscan-cli

About this skill


name: clawscan-cli description: Use when running or explaining the ClawScan CLI, including one-off agent-skill scans, benchmark runs, scanner fixtures, judge harness commands, env var validation, and interpreting clawscan-run-v1 and clawscan-benchmark-v1 artifacts.

ClawScan CLI

Overview

Use ClawScan to run one or more security scanners against agent skills, preserve raw scanner evidence, and optionally pass the evidence to an external judge harness. The public CLI is general-purpose; ClawHub-specific parity helpers belong outside cmd/clawscan. Keep secrets in environment variables, never CLI flags.

Command Surface

Run from the repo root during development:

go run ./cmd/clawscan <target> --scanner <scanner-id> [flags]

Use the installed binary when available:

clawscan <target> --scanner <scanner-id> [flags]

Choose the run mode:

NeedShape
Scan repo skills with one scannerclawscan --scanner skillspector from a repo with ./skills/<name>/SKILL.md
Scan repo skills with the ClawHub profileclawscan --profile clawhub from a repo with ./skills/<name>/SKILL.md
Scan one explicit target with a profileclawscan ./my-skill --profile clawhub
Capture raw scanner evidence onlyclawscan ./my-skill --scanner clawscan-static
Print raw JSON to stdoutAdd --json.
Run all profiles from a configclawscan ./my-skill --config ./security/clawscan.yml
Run one config profileclawscan ./my-skill --config ./security/clawscan.yml --profile review
Install scanner dependenciesclawscan install aig cisco skillspector
List scanner catalogclawscan scanners
Inspect one scannerclawscan scanners skillspector
List resolved profilesclawscan profiles
Print resolved profile YAMLclawscan profiles -v
List benchmark catalogclawscan benchmark list
Run SkillTrustBenchclawscan benchmark SkillTrustBench --limit 10 --scanner clawscan-static --output run.json
Run ClawHub Security Signalsclawscan benchmark clawhub-security-signals --split eval_holdout --limit 10 --scanner clawscan-static --output run.json
Use stable scanner evidenceAdd --scanner-result <id=path> for each fixture-backed scanner.
Add or override a judge harnessAdd --judge '<command with placeholders>'.
Use host-installed scanner/judge CLIsAdd --sandbox off only in an already-isolated environment.

Helpful metadata:

clawscan --help
clawscan -h
clawscan --version
clawscan scanners
clawscan profiles
clawscan benchmark list

Unless --json is passed, ClawScan writes the full artifact to ./clawscan-results/artifact.json by default, preserves per-scanner JSON files in the same visible results bundle, and prints a concise key/value summary ending in full_results: ./clawscan-results/artifact.json. Use --output <path> to choose a different artifact path; explicit .json paths keep that artifact file and write scanner JSON beside it.

Targets, Profiles, And Config

If no target is passed with --scanner, --profile, or --config, ClawScan scans child skill directories under ./skills. If ./skills is missing or contains no children with SKILL.md, it fails with a target-discovery error. Plain clawscan without --scanner, --profile, or --config is invalid. Benchmark runs use clawscan benchmark <benchmark-id> and do not accept scan targets.

Built-in profiles:

ProfileScannersJudge
clawhubskillspector, clawscan-staticbundled Codex judge with ClawHub prompt/schema

Profiles are loaded from embedded built-ins. Project .clawscan.yml / .clawscan.yaml files are NOT loaded automatically: pass --config <path> to load a specific config, or --discover-config to load the nearest one found upward from the current directory. A project profile with the same name shadows the built-in whole profile. --config <path> without --profile runs every profile in that config and emits a clawscan-batch-v1 artifact. Discovery is off by default because project configs can define scanner commands that execute with the caller's environment and credentials.

Use clawscan profiles to inspect the built-in profile catalog. Use clawscan profiles -v to print it as pasteable YAML.

CLI flags override the selected profile for one run. Passing --scanner without --profile creates an ad hoc scanner-only run, so profile judges are not invoked accidentally.

Minimal config:

version: 1
sandbox:
  mode: docker
  env:
    - OPENAI_API_KEY
    - CODEX_API_KEY
profiles:
  review:
    scanners:
      - clawscan-static
    json: true
    judge:
      command: judge --out {{ output }}

sandbox.env is an allowlist of env var names to pass into the Docker runtime; store names there, not secret values. CLI equivalents are --sandbox, --sandbox-image, and repeatable --sandbox-env.

Scanners

Use clawscan scanners for the registry-backed scanner catalog and clawscan scanners <scanner-id> for one scanner's repository, description, env vars, and install guidance.

Accepted scanner IDs:

agentverus, aig, cisco, clawscan-static, skillspector, snyk, socket, virustotal

Credential rules:

ScannerEnv vars
aigrequired: LLM_API_KEY or OPENAI_API_KEY; optional local scanner config: DEFAULT_MODEL, DEFAULT_BASE_URL, DEFAULT_MODEL_CONTEXT_WINDOW, LOG_LEVEL
socketrequired: SOCKET_CLI_API_TOKEN
snykrequired: SNYK_TOKEN
virustotalrequired: VIRUSTOTAL_API_KEY
skillspectoroptional provider config: SKILLSPECTOR_PROVIDER, SKILLSPECTOR_MODEL, NVIDIA_INFERENCE_KEY, OPENAI_API_KEY, OPENAI_BASE_URL, ANTHROPIC_API_KEY, ANTHROPIC_PROXY_ENDPOINT_URL, ANTHROPIC_PROXY_API_KEY
ciscooptional upstream analyzers: SKILL_SCANNER_LLM_*, SKILL_SCANNER_META_LLM_*, VIRUSTOTAL_API_KEY, `AI_DEFENSE_AP
Read the complete source ↗