Security scanner for Agent Skills packages - Detects prompt injection, data exfiltration, and malicious code
Project description
Skill Scanner
A security scanner for AI Agent Skills that detects prompt injection, data exfiltration, and malicious code patterns. Combines pattern-based detection (YAML + YARA), LLM-as-a-judge, and behavioral dataflow analysis for comprehensive threat detection.
Supports OpenAI Codex Skills and Cursor Agent Skills formats following the Agent Skills specification.
Highlights
- Multi-Engine Detection - Static analysis, behavioral dataflow, LLM semantic analysis, and cloud-based scanning
- False Positive Filtering - Meta-analyzer significantly reduces noise while preserving detection capability
- CI/CD Ready - SARIF output for GitHub Code Scanning, exit codes for build failures
- Extensible - Plugin architecture for custom analyzers
Join the Cisco AI Discord to discuss, share feedback, or connect with the team.
Documentation
| Guide | Description |
|---|---|
| Quick Start | Get started in 5 minutes |
| Architecture | System design and components |
| 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 |
| API Reference | REST API documentation |
| Development Guide | Contributing and development setup |
Installation
Prerequisites: Python 3.10+ and uv (recommended) or pip
# Using uv (recommended)
uv pip install cisco-ai-skill-scanner
# Using pip
pip install cisco-ai-skill-scanner
Cloud Provider Extras
# AWS Bedrock support
pip install cisco-ai-skill-scanner[bedrock]
# 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)
# 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"
# 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"
CLI Usage
# Scan a single skill (static analyzer only)
skill-scanner scan /path/to/skill
# Scan with behavioral analyzer (dataflow analysis)
skill-scanner scan /path/to/skill --use-behavioral
# Scan with all engines
skill-scanner scan /path/to/skill --use-behavioral --use-llm --use-aidefense
# Scan with meta-analyzer for false positive filtering
skill-scanner scan /path/to/skill --use-llm --enable-meta
# Scan multiple skills recursively
skill-scanner scan-all /path/to/skills --recursive --use-behavioral
# CI/CD: Fail build if threats found
skill-scanner scan-all ./skills --fail-on-findings --format sarif --output results.sarif
# Use custom YARA rules
skill-scanner scan /path/to/skill --custom-rules /path/to/my-rules/
# Disable specific noisy rules
skill-scanner scan /path/to/skill --disable-rule YARA_script_injection --disable-rule MANIFEST_MISSING_LICENSE
# Strict mode (more findings, higher FP rate)
skill-scanner scan /path/to/skill --yara-mode strict
# Permissive mode (fewer findings, may miss some threats)
skill-scanner scan /path/to/skill --yara-mode permissive
Python SDK
from skill_scanner import SkillScanner
from skill_scanner.core.analyzers import StaticAnalyzer, BehavioralAnalyzer
# Create scanner with analyzers
scanner = SkillScanner(analyzers=[
StaticAnalyzer(),
BehavioralAnalyzer(use_static_analysis=True),
])
# Scan a skill
result = scanner.scan_skill("/path/to/skill")
print(f"Safe: {result.is_safe}")
print(f"Findings: {len(result.findings)}")
Security Analyzers
| Analyzer | Detection Method | Scope | Requirements |
|---|---|---|---|
| Static | YAML + YARA patterns | All files | 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 |
|---|---|
--use-behavioral |
Enable behavioral analyzer (dataflow analysis) |
--use-llm |
Enable LLM analyzer (requires API key) |
--use-virustotal |
Enable VirusTotal binary scanner |
--use-aidefense |
Enable Cisco AI Defense analyzer |
--enable-meta |
Enable meta-analyzer for false positive filtering |
--format |
Output: summary, json, markdown, table, sarif |
--output PATH |
Save report to file |
--fail-on-findings |
Exit with error if HIGH/CRITICAL found |
--yara-mode |
Detection mode: strict, balanced (default), permissive |
--custom-rules PATH |
Use custom YARA rules from directory |
--disable-rule RULE |
Disable specific rule (can repeat) |
Example Output
$ skill-scanner scan ./my-skill --use-behavioral
============================================================
Skill: my-skill
============================================================
Status: [OK] SAFE
Max Severity: SAFE
Total Findings: 0
Scan Duration: 0.15s
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
License
Apache 2.0 - See LICENSE for details.
Copyright 2026 Cisco Systems, Inc. and its affiliates
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cisco_ai_skill_scanner-1.0.2.tar.gz.
File metadata
- Download URL: cisco_ai_skill_scanner-1.0.2.tar.gz
- Upload date:
- Size: 573.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ab4a7dc88e3dbf39b2af25c5fee3b768531edac0855a481bf01bb482a34fb0f
|
|
| MD5 |
1ee3fe2778aba63f6ebfb081eae0486a
|
|
| BLAKE2b-256 |
9e3d3837c1e87d6ede522d737d93f7319248e4832653bddfedcead8f11d5e57c
|
Provenance
The following attestation bundles were made for cisco_ai_skill_scanner-1.0.2.tar.gz:
Publisher:
release.yml on cisco-ai-defense/skill-scanner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cisco_ai_skill_scanner-1.0.2.tar.gz -
Subject digest:
2ab4a7dc88e3dbf39b2af25c5fee3b768531edac0855a481bf01bb482a34fb0f - Sigstore transparency entry: 921668743
- Sigstore integration time:
-
Permalink:
cisco-ai-defense/skill-scanner@bf9908f6b4fee3810722a0691fa109c7530c7327 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/cisco-ai-defense
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bf9908f6b4fee3810722a0691fa109c7530c7327 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file cisco_ai_skill_scanner-1.0.2-py3-none-any.whl.
File metadata
- Download URL: cisco_ai_skill_scanner-1.0.2-py3-none-any.whl
- Upload date:
- Size: 257.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8af261d11f46fae81fb44b1ffbf4af7ff35dd8a39103eb1ef3a584cbe36a8298
|
|
| MD5 |
7085321e7770ed4fe5c1b9188c6a1b19
|
|
| BLAKE2b-256 |
f33d26425d1b5ac6a9fb73ac17b22ba5481edef01a265aa10000fdb440c1f433
|
Provenance
The following attestation bundles were made for cisco_ai_skill_scanner-1.0.2-py3-none-any.whl:
Publisher:
release.yml on cisco-ai-defense/skill-scanner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cisco_ai_skill_scanner-1.0.2-py3-none-any.whl -
Subject digest:
8af261d11f46fae81fb44b1ffbf4af7ff35dd8a39103eb1ef3a584cbe36a8298 - Sigstore transparency entry: 921668791
- Sigstore integration time:
-
Permalink:
cisco-ai-defense/skill-scanner@bf9908f6b4fee3810722a0691fa109c7530c7327 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/cisco-ai-defense
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bf9908f6b4fee3810722a0691fa109c7530c7327 -
Trigger Event:
workflow_dispatch
-
Statement type: