How nvidia/skillspector works
SkillSpector scans AI-agent skills for security risks. The principal workflow accepts a local, archive, repository, or URL input; prepares skill and artifact context; runs static checks and optionally semantic LLM analysis; then produces risk-scored reports. Major branches include vulnerability and MCP checks, live OSV lookups, suppression, and parallel batch scanning. The README documents these capabilities; sampled source confirms input safeguards and analyzer/provider support, but the CLI orchestration itself was not sampled, so some links are documented rather than code-traced.
Main entry points: cli.py Scan CLI · llm_analyzer_base.py Semantic analyzer · batch_scan.py Batch coordinator · analyzers Static analyzers
Components 24
Scan workflow
- Scan CLI
src/skillspector/cli.py - Input resolution
src/skillspector/input_handler.py - Skill context
src/skillspector/nodes/build_context.py - Artifact handling
src/skillspector/artifacts.py
Security analysis
- Static analyzers
src/skillspector/nodes/analyzers - Python AST checks
src/skillspector/python_ast.py - MCP security checks
src/skillspector/nodes/analyzers - OSV vulnerability lookup
src/skillspector/nodes/analyzers/osv_client.py - Inspection ledger
src/skillspector/inspection_ledger.py
LLM analysis
- Semantic analyzer
src/skillspector/llm_analyzer_base.py - Provider selection
src/skillspector/providers/__init__.py - Provider adapters
src/skillspector/providers - Inference usage
src/skillspector/inference_usage.py
Findings and reports
- Finding suppression
src/skillspector/suppression.py - Report generation
src/skillspector/nodes/report.py - SARIF models
src/skillspector/sarif_models.py
Batch scanning
- Batch coordinator
contrib/batch_scan/batch_scan.py - Skill discovery
contrib/batch_scan/discovery.py - Batch scan runner
contrib/batch_scan/runner.py - API key pool
contrib/batch_scan/api_pool.py - Batch reports
contrib/batch_scan/reports.py
Other components
- Skill publisher or auditor
- OSV.dev
- LLM provider service
Connections 22
- Skill publisher or auditor → Scan CLI: requests scan
- Scan CLI → Input resolution: accepts inputs
- Input resolution → Skill context: prepares skill
src/skillspector/nodes/build_context.py - Skill context → Artifact handling: inspects artifacts
src/skillspector/nodes/build_context.py - Scan CLI → Static analyzers: runs static checks
- Scan CLI → Semantic analyzer: optionally evaluates
- Static analyzers → Python AST checks: includes AST checks
- Static analyzers → MCP security checks: includes MCP checks
- Scan CLI → OSV vulnerability lookup: performs lookups
- OSV vulnerability lookup → OSV.dev: queries CVEs
- Semantic analyzer → Provider selection: resolves model
src/skillspector/llm_analyzer_base.py - Provider selection → Provider adapters: selects adapter
src/skillspector/providers/__init__.py - Semantic analyzer → Inference usage: records usage
src/skillspector/llm_analyzer_base.py - Semantic analyzer → LLM provider service: requests analysis
- Scan CLI → Finding suppression: applies baseline
- Scan CLI → Report generation: creates report
- Report generation → SARIF models: emits SARIF
src/skillspector/nodes/report.py - Skill publisher or auditor → Batch coordinator: requests batch scan
- Batch coordinator → Skill discovery: discovers skills
contrib/batch_scan/batch_scan.py - Batch coordinator → Batch scan runner: dispatches scans
contrib/batch_scan/batch_scan.py - Batch scan runner → API key pool: uses key pool
contrib/batch_scan/runner.py - Batch coordinator → Batch reports: writes reports
contrib/batch_scan/batch_scan.py