Skip to content
Cisco AI Defense logo
CiscoAI Security

Skill scanner — DefenseClaw

Overview

OpenClaw skills are Python or TypeScript packages that extend the agent. DefenseClaw scans them through the watcher pipeline and through the operator command defenseclaw skill scan. The scanner itself is Cisco's skill_scanner Python SDK — DefenseClaw wires it into the verdict pipeline, feeds findings to the audit store, and applies the OPA admission module.

Configure it

defenseclaw setup skill-scanner

The interactive wizard surfaces the settings implemented in cmd_setup.py: behavioral analysis, LLM analysis, meta-analyzer filtering, trigger checks, VirusTotal, Cisco AI Defense, unified LLM provider/model, consensus runs, policy preset, and lenient parsing.

Non-interactive form:

defenseclaw setup skill-scanner \
  --non-interactive \
  --use-behavioral \
  --use-llm \
  --enable-meta \
  --llm-provider openai \
  --llm-model gpt-4o-mini \
  --policy balanced

See the autogenerated setup command page for all flags.

What each analyzer catches

AnalyzerSignalExample
InjectionPrompt-injection / command-injection patterns in skill YAML and inline codesystem("{{ user_input }}"), templated shell
SecretsAPI keys, tokens, connection strings embedded in skill filessk-ant-api03-..., AWS access keys
Malicious toolsUnsafe tool bindings: exec, eval, destructive FS ops without confirmationsubprocess.run(shell=True)
ObfuscationBase64-embedded code, high-entropy strings, unused indirectionexec(base64.b64decode(...))
Trust divideSkills that cross privilege boundaries without explicit declarationSkill marked trust=untrusted that invokes a trusted tool

Findings are shaped as EventScanFinding rows in the audit store (see schemas) with rule_id, line_number, severity, and scanner=skill. The OPA module at policies/rego/admission.rego consumes them to decide admission.

Profiles

ProfileSeverity floorAnalyzer set
permissiveLower-noise scanner policyMinimal analyzer posture for early rollout
balancedDefault scanner policyBehavioral + semantic checks when enabled
strictHigher-sensitivity scanner policyUse when false positives are acceptable during hardening

The policy value is saved under scanners.skill_scanner.policy; analyzer toggles live under the same scanners.skill_scanner block, while shared LLM values land in the top-level llm: block.

Verify it worked

defenseclaw skill scan some-skill --path ~/.claw/skills/some-skill
defenseclaw status | grep -i scanner

defenseclaw skill scan prints findings in a table and supports --json for CI gates.

Undo

defenseclaw setup skill-scanner --non-interactive --policy permissive

Or edit config.yaml directly if you need a setting that is not exposed through the setup wizard.

Troubleshooting

SymptomCauseFix
skill-scanner: not installed in initPython wheel missing the SDKReinstall with pip install defenseclaw (bundled) or pip install skill-scanner
Many findings after upgradePolicy drift from a new default rulesetRun defenseclaw skill scan <name> --json and triage; set --policy permissive temporarily
LLM checks do not runUnified llm: provider/model or key is missingRun defenseclaw setup skill-scanner interactively or set DEFENSECLAW_LLM_KEY

Related