AGENT SKILL

audit

Run SkillGuard security audit on AI agent skills — scans 10 dimensions with 109 rules based on OWASP LLM Top 10, SLSA, and Google SAIF

License 许可
MIT
最近更新
2026-04-04
Stars
★ 1
Forks
0

01 前言 Front Matter

description
Run SkillGuard security audit on AI agent skills — scans 10 dimensions with 109 rules based on OWASP LLM Top 10, SLSA, and Google SAIF
allowed-tools
[ "Bash", "Read", "Glob" ]

03 SKILL.md 正文

SkillGuard Audit

Security audit tool for Claude Code Skills and AI agent plugins. Scans across 10 security dimensions with 109 detection rules, providing A–F risk grading and token cost estimation.

Quick Start

# Scan a local skill directory
npx skillguard /path/to/skill

# Scan a GitHub repository
npx skillguard https://github.com/owner/repo

# Scan a ClawHub skill
npx skillguard https://clawhub.ai/author/skill-name

# Scan all skills in a marketplace directory
npx skillguard /path/to/marketplace --all

Output Formats

# Terminal output (default) — colored, human-readable
npx skillguard <target>

# JSON output to stdout
npx skillguard <target> --json

# JSON output to file
npx skillguard <target> --json report.json

# Markdown report
npx skillguard <target> --md report.md

# Chinese language output
npx skillguard <target> --lang zh

Options

  • --all — Scan all skill subdirectories (marketplace mode)
  • --json [file] — Output as JSON (to stdout or file)
  • --md <file> — Output as Markdown report
  • --rules <path> — Custom rules.yaml file
  • --min-level <A-F> — Filter output by minimum risk level
  • --min-severity <severity> — Filter by minimum severity (CRITICAL, HIGH, MEDIUM, LOW, INFO)
  • --lang <en|zh> — Output language (default: en)

10 Security Dimensions

  1. Prompt Injection — Direct/indirect injection patterns, zero-width chars, base64 payloads
  2. Permission Escalation — Sandbox bypass, sudo, chmod 777, dangerous tool combos
  3. Data Exfiltration — Credential theft, env leaks, outbound HTTP
  4. Destructive Operations — rm -rf, DROP TABLE, git reset --hard
  5. Supply Chain — Pipe-to-shell, unpinned deps, Docker without digest
  6. Code Security — eval(), shell=True, SQL injection, XSS
  7. Credential Leaks — Hardcoded API keys, JWT tokens, PEM keys
  8. Least Privilege — Missing allowed-tools, dangerous tool combinations
  9. License Compliance — Proprietary restrictions, non-commercial clauses
  10. Resource Abuse — Infinite loops, excessive retries, unbounded fetching

Risk Grading

Grade Score Meaning
A 0–9 Safe
B 10–29 Acceptable
C 30–49 Warning
D 50–69 Unsafe
F 70–100 Dangerous

Example Workflow

When a user asks to audit a skill:

  1. Run npx skillguard <target> to get the terminal report
  2. If the user wants details, use --json report.json and read the JSON file
  3. Explain findings in context — what each risk means and whether it's a real threat
  4. Suggest concrete fixes using the remediation guidance in each finding

04 同仓库更多 Skills