安全软件
点击放大

<di="center">
<img src="./prooflayer-logo.png" alt="ProofLayer" width="360"/>
Security scanner for AI coding agents, MCP servers, prompts, and AI-suggested packages.
Run it before Claude Code, Cursor, Windsurf, Cline, OpenCode, or another agent trusts new code, tools, prompts, or dependencies.
![npm downloads]()
![npm ]()

![CI]()
</div>
Scan any repo and get an A-F agent security grade:
Install the scanner into your AI coding client:
Replace claude-code with cursor, claude-desktop, windsurf, cline, kilo-code, opencode, or cody.
Audit an MCP ser adding it to an agent:
Check AI-generated imports for package hallucinations:
| Risk | Why agents need it | Command |
| --- | --- | --- |
| generated code | Agents can introduce SQL injection, XSS, command injection, unsafe crypto, and secrets | scan-project, scan-security, scan-diff |
| MCP ser | MCP tools can poison descriptions, spoof names, exfiltrate env vars, or execute commands | scan-mcp |
| Prompt injection | Agents often process untrusted docs, tickets, pages, and tool output | scan-prompt |
| Unsafe agent actions | Catch dangerous shell/file/network actions before execution | scan-action |
| Hallucinated packages | AI often invents dependency names that attackers can later squat | check-package, scan-packages |
| SBOM and CVEs | Generate CycloneDX SBOMs and scan dependencies with OSV.dev | sbom-generate, sbom- |
| Semantic review | LLM-powered review that uses project intent to find context-aware issues | cr-agent |
!Project scan demo
!MCP audit demo
!Package hallucination demo
Run a safe local demo that creates intentionally fixtures, scans them, and cleans them up.
Expected demo shape:
| Client | Setup |
| --- | --- |
| Claude Code | npx agent-security-scanner-mcp init claude-code |
| Cursor | npx agent-security-scanner-mcp init cursor |
| Claude Desktop | npx agent-security-scanner-mcp init claude-desktop |
| Windsurf | npx agent-security-scanner-mcp init windsurf |
| Cline | npx agent-security-scanner-mcp init cline |
| Kilo Code | npx agent-security-scanner-mcp init kilo-code |
| OpenCode | npx agent-security-scanner-mcp init opencode |
| Cody | npx agent-security-scanner-mcp init cody |
| Interacti | npx agent-security-scanner-mcp init |
Then restart the client. Your agent can call the scanner as an MCP tool.
Paste this into an agent task when you want it to work safely:
| Command | Use |
| --- | --- |
| scan-project <dir> | Full project scan with A-F grade |
| scan-security <file> | Single-file security scan |
| scan-diff --base main --target HEAD | Scan changed files only |
| scan-mcp <path> | Audit an MCP ser install |
| scan-prompt "<text>" | Detect prompt injection and jailbreak attempts |
| scan-action <type> <value> | Pre-execution safety check for shell/file/network actions |
| check-package <name> <ecosystem> | one package exists |
| scan-packages <file> <ecosystem> | imports/dependencies in a file |
| doctor | Check local setup health |
| quickstart --client cursor | Generate repo-specific next steps |
| share-kit | Generate public-safe launch/share copy |
| export-vanta | Export scan e to the ProofLayer Vanta integration |
All scanner outputs support context-friendly :
When installed as an MCP server, agents get these tool families:
| Tool family | Purpose |
| --- | --- |
| scan_security, fix_security, scan_git_diff, scan_project | Code and repo security |
| scan_mcp_server, scan_skill | MCP and AI skill security |
| scan_agent_prompt, scan_agent_action | Prompt/action safety |
| check_package, scan_packages | Package hallucination detection |
| sbom_generate, sbom_scan_, sbom_diff, sbom_export_report | Supply-chain and release e |
| get_compliance_controls, e | SOC2/GDPR/AIUC-1 technical e |
| scanner_health | Runtime diagnostics |
npx command gives an A-F security grade for AI-written code.cr-agent is bundled with the npm package for LLM-powered semantic review. It reads project intent, then looks for code that that intent.
Use it when rule-based scanning is not enough and the question is, "Does this code make sense for what this project is supposed to do?"
Useful before releases, SOC 2 e collection, reviews, and AI-generated dependency changes.
Run the scanner as an Apify Actor when you want a hosted API or scheduled scans:
v4.5.8 adds diff-scoped cr-agent semantic review, fixes nested repository diff lookups, and filters semantic findings to changed hunks so PR reviews stay focused on code that actually changed.
Detailed release history lives in CHANGELOG.md. The older README-embedded changelog is archived at archiIVE.md.
Is this only for MCP servers?
No. It scans normal repos, diffs, prompts, actions, packages, SBOMs, MCP servers, and AI skills.
Does it send my source code anywhere?
Rule-based CLI and MCP scans are local. cr-agent uses the provider you choose for semantic review.
Is it a replacement for npm audit?
No. It complements npm audit by catching AI-specific risks: hallucinated packages, prompt injection, MCP tool poisoning, unsafe agent actions, and generated code.
What should I run first?
Run npx agent-security-scanner-mcp scan-project . -- compact.
MIT
开发语言:JavaScript
Star 数:122
该项目属于安全软件方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕Security scanner MCP server for AI coding agents. Prompt injection firewall, package hallucination detection (4.3M+ packages), 1000+ vulnerability rules with AST & taint analysis, auto-fix.展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。
| 资源标题 | agent-security-scanner-mcp - Security scanner MCP server for AI coding agents. |
| 所属分类 | 安全软件 |
| 发布作者 | admin |
| 发布时间 | 2026-10-05 22:42:02 |
| 下载权限 | 免费下载 |
| 附件数量 | 2 个下载链接 |
| 浏览次数 | 69 |
| 讨论数量 | 0 |
| 主题状态 | 正常讨论中 |