Security Scanning
SkillHub can integrate skill-scanner into the publish pipeline to automatically inspect uploaded skill packages and persist the results as security audit records.
Scan Flow
When scanning is enabled, the publish flow becomes:
- A user publishes a skill package
- The backend creates a version and moves it to
SCANNING - The backend enqueues a scan task
skill-scannerconsumes the task and runs analysis- The result is stored in
security_audit - The version moves to
PENDING_REVIEW, or toSCAN_FAILEDafter final retry exhaustion - The existing human review workflow continues afterward
Typical Use Cases
- Add automated risk checks before manual review
- Retain scan results and audit evidence for governance
- Detect suspicious code, leaked secrets, or risky behavior patterns in skill packages
Runtime Modes
Two modes are supported:
local: the backend passes a filesystem path to the scanner, suitable for shared filesystem setupsupload: the backend uploads the package archive directly, suitable for Docker, Kubernetes, and split deployments
Recommended usage:
- Local development: prefer
local - Production, Kubernetes, or split services: prefer
upload
Key Configuration
Core backend configuration:
skillhub:
security:
scanner:
enabled: false
base-url: http://localhost:8000
health-path: /health
scan-path: /scan-upload
mode: upload
connect-timeout-ms: 5000
read-timeout-ms: 300000
retry-max-attempts: 3
Common environment variables:
SKILLHUB_SECURITY_SCANNER_ENABLEDSKILLHUB_SECURITY_SCANNER_URLSKILLHUB_SECURITY_SCANNER_MODESKILLHUB_SCAN_STREAM_KEYSKILLHUB_SCAN_STREAM_GROUP
How To Verify
After enabling scanning, validate it with these steps:
- Publish a test skill package
- Confirm the version first moves to
SCANNING - Confirm a
security_auditrecord is created - Confirm the version eventually moves to
PENDING_REVIEWorSCAN_FAILED - Call the security audit API to inspect the result
GET /api/v1/skills/{skillId}/versions/{versionId}/security-audit
Result Fields
Security audit results usually include:
scanIdscannerTypeverdictisSafemaxSeverityfindingsCountfindingsscanDurationSecondsscannedAt
Deployment Recommendations
- Keep scanning disabled at first in local environments, then enable it after the main flow is stable
- Use
uploadmode in Kubernetes to avoid relying on a shared writable filesystem - In production, keep scan results alongside human review records as governance evidence
Next Steps
- Review Workflow - Understand the approval flow after scanning
- Deployment Configuration - Review deployment-related settings