npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@elliotllliu/agent-shield

v0.16.0

Published

Multi-engine AI agent security scanner — one scan, four engines, one report

Downloads

1,531

Readme

🛡️ AgentShield

给你的 AI 做个体检。

一次扫描,四大引擎,一份报告。

你从网上下了一个 MCP Server / Skill / Plugin,准备装上用。但你心里可能有个疑问:

这东西安全吗?会不会偷我的密钥?会不会劫持我的 AI?

AgentShield 帮你 3 秒搞定。 一行命令,4 个扫描引擎自动跑,给你一份清清楚楚的中文报告。

npx @elliotllliu/agent-shield scan ./那个你想装的东西

就这么简单。首次运行会自动帮你装好所有引擎,之后秒出结果。


看看效果

扫到风险的时候

🛡️  安全检测报告
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📁 检测对象:  ./mcp-playwright
🔧 检测引擎:  4 个独立扫描器
⏱  总耗时:    12.3s

──────────────────────────────────────────────────────
🔍 各方检测结论
──────────────────────────────────────────────────────

🛡️ AgentShield — AI Agent 安全
   结论: ⚠️ 发现 2 处需关注
   • 代码混淆
     📍 src/index.ts:1

🔍 Aguara — 通用代码安全
   结论: ✅ 未发现风险

🔎 Semgrep — 代码质量与注入检测
   结论: ✅ 未发现风险

🧪 Invariant — MCP Tool Poisoning 检测
   结论: ✅ 未发现风险

──────────────────────────────────────────────────────
📊 综合结论
──────────────────────────────────────────────────────

✅ 整体安全,有少量提示
   3/4 个引擎未检出风险

  ✅ 后门/远程控制  — 4 个引擎均未检出
  ✅ 数据窃取       — 4 个引擎均未检出
  ✅ Prompt 注入    — 4 个引擎均未检出
  ✅ 挖矿行为       — 4 个引擎均未检出

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

你一眼就知道:4 个引擎里 3 个说没问题,最重要的威胁全部排除。放心装。

没问题的时候

✅ 所有引擎均未检出风险

  ✅ 后门/远程控制  — 4 个引擎均未检出
  ✅ 数据窃取       — 4 个引擎均未检出
  ✅ Prompt 注入    — 4 个引擎均未检出
  ✅ 挖矿行为       — 4 个引擎均未检出

全绿灯,大胆装。


凭什么信?

因为不是一个引擎说了算。是 4 个独立的扫描引擎,它们互相不认识,各扫各的。然后我们汇总它们的意见:

| 引擎 | 它擅长什么 | |------|-----------| | 🛡️ AgentShield | AI Agent 专项 — Skill 劫持、Prompt 注入、MCP 运行时安全 | | 🔍 Aguara | 通用代码安全 — 177 条规则,数据外渗、污点追踪 | | 🔎 Semgrep | 代码质量 — 2000+ 条规则,注入、XSS、硬编码凭证 | | 🧪 Invariant | MCP 专项 — Tool Poisoning、跨域提权、Rug Pull |

如果 3 个引擎说安全,1 个说危险 → 那大概率是误报。 如果 3 个引擎都说危险 → 那就是真的危险。


首次运行

首次运行会自动帮你安装其他引擎(装到 ~/.agentshield/,不需要 sudo):

🔧 检查引擎...
  ✅ AgentShield — 已就绪
  📦 Aguara — 正在安装... 完成
  📦 Semgrep — 正在安装... 完成
  📦 Invariant — 正在安装... 完成

装一次,后面就秒跑。


都能扫出什么?

| 风险 | 啥意思 | |------|------| | 🔴 插件劫持 | 它在偷偷改你 AI 的设置 | | 🔴 后门 | 它能悄悄执行任意代码 | | 🔴 远程控制 | 它在连外面的服务器 + 开 shell | | ⚠️ 偷数据 | 它读了你的密钥/文件然后发出去了 | | ⚠️ Prompt 注入 | 它在偷偷给你的 AI 加指令 | | ⚠️ Tool Poisoning | 工具描述里藏了恶意指令 | | ⚠️ 代码混淆 | 代码故意搞得看不懂,可能在藏什么 | | ℹ️ 权限过大 | 它要的权限比它需要的多 |


其他玩法

# HTML 报告,发给同事看
agent-shield scan ./dir --html -o report.html

# JSON,接到 CI/CD 里
agent-shield scan ./dir --json

# 英文报告
agent-shield scan ./dir --lang en

# SARIF,GitHub Code Scanning
agent-shield scan ./dir --sarif -o results.sarif

安装

# 推荐:用 npx,不用装
npx @elliotllliu/agent-shield scan ./my-skill/

# 或者全局装
npm install -g @elliotllliu/agent-shield

我们怎么想的

"我们不竞争 — 我们聚合。"

Snyk 有很好的 Agent 扫描能力。Cisco 有 skill-scanner。Semgrep 有 2000+ 条规则。Invariant 能抓 Tool Poisoning。每家都做得很好。

我们把它们全部聚合到一起。我们结合每一家的长处,交叉验证它们的发现,最终出一个统一的报表。每家引擎越强,AgentShield 就越强。

我们是 X 光机,不是医生。 我们照出里面有什么 — 你来决定要不要装。但我们会把每个专家的意见都摆在一起,让这个决定变得简单。


License

MIT