security-scan
Scan your Claude Code configuration (.claude/ directory) with AgentShield to find security vulnerabilities, misconfigurations, and injection risks. Checks CLAUDE.md, settings.json, MCP servers, hooks, and agent definitions.
Translation reviewedRead the original Chinese text
使用AgentShield扫描您的Claude代码配置(.claude/目录),以发现安全漏洞、配置错误和注入风险。检查CLAUDE.md、settings.json、MCP服务器、钩子和代理定义。
Target: Cloud, operations & security. Automatically collected · unverified.
Excerpt from the author’s documentation
Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.
Read the original Chinese text
Topics in the source
- 安全扫描技能
- 何时激活
- 扫描内容
- 先决条件
- 使用方法
- 基础扫描
- 输出格式
- 自动修复
使用 AgentShield 审计您的 Claude Code 配置中的安全问题。 设置新的 Claude Code 项目时 修改 .claude/settings.json、CLAUDE.md 或 MCP 配置后 提交配置更改前 加入具有现有 Claude Code 配置的新代码库时 定期进行安全卫生检查时 | 文件 | 检查项 | |------|--------| | CLAUDE.md | 硬编码的密钥、自动运行指令、提示词注入模式 | | settings.json | 过于宽松的允许列表、缺失的拒绝列表、危险的绕过标志 | | mcp.json | 有风险的 MCP 服务器、硬编码的环境变量密钥、npx 供应链风险 | | hooks/ | 通过 ${file} 插值导致的命令注入、数据泄露、静默错误抑制 | | agents/.md | 无限制的工具访问、提示词注入攻击面、缺失的模型规格 | 必须安装 AgentShield。检查并在需要时安装: 针对当前项目的 .claude/ 目录运行: 自动应用安全的修复(仅修复标记为可自动修复的问题): 这将: 用环境变量引用替换硬编码的密钥 将通配符权限收紧为作用域明确的替代方案 绝不修改仅限手动修复的建议 运行对抗性的三智能体流程以进行更深入的分析: 这将运行: 1. 攻击者(红队) — 寻找攻击向量 2. 防御者(蓝队) — 建议加固措施 3. 审计员(最终裁决) — 综合双方观点 从头开始搭建一个新的安全 .claude/ 配置: 创建: 具有作用域权限和拒绝列表的 settings.json 遵循安全最佳实践的 CLAUDE.md mcp.json 占位符 添加到您的 CI 流水线中: | 等级 | 分数 | 含义 | |-------|-------|---------| | A | 90-100 | 安全配置 | | B | 75-89 | 轻微问题 | | C | 60-74 | 需要注意 | | D | 40-59 | 显著风险 | | F | 0-39 | 严重漏洞 | 配置文件中硬编码的 API 密钥或令牌 允许列表中存在 Bash()(无限制的 shell 访问) 钩子中通过 ${file} 插值导致的命令注入 运行 shell 的 MCP 服务器 CLAUDE.md 中的自动运行指令(提示词注入向量) 权限配置中缺少拒绝列表 具有不必要 Bash 访问权限的代理 钩子中的静默错误抑制(2>/dev/null、|| true) 缺少 PreToolUse 安全钩子 MCP 服务器配置中的 npx -y 自动安装 MCP 服务器缺少描述信息 正确标记为良好实践的限制性指令 GitHub: github.com/affaan-m/agentshield npm: npmjs.com/
This is an excerpt. Refer to the complete source and its current requirements.
- Source repository
- affaan-m/ECC
- Source file
- docs/zh-CN/skills/security-scan/SKILL.md
- Fixed revision
- d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
Requirements
- Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.
A small first task
先阅读原作者说明,再决定是否在自己的 AI 工具中使用。
Instructions for your AI tool
- Claude Desktop: resource-specific guide not available yet
- Claude Code: resource-specific guide not available yet
- Cursor: resource-specific guide not available yet
- Codex: resource-specific guide not available yet
Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.
Sources and evidence
This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.
Author: affaan-m/ECC · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T15:01:42.610Z.
Categories are inferred from names, descriptions and paths. They do not establish compatibility.
License and attribution
MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.
Original license ↗Synchronization, copying and user-reported success do not mark a resource as runtime-tested.
Limitations and notes
- Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.