Source profileQuality 78/100Review permissions

affaan-m/ECC/docs/zh-CN/skills/security-scan/SKILL.md

security-scan

Review security-scan's use cases, installation, workflow, and original source instructions.

Source repository stars
234,327
Declared platforms
0
Static risk flags
1
Last source update
2026-07-27
Source checked
2026-07-28

Decision brief

What it does—and where it fits

使用 AgentShield 审计您的 Claude Code 配置中的安全问题。

Best for

    Not for

    • Tasks that require unconfirmed production actions or broad system permissions.
    • Environments where the pinned source and install steps cannot be inspected.

    Compatibility matrix

    Platform support, with evidence labels

    PlatformStatusEvidenceWhat to check
    CodexNot declaredNo explicit evidencePortability before use
    Claude CodeNot declaredNo explicit evidencePortability before use
    CursorNot declaredNo explicit evidencePortability before use
    Gemini CLINot declaredNo explicit evidencePortability before use
    Open the compatibility checker

    Installation

    Inspect first. Install second.

    The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

    Source-detected install commandSource
    npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-CN/skills/security-scan"
    Safe inspection promptEditorial

    Inspect the Agent Skill "security-scan" from https://github.com/affaan-m/ECC/blob/4e973d3eaf92d97f8d2e2d8abb39d8bdc8711b38/docs/zh-CN/skills/security-scan/SKILL.md at commit 4e973d3eaf92d97f8d2e2d8abb39d8bdc8711b38. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

    Workflow

    What the source asks the agent to do

    1. 01

      何时激活

      设置新的 Claude Code 项目时 修改 .claude/settings.json、CLAUDE.md 或 MCP 配置后 提交配置更改前 加入具有现有 Claude Code 配置的新代码库时 定期进行安全卫生检查时

      设置新的 Claude Code 项目时修改 .claude/settings.json、CLAUDE.md 或 MCP 配置后提交配置更改前
    2. 02

      扫描内容

      Review the “扫描内容” section in the pinned source before continuing.

      Review and apply the “扫描内容” source section.
    3. 03

      先决条件

      必须安装 AgentShield。检查并在需要时安装:

      必须安装 AgentShield。检查并在需要时安装:
    4. 04

      Check if installed

      Review the “Check if installed” section in the pinned source before continuing.

      Review and apply the “Check if installed” source section.

    Permission review

    Static risk signals and limitations

    Runs scripts

    medium · line 29

    The documentation asks the agent to run terminal commands or scripts.

    npx ecc-agentshield --version

    Runs scripts

    medium · line 32

    The documentation asks the agent to run terminal commands or scripts.

    npm install -g ecc-agentshield

    Evidence record

    Why each signal appears

    EvidenceSourceComputedTestedEditorial
    SignalValueEvidence typeMeaning
    Quality score78/100ComputedDocumentation, specificity, maintenance, and trust rules
    Repository stars234,327SourceRepository attention, not individual Skill quality
    Compatibility0 platformsSourceDeclared in the catalog source record
    Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

    Pinned source

    Provenance and original SKILL.md

    Repository
    affaan-m/ECC
    Skill path
    docs/zh-CN/skills/security-scan/SKILL.md
    Commit
    4e973d3eaf92d97f8d2e2d8abb39d8bdc8711b38
    License
    MIT
    Collected
    2026-07-28
    Default branch
    main
    View the original SKILL.md

    安全扫描技能

    使用 AgentShield 审计您的 Claude Code 配置中的安全问题。

    何时激活

    • 设置新的 Claude Code 项目时
    • 修改 .claude/settings.jsonCLAUDE.md 或 MCP 配置后
    • 提交配置更改前
    • 加入具有现有 Claude Code 配置的新代码库时
    • 定期进行安全卫生检查时

    扫描内容

    文件检查项
    CLAUDE.md硬编码的密钥、自动运行指令、提示词注入模式
    settings.json过于宽松的允许列表、缺失的拒绝列表、危险的绕过标志
    mcp.json有风险的 MCP 服务器、硬编码的环境变量密钥、npx 供应链风险
    hooks/通过 ${file} 插值导致的命令注入、数据泄露、静默错误抑制
    agents/*.md无限制的工具访问、提示词注入攻击面、缺失的模型规格

    先决条件

    必须安装 AgentShield。检查并在需要时安装:

    # Check if installed
    npx ecc-agentshield --version
    
    # Install globally (recommended)
    npm install -g ecc-agentshield
    
    # Or run directly via npx (no install needed)
    npx ecc-agentshield scan .
    

    使用方法

    基础扫描

    针对当前项目的 .claude/ 目录运行:

    # Scan current project
    npx ecc-agentshield scan
    
    # Scan a specific path
    npx ecc-agentshield scan --path /path/to/.claude
    
    # Scan with minimum severity filter
    npx ecc-agentshield scan --min-severity medium
    

    输出格式

    # Terminal output (default) — colored report with grade
    npx ecc-agentshield scan
    
    # JSON — for CI/CD integration
    npx ecc-agentshield scan --format json
    
    # Markdown — for documentation
    npx ecc-agentshield scan --format markdown
    
    # HTML — self-contained dark-theme report
    npx ecc-agentshield scan --format html > security-report.html
    

    自动修复

    自动应用安全的修复(仅修复标记为可自动修复的问题):

    npx ecc-agentshield scan --fix
    

    这将:

    • 用环境变量引用替换硬编码的密钥
    • 将通配符权限收紧为作用域明确的替代方案
    • 绝不修改仅限手动修复的建议

    Opus 4.6 深度分析

    运行对抗性的三智能体流程以进行更深入的分析:

    # Requires ANTHROPIC_API_KEY
    export ANTHROPIC_API_KEY=your-key
    npx ecc-agentshield scan --opus --stream
    

    这将运行:

    1. 攻击者(红队) — 寻找攻击向量
    2. 防御者(蓝队) — 建议加固措施
    3. 审计员(最终裁决) — 综合双方观点

    初始化安全配置

    从头开始搭建一个新的安全 .claude/ 配置:

    npx ecc-agentshield init
    

    创建:

    • 具有作用域权限和拒绝列表的 settings.json
    • 遵循安全最佳实践的 CLAUDE.md
    • mcp.json 占位符

    GitHub Action

    添加到您的 CI 流水线中:

    - uses: affaan-m/agentshield@v1
      with:
        path: '.'
        min-severity: 'medium'
        fail-on-findings: true
    

    严重性等级

    等级分数含义
    A90-100安全配置
    B75-89轻微问题
    C60-74需要注意
    D40-59显著风险
    F0-39严重漏洞

    结果解读

    关键发现(立即修复)

    • 配置文件中硬编码的 API 密钥或令牌
    • 允许列表中存在 Bash(*)(无限制的 shell 访问)
    • 钩子中通过 ${file} 插值导致的命令注入
    • 运行 shell 的 MCP 服务器

    高优先级发现(生产前修复)

    • CLAUDE.md 中的自动运行指令(提示词注入向量)
    • 权限配置中缺少拒绝列表
    • 具有不必要 Bash 访问权限的代理

    中优先级发现(建议修复)

    • 钩子中的静默错误抑制(2>/dev/null|| true
    • 缺少 PreToolUse 安全钩子
    • MCP 服务器配置中的 npx -y 自动安装

    信息性发现(了解情况)

    • MCP 服务器缺少描述信息
    • 正确标记为良好实践的限制性指令

    链接

    Alternatives

    Compare before choosing