close-dependabot

A command for closing a Dependabot security alert, which is a warning about a possibly vulnerable software dependency on GitHub.

In plain words
What is it for?
Use it to inspect an alert's severity, affected package, versions, and fix status, then close an open alert for a justified reason or leave it open.
Why use it?
It checks the alert first and requires a stated reason, reducing the chance of hiding a real security problem by mistake.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/modelengine-group/fit-framework/close-dependabot
Clone the repo
git clone --depth 1 https://github.com/ModelEngine-Group/fit-framework

Made for: Claude Code.

Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,338 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00018 $0.02338
Opus 5 $0.00009 $0.01169
Sonnet 5 $0.00004 $0.00468
Haiku 4.5 $0.00002 $0.00234

Measured 2d ago against content hash cbcab98a5d6e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

close-dependabot scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/close-dependabot.md · 288 lines

How it starts

The opening of the file, as written. The whole thing — 288 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Close Dependabot Command

功能说明

关闭指定的 Dependabot 安全告警。在关闭前会要求用户确认并提供合理的理由,确保不会误关闭真实的安全风险。

执行流程

1. 获取安全告警信息

gh api repos/{owner}/{repo}/dependabot/alerts/<alert-number>

验证告警状态:

  • 如果已经是 dismissedfixed 状态,提示用户并退出
  • 如果是 open 状态,继续执行

2. 展示告警详情

向用户展示告警的关键信息:

🔒 安全告警 #{alert-number}

严重程度: {severity} 🔴/🟠/🟡/🟢
漏洞: {summary}
受影响包: {package-name} ({ecosystem})
当前版本: {current-version}
受影响范围: {vulnerable-version-range}
修复版本: {first-patched-version}

GHSA: {ghsa-id}
CVE: {cve-id}

3. 询问关闭理由

使用 AskUserQuestion 工具让用户选择关闭理由:

问题: "为什么要关闭这个安全告警?"

选项:

  1. 误报 (False Positive)

    • 描述: 漏洞代码路径在项目中未被使用,或配置已确保无法触发
    • 对应 API 参数: dismissed_reason: "no_bandwidth"
  2. 无法利用 (Not Exploitable)

    • 描述: 虽然依赖有漏洞,但在当前项目场景下无法被利用
    • 对应 API 参数: dismissed_reason: "tolerable_risk"
  3. 已有缓解措施 (Mitigated)

    • 描述: 已通过其他方式(配置、网络隔离等)缓解了风险
    • 对应 API 参数: dismissed_reason: "tolerable_risk"
  4. 无修复版本且风险可接受 (No Fix Available)

    • 描述: 目前没有修复版本,且评估后认为风险可接受
    • 对应 API 参数: dismissed_reason: "no_bandwidth"
  5. 测试或开发依赖 (Dev Dependency Only)

    • 描述: 仅在测试或开发环境使用,生产环境不受影响
    • 对应 API 参数: dismissed_reason: "tolerable_risk"
  6. 取消

    • 描述: 不关闭告警
    • 操作: 退出命令

4. 要求详细说明

如果用户选择关闭(非"取消"),要求用户提供详细的文字说明:

请提供详细的关闭理由(将记录到 GitHub):

说明要求

  • 最少 20 个字符
  • 清晰说明为什么此告警可以安全关闭
  • 如果是误报,说明为什么代码路径不会被触发
  • 如果有缓解措施,说明具体措施是什么

5. 最终确认

显示即将提交的信息,要求最终确认:

⚠️ 即将关闭安全告警 #{alert-number}

告警: {summary}
严重程度: {severity}
关闭理由类别: {选择的理由}
详细说明: {用户输入的说明}

是否确认关闭?(y/N)
  • 如果用户输入 yyes,继续执行
  • 否则,取消操作

6. 执行关闭操作

使用 GitHub API 关闭告警:

gh api --method PATCH \
  repos/{owner}/{repo}/dependabot/alerts/<alert-number> \
  -f state=dismissed \
  -f dismissed_reason="{API参数}" \
  -f dismissed_comment="{用户的详细说明}"

API 参数映射

  • dismissed_reason 的有效值(根据 GitHub API):
    • fix_started: 修复工作已开始
    • inaccurate: 告警不准确(误报)
    • no_bandwidth: 暂无资源处理
    • not_used: 受影响的代码未使用
    • tolerable_risk: 可接受的风险

Read the full file on GitHub · 288 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 288 lines · 18 tokens per session scan A cbcab98a5d6e

Subscribe to this mod's changes

close-dependabot is a command published in the GitHub repository ModelEngine-Group/fit-framework (2,117 stars, last pushed 5mo ago), licensed MIT. It adds 18 tokens to every session and 2,338 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.