← 返回
未分类

Agentsec

Audit AI agent skills for security vulnerabilities. Use when scanning installed skills against the OWASP Agentic Skills Top 10, checking skills before runnin...
审计AI智能体技能的安全漏洞。用于在扫描已安装技能以对照OWASP Agentic Skills Top 10,或在运行前检查技能时使用。
markeljan
未分类 clawhub v0.3.3 4 版本 100000 Key: 无需
★ 1
Stars
📥 694
下载
💾 0
安装
4
版本
#latest

概述

agentsec

agentsec is a security auditing CLI for AI agent skills. It scans every skill installed in a project against the OWASP Agentic Skills Top 10 and reports vulnerabilities, misconfigurations, and governance gaps.

When to Use

Use agentsec when the user asks to:

  • Audit, scan, or check agent skills for security issues
  • Verify installed skills are safe before running them
  • Check OWASP compliance of an agent setup
  • Gate a CI/CD pipeline on skill security
  • Generate a security report for stakeholders

Quick Start

The fastest path to a result — no install, no flags:

npx agentsec

This scans every default skills directory on the machine — grouped by platform — plus any ./skills folder in the current project (up to two levels deep), and audits each installed skill against the OWASP Agentic Skills Top 10. Always try this first.

Auto-discovery locations

agentsec is agent-platform agnostic — every platform listed below ships skills in the agentskills.io SKILL.md format and is auto-discovered.

PlatformPaths scanned
-----------------------------------------------------------------------------------------------------------------------------------------------
Claude Code~/.claude/skills, ./.claude/skills, ~/.claude/plugins//skills/, ~/.claude/commands, ./.claude/commands
OpenClaw / ClawHub~/.openclaw/workspace/skills, ~/.openclaw/workspace-*/skills (profiles via OPENCLAW_PROFILE), ~/.openclaw/skills
Codex / skills.sh~/.agents/skills, ./.agents/skills, ../.agents/skills, /etc/codex/skills
Hermes~/.hermes/skills, ~/.hermes/skills/* (bundled categories), ./.hermes/skills
Other (generic)Any skills/ directory found within the current project, up to two levels deep

Core Commands

Every workflow starts from one of four commands. Run them with npx agentsec — no install needed.

# Full audit (scan + policy evaluation). Default command.
npx agentsec

# Scan only (no policy evaluation)
npx agentsec scan

# Generate a report from a previously saved audit JSON
npx agentsec report audit.json

# Manage and inspect policy presets
npx agentsec policy list

Installation

npx agentsec needs no install. For repeated use, install globally:

# bun (recommended)
bun add -g agentsec

# npm
npm install -g agentsec

# pnpm
pnpm add -g agentsec

# yarn
yarn global add agentsec

Then drop the npx prefix:

agentsec
agentsec scan --path ./my-skills

Flags

All flags work with any command.

FlagShortValuesDefaultPurpose
------------------------------------------------------------------------------------------------------------------
--format-ftext, json, sarif, htmltextOutput format
--output-opathstdoutWrite report to file
--policy-ppreset name or pathdefaultApply a policy preset
--platformopenclaw, claude, codex, hermesautoNarrow to one agent platform
--pathpathautoCustom skill directory to scan
--profiledefault, web3, strictdefaultRule profile. default auto-detects Web3 skills; web3 forces the annex on every skill
--verbose-voffShow detailed findings
--no-coloroffDisable colored output
--help-hShow help
--version-VPrint version

Common Recipes

Show detailed findings and remediation

npx agentsec --verbose

Scan a specific directory

npx agentsec scan --path ./my-skills

Target a specific agent platform

npx agentsec --platform claude
npx agentsec --platform codex
npx agentsec --platform hermes
npx agentsec --platform openclaw

Audit with a strict policy and save JSON

npx agentsec --policy strict --format json --output audit.json

Generate an HTML report for stakeholders

npx agentsec --format html --output report.html

Generate a SARIF report for IDE / code-scanning integration

npx agentsec --format sarif --output report.sarif

List available policy presets

npx agentsec policy list

Inspect the rules in a preset

npx agentsec policy show strict

Validate a custom policy config file

npx agentsec policy validate ./my-policy.json

Replay a previous audit as an HTML report

npx agentsec report audit.json --format html --output report.html

Policy Presets

NameUse Case
----------------------------------------------------------------------------------------
defaultBalanced policy. Blocks critical findings.
strictEnterprise-grade. Blocks high and critical findings, enforces tests.
permissiveLenient. Only blocks critical CVEs. Good for development.
owasp-agent-top-10Built directly from the OWASP Agentic Skills Top 10.

Configuration File

agentsec auto-loads .agentsecrc, .agentsecrc.json, or agentsec.config.json from the current directory (or any parent):

{
  "format": "text",
  "output": null,
  "policy": "strict",
  "verbose": false
}

CLI flags always override config file values. Omit "platform" and "path" to keep the default auto-discovery behavior — agentsec will scan every known platform's default locations.

OWASP Agentic Skills Top 10

Every audit checks all ten risk categories:

IDRisk
----------------------------
AST01Malicious Skills
AST02Supply Chain Compromise
AST03Over-Privileged Skills
AST04Insecure Metadata
AST05Unsafe Deserialization
AST06Weak Isolation
AST07Update Drift
AST08Poor Scanning
AST09No Governance
AST10Cross-Platform Reuse

AST-10 Web3 Annex (auto-detected)

Web3-touching skills are detected automatically and audited against twelve additional rules — no flag required. A skill is detected as Web3 when its manifest declares a web3: block, when its source imports a Web3 client library (viem, ethers, web3, wagmi, @solana/web3.js, @coinbase/onchainkit, @privy-io, @biconomy, @zerodev), when it references a Web3 RPC method (eth_, wallet_, personal_sign, signTypedData), or when it ships a .sol file. Detected skills are tagged [Web3] in the output:

✔ scoped-trader v1.4.0  [Web3]  C (62)
✔ helpful-summarizer v1.2.0     A (95)

--profile web3 is still available — it forces the annex onto every skill regardless of detection (useful for cross-team CI consistency):

npx agentsec audit --profile web3 --path ./my-skills
IDRisk
------------------------------------------------------
AST-W01Unbounded Signing Authority
AST-W02Implicit Permit / Permit2 Signature Capture
AST-W03Delegation Hijack via EIP-7702
AST-W04Blind / Opaque Signing Surface
AST-W05RPC Endpoint Substitution & Mempool Leakage
AST-W06Unverified Contract Call Targets
AST-W07Cross-Chain / Bridge Action Replay
AST-W08MCP Chain-Tool Drift / Capability Smuggling
AST-W09Session-Key / Permission-Caveat Erosion
AST-W10Slippage / Oracle Manipulation by Agent Loop
AST-W11Key Material in Agent Memory / Logs
AST-W12No On-Chain Action Audit / Kill-Switch

Skills can declare a web3 block in their manifest (chains, signers, policy caps, session-key scopes, MCP server pinning, audit sink, kill-switch) so the annex can verify scoping without flagging well-bounded skills. See docs/plans/ast10-web3-annex-rules.md for full per-rule detection signals.

Understanding the Output

Default output is compact: each skill shows its grade and score, followed by a one-line finding summary and a PASS/WARN/FAIL status.

✔ Found 6 skills

✔ fetch-data     v1.0.0  D (42)
✔ deploy-helper  v2.3.0  C (68)
✔ code-review    v1.1.0  A (95)

6 skills scanned  •  avg score 78  •  4 certified
Findings: 2 critical, 1 high, 2 medium

⚠ WARN  3 high/critical finding(s) detected

Use --verbose for score breakdowns, rule IDs, file/line locations, and remediation for each finding.

Exit Codes

  • 0 — audit passed the active policy
  • 1 — policy violation or fatal error

Use the exit code directly to gate CI pipelines — no special flag required:

npx agentsec --policy strict || exit 1

Tips

  • Start with npx agentsec — no install, no flags. Iterate from there.
  • Add --verbose whenever you need to act on specific findings.
  • Pipe --format json into jq or a custom script for programmatic handling.
  • strict is the most common preset for production repositories.
  • Browse the agent skills ecosystem at skills.sh.

版本历史

共 4 个版本

  • v0.3.3 当前
    2026-05-29 20:44 安全 安全
  • v0.3.2
    2026-05-23 16:04 安全 安全
  • v0.3.0
    2026-05-08 12:54 安全 安全
  • v0.1.5
    2026-05-07 21:13

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,213 📥 266,390
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,354 📥 317,991
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 323,998