requirements-mcp-server: Command for Claude Code

.claude/commands/security-scan.md

security-scan is a command for Claude Code from sawadari/requirements-mcp-server. It costs 13 tokens per session (3,132 once invoked), scanned A, original, MIT.

A command that scans dependencies, source code, and project files for security weaknesses and generates a report. Dependencies are external packages your application uses; secrets are credentials such as API keys and passwords.

In plain words
What is it for?
Use it to scan everything or only dependencies, source code, or secrets, including checks for injection, cross-site scripting, unsafe file paths, dangerous regular expressions, and exposed keys.
Why use it?
It helps find vulnerable packages, unsafe code patterns, leaked credentials, and TypeScript problems before they reach users or production.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions Claude Code.

This is sawadari/requirements-mcp-server's own configuration. It tells Claude Code how to work on requirements-mcp-server itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything requirements-mcp-server configures →

Reuse

Borrowing it

Nothing to install: this file belongs to sawadari/requirements-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/sawadari/requirements-mcp-server/main/.claude/commands/security-scan.md
Clone the repo
git clone --depth 1 https://github.com/sawadari/requirements-mcp-server

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for security-scan

README.md
[![agentmods](https://agentmods.dev/badge/commands/sawadari/requirements-mcp-server/security-scan.svg)](https://agentmods.dev/commands/sawadari/requirements-mcp-server/security-scan)
Your own site
<a href="https://agentmods.dev/commands/sawadari/requirements-mcp-server/security-scan"><img src="https://agentmods.dev/badge/commands/sawadari/requirements-mcp-server/security-scan.svg" alt="Measured on agentmods" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,132 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.1 $0.00013 $0.03132
Opus 5 $0.00006 $0.01566
Sonnet 5 $0.00003 $0.00626
Haiku 4.5 $0.00001 $0.00313

Measured 6d ago against content hash f4d9049ed372, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

security-scan 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 6d 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/security-scan.md · 542 lines

How it starts

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

Security Scan Command

コードベースのセキュリティ脆弱性を自動スキャンし、レポートを生成します。

使用方法

/security-scan [target]

パラメータ

  • target (オプション): スキャン対象
    • all (デフォルト): 全スキャン実行
    • dependencies: 依存関係のみ
    • code: ソースコードのみ
    • secrets: シークレット検出のみ

実行内容

1. 依存関係スキャン (npm audit)

npm audit --json

検出される脆弱性:

  • Critical: 重大な脆弱性(即座に修正必要)
  • High: 高リスク脆弱性
  • Moderate: 中リスク脆弱性
  • Low: 低リスク脆弱性

2. ソースコードスキャン (ESLint Security Plugin)

npx eslint . --ext .ts,.js,.tsx,.jsx \
  --plugin security \
  --rule 'security/*: error'

検出される問題:

  • SQL Injection 脆弱性
  • XSS (Cross-Site Scripting) 脆弱性
  • Path Traversal 脆弱性
  • 危険な正規表現 (ReDoS)
  • 安全でない乱数生成
  • eval() の使用

3. シークレット検出 (git-secrets)

git secrets --scan

検出される情報:

  • API Keys
  • パスワード
  • アクセストークン
  • プライベートキー
  • AWS Credentials

4. TypeScript型安全性チェック

npm run typecheck

型安全性に関する問題を検出。

スキャンレポート

スキャン完了後、.ai/security/scan-YYYY-MM-DD.md にレポートが生成されます:

レポート例

# Security Scan Report - 2025-10-08

**Scan Time**: 2025-10-08T10:30:00Z
**Duration**: 45 seconds
**Status**: ⚠️ Issues Found

---

## 📊 Summary

| Category | Critical | High | Moderate | Low | Total |
|----------|----------|------|----------|-----|-------|
| Dependencies | 0 | 2 | 3 | 5 | 10 |
| Code | 0 | 1 | 0 | 2 | 3 |
| Secrets | 0 | 0 | 0 | 0 | 0 |
| **Total** | **0** | **3** | **3** | **7** | **13** |

**Overall Score**: 72/100 ⚠️ (Threshold: 80)

---

## 🚨 Critical Issues (0)

None found ✅

---

## 🔴 High Severity Issues (3)

### 1. Prototype Pollution in lodash

**Package**: [email protected]
**Severity**: High
**CWE**: CWE-1321
**CVSS**: 7.4

**Description**:
Versions of lodash prior to 4.17.19 are vulnerable to prototype pollution.

**Affected Locations**:
- node_modules/lodash/lodash.js

**Recommendation**:
```bash
npm update lodash@>=4.17.21

References:


2. XSS Vulnerability in User Input Handling

File: src/components/UserProfile.tsx:45 Severity: High CWE: CWE-79

Code:

// ❌ Unsafe
<div dangerouslySetInnerHTML={{ __html: userInput }} />

Recommendation:

// ✅ Safe
import DOMPurify from 'dompurify';
<div dangerouslySetInnerHTML={{
  __html: DOMPurify.sanitize(userInput)
}} />

🟡 Moderate Severity Issues (3)

1. Missing Rate Limiting

File: src/api/auth.ts:23 Severity: Moderate CWE: CWE-307

Recommendation: Implement rate limiting using express-rate-limit:

import rateLimit from 'express-rate-limit';

Read the full file on GitHub · 542 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. 6d ago First seen · 542 lines · 13 tokens per session scan A f4d9049ed372

Subscribe to this mod's changes

security-scan is a command published in the GitHub repository sawadari/requirements-mcp-server (2 stars, last pushed 10mo ago), licensed MIT. It adds 13 tokens to every session and 3,132 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-31.