Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

skill-scanner

> AI 编程
Open source

Security Scanner for Agent Skills

2.4K stars0 likes1 views
WebsiteGitHub

About

Security Scanner for Agent Skills

Skill Scanner

A best-effort security scanner for AI Agent Skills that detects prompt injection, data exfiltration, and malicious code patterns. It combines pattern-based detection (YAML + YARA-X), AST and dataflow analysis, an optional LLM-as-a-judge, and a bounded CEL decision layer over typed detector facts.

Important: This scanner provides best-effort detection, not comprehensive or complete coverage. A scan that returns no findings does not guarantee that a skill is free of all threats. See Scope and Limitations below.

Supports OpenAI Codex Skills and Cursor Agent Skills formats following the Agent Skills specification. With --lenient, also scans non-standard formats such as Claude Code .claude/commands/*.md and flat markdown skill repos.


Highlights

  • Multi-Engine Detection - Static analysis, behavioral dataflow, LLM semantic analysis, and cloud-based scanning for layered, best-effort coverage
  • Typed CEL Decisions - The core scanner uses the official cel-go v0.32.0 runtime to correlate bounded facts after deterministic detection and before optional LLM analysis
  • Finding Review - The optional Meta-analyzer correlates, prioritizes, and can filter findings; paired accuracy validation remains pending
  • CI/CD Ready - SARIF output for GitHub Code Scanning, reusable GitHub Actions workflow, exit codes for build failures
  • Pre-commit Hook - Standard pre-commit framework integration to scan skills before every commit
  • Extensible - Plugin architecture for custom analyzers

Join the Cisco AI Discord to discuss, share feedback, or connect with the team.


Scope and Limitations

Skill Scanner is a detection tool. It identifies known and probable risk patterns, but it does not certify security.

Key limitations:

  • No findings ≠ no risk. A scan that returns "No findings" indicates that no known threat patterns were detected. It does not guarantee that a skill is secure, benign, or free of vulnerabilities.
  • Coverage is inherently incomplete. The scanner combines signature-based detection, LLM-based semantic analysis, behavioral dataflow analysis, optional cloud services, and configurable rule packs. While this approach improves coverage, no automated tool can detect every technique, especially novel or zero-day attacks.
  • False positives and false negatives can occur. Consensus modes and meta-analysis can help review findings, but no configuration eliminates all incorrect classifications. Tune the scan policy to your risk tolerance.
  • Human review remains essential. Automated scanning is one component of a defense-in-depth strategy. High-risk or production deployments should pair scanner results with manual code review and/or threat modeling.

Current modernization evidence

The final core + CEL development benchmark contains 5,256 malicious and 1,338 benign MaliciousSkillBench packages. Compared with origin/main, the current scanner raised F1 from 32.92% to 47.73% and recall from 19.88% to 31.43%, while reducing benign false-positive rate from 3.59% to 1.05%. Precision is 99.16%. Five CEL-shadow runs were exact and deterministic; CEL evaluated 154 candidates without proposing a suppression or falling back.

The locked source-disjoint split is weaker: TP=65, FP=42, TN=503, and FN=774, for 60.75% precision, 7.75% recall, 13.74% F1, and 7.71% FPR. This improves F1 over origin/main (7.40%) but regresses FPR (3.67%), so it does not pass the promotion gate. Every bundled CEL rule therefore remains in shadow; this change does not promote any CEL suppression.

Compatibility and supplemental checks found identical CEL-OFF/CEL-SHADOW findings on 111 official Codex, Claude Code, and Cursor skills (30 MEDIUM+ and 8 HIGH/CRITICAL packages), with five stable runs. The NotInject hard-negative set had 0/339 actionable matches. HarmfulSkillBench had 7/200 actionable and 6/200 HIGH+ packages with one quarantined sample, while OpenSkillRisk had 76/263 actionable packages with two host quarantines. The latter two are positive-only recall diagnostics and cannot measure precision or FPR. Optional ATR results are outside this release scope. See Detection Evaluation and Rollout for methodology, provenance, confidence intervals, and limitations.


Documentation

Guide Description
Quick Start Get started in 5 minutes
Architecture System design and components
CEL Decision Layer Typed facts, safety bounds, rollout modes, and telemetry
Threat Taxonomy Complete AITech threat taxonomy with examples
LLM Analyzer LLM configuration and usage
Meta-Analyzer False positive filtering and prioritization
Behavioral Analyzer Dataflow analysis details
Scan Policy Custom policies, presets, and tuning guide
Policy Quick Reference Compact reference for policy sections and knobs
Rule Authoring How to add signature, YARA, and Python rules
GitHub Actions Reusable workflow for CI/CD integration
API Reference REST API documentation
Development Guide Contributing and development setup

Installation

Prerequisites for this checkout and a release containing these changes: CPython 3.11–3.14 and uv (recommended) or pip

A release containing this branch's CEL changes will include the required helper in its wheels; there is no separate CEL extra. That release is configured for CPython 3.11–3.14, while source installs additionally require Go 1.27.1+ to build the helper. Until it is published, the package currently served by PyPI may have a different compatibility contract. See Installation and Configuration for details.

bash
# Using uv (recommended)
uv pip install cisco-ai-skill-scanner

# Using pip
pip install cisco-ai-skill-scanner
Cloud Provider Extras
bash
# AWS Bedrock support
pip install cisco-ai-skill-scanner[bedrock]

# Google AI Studio / Gemini support
pip install cisco-ai-skill-scanner[google]

# Google Vertex AI support
pip install cisco-ai-skill-scanner[vertex]

# Azure OpenAI support
pip install cisco-ai-skill-scanner[azure]

# All cloud providers
pip install cisco-ai-skill-scanner[all]

Quick Start

Environment Setup (Optional)

bash
# For LLM analyzer and Meta-analyzer
export SKILL_SCANNER_LLM_API_KEY="your_api_key"
export SKILL_SCANNER_LLM_MODEL="claude-3-5-sonnet-20241022"
# Optional: disabled, minimal, low, medium, high, xhigh, or max
export SKILL_SCANNER_LLM_REASONING_EFFORT="low"

# For VirusTotal binary scanning
export VIRUSTOTAL_API_KEY="your_virustotal_api_key"

# For Cisco AI Defense
export AI_DEFENSE_API_KEY="your_aidefense_api_key"

Interactive Wizard

Not sure which flags to use? Run skill-scanner with no arguments to launch the interactive wizard:

bash
skill-scanner

The wizard walks you through selecting a scan target, analyzers, policy, and output format, then shows the assembled command before running it. Great for learning the CLI.

CLI Usage

…

Consensus mode keeps a finding only when it appears in more than half of the configured runs. When those votes disagree on severity, the highest observed severity wins, independent of response order. Failed runs and successful runs that omit the finding cast no vote but remain in the denominator. This makes severity selection stable for majority-agreed findings. It does not make an individual LLM sample deterministic, and descriptive fields from equal-severity votes, single-run output, and non-majority findings can still vary between scans.

LLM provider note: --llm-provider currently accepts anthropic or openai. For Bedrock, Vertex, Azure, Gemini, and other LiteLLM backends, set provider-specific model strings and environment variables (see LLM Analyzer docs).

Python SDK

python
from skill_scanner import SkillScanner
from skill_scanner.core.analyzers import BehavioralAnalyzer

# Create scanner with analyzers
scanner = SkillScanner(analyzers=[
    BehavioralAnalyzer(),
])

# Scan a skill
result = scanner.scan_skill("/path/to/skill")

print(f"Findings: {len(result.findings)}")
print(f"Max severity: {result.max_severity}")

# Note: is_safe indicates no HIGH/CRITICAL findings were detected.
# It does not guarantee the skill is free of all risk.
if not result.is_safe:
    print("Issues detected -- review findings before deployment")

Security Analyzers

Analyzer Detection Method Scope Requirements
Static YAML + YARA patterns All files None
Bytecode .pyc integrity verification Python bytecode None
Pipeline Command taint analysis Shell pipelines None
Correlation Bounded structured source/sink correlation Python, JavaScript, TypeScript, and package facts None
Behavioral AST dataflow analysis Python files None
LLM Semantic analysis SKILL.md + scripts API key
Meta False positive filtering All findings API key
VirusTotal Hash-based malware Binary files API key
AI Defense Cloud-based AI Text content API key

CLI Options

Option Description
--policy Scan policy: preset name (strict, balanced, permissive) or path to custom YAML
--use-behavioral Enable behavioral analyzer (dataflow analysis)
--use-llm Enable LLM analyzer (requires API key)
--llm-provider LLM provider for CLI routing: anthropic or openai
--llm-consensus-runs N Run LLM analysis N times, keep majority-agreed findings, and retain their highest observed severity
--llm-max-tokens N Maximum output tokens for LLM responses (default: 8192)
--llm-reasoning-effort LEVEL Optional reasoning depth (disabled, minimal, low, medium, high, xhigh, or max); unset preserves the provider default
--use-virustotal Enable VirusTotal binary scanner
--vt-api-key KEY Provide VirusTotal API key directly (optional)
--vt-upload-files Upload unknown binaries to VirusTotal (optional)
--use-aidefense Enable Cisco AI Defense analyzer
--aidefense-api-url URL Override AI Defense API URL (optional)
--use-trigger Enable trigger specificity analyzer
--enable-meta Enable meta-analyzer for false positive filtering
--verbose Include per-finding policy fingerprints, co-occurrence metadata, and keep meta-analyzer false positives
--format Output: summary, json, markdown, table, sarif, html. The html format produces a self-contained interactive report with collapsible correlation groups, expandable code snippets, and pipeline taint flow diagrams
--detailed Include detailed findings in Markdown output
--compact Compact JSON output
--output PATH Default output file path (overr

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Pythonagentagent-skillssecurity

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryAI 编程
PricingOpen source

> Related tools

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.