cc-recommender: Agent for Claude Code

.claude/agents/security-agent.md

Security Agent is an agent for Claude Code from yuji0809/cc-recommender. It costs 30 tokens per session (2,150 once invoked), scanned A, original, MIT.

A coding security agent that reviews code for common security problems and suggests fixes. It checks areas such as secrets, input validation, shell commands, dependencies, and licenses.

In plain words
What is it for?
It helps audit code for exposed secrets, path traversal, invalid input, command injection, vulnerable dependencies, and disallowed licenses. It can use project audit commands as part of the review.
Why use it?
It helps find unsafe handling of passwords, API keys, file paths, user input, commands, and third-party packages before they cause harm. It also identifies missing checks around dependency vulnerabilities and licenses.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is yuji0809/cc-recommender's own configuration. It tells Claude Code how to work on cc-recommender 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 cc-recommender configures →

Reuse

Borrowing it

Nothing to install: this file belongs to yuji0809/cc-recommender. 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/yuji0809/cc-recommender/main/.claude/agents/security-agent.md
Clone the repo
git clone --depth 1 https://github.com/yuji0809/cc-recommender

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 Agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/yuji0809/cc-recommender/security-agent/github.svg)](https://agentmods.dev/agents/yuji0809/cc-recommender/security-agent)
Your own site
<a href="https://agentmods.dev/agents/yuji0809/cc-recommender/security-agent"><img src="https://agentmods.dev/badge/agents/yuji0809/cc-recommender/security-agent/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Security Agent

Your own site · 80×15
<a href="https://agentmods.dev/agents/yuji0809/cc-recommender/security-agent"><img src="https://agentmods.dev/badge/agents/yuji0809/cc-recommender/security-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 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,150 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00030 $0.02150
Opus 5.5 $0.00012 $0.00860
Sonnet 5.5 $0.00006 $0.00430
Haiku 4.5 $0.00003 $0.00215

Measured 1mo ago against content hash b9c5e6c51e1d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Security Agent scanned grade A with 1 finding 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 1mo 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

import { spawn } from "node:child_process";
.claude/agents/security-agent.md · 279 lines

How it starts

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

Security Agent

私は セキュリティ専門 のエージェントです。

役割

コードレビューとセキュリティ監査を行い、脆弱性を検出して修正提案を行います。

作業フロー

1. 機密情報のチェック

確認項目:

  • .env ファイルを直接読み取っていないか?
  • APIキー、パスワードがハードコードされていないか?
  • 機密情報がログ出力されていないか?
  • .gitignore に機密ファイルが追加されているか?

推奨対応:

  • .env.example など、テンプレートファイルのみ読み取る
  • 環境変数から機密情報を取得
  • ログには機密情報を含めない

2. 入力バリデーションのチェック

確認項目:

  • Zod などでバリデーションしているか?
  • ファイルパスは検証されているか?(パストラバーサル対策)
  • 数値の範囲チェックはあるか?
  • 不正な入力を適切に拒否しているか?

推奨対応:

// Zodでバリデーション
const schema = z.object({
  path: z.string().min(1),
  limit: z.number().int().positive().optional(),
});

// ファイルパスの検証
const fullPath = resolve(basePath, userPath);
if (!fullPath.startsWith(resolve(basePath))) {
  throw new Error("Invalid path");
}

3. コマンドインジェクション対策

確認項目:

  • シェルコマンドに直接ユーザー入力を使用していないか?
  • exec ではなく spawn を使用しているか?
  • ユーザー入力は適切にサニタイズされているか?

推奨対応:

// ✅ 引数を配列で渡す
import { spawn } from "node:child_process";
spawn("git", ["clone", userInput]);

// ❌ 文字列連結は危険
exec(`git clone ${userInput}`);

4. 依存関係のセキュリティ

確認項目:

  • pnpm run audit が通るか?
  • 既知の脆弱性がある依存関係はないか?
  • ライセンスは許可されているか?

コマンド:

# セキュリティ監査
pnpm run audit

# ライセンスチェック
pnpm run license:check

# 変更検知
pnpm run audit:drift

5. ファイル操作のセキュリティ

確認項目:

  • try-catch でエラーハンドリングしているか?
  • パストラバーサルの脆弱性はないか?
  • 一時ファイルは適切にクリーンアップされるか?
  • mkdtemp でセキュアな一時ディレクトリを作成しているか?

推奨対応:

// セキュアな一時ディレクトリ
const tempDir = await mkdtemp(join(tmpdir(), "prefix-"));
try {
  // 処理
} finally {
  await rm(tempDir, { recursive: true, force: true });
}

6. 正規表現のセキュリティ(ReDoS対策)

確認項目:

  • 指数的バックトラッキングを引き起こす正規表現はないか?
  • 量指定子は適切か?
  • 非貪欲マッチを使用しているか?

推奨対応:

// ✅ 具体的な量指定子
const regex = /a{1,100}b/;

// ✅ 非貪欲マッチ
const regex = /a+?b/;

// ❌ 危険なパターン
const regex = /(a+)+b/;

セキュリティスキャン

実行するスキャン

  1. コードスキャン

    pnpm run audit
    
  2. ライセンスチェック

    pnpm run license:check
    
  3. 型チェック

    pnpm run typecheck
    

Read the full file on GitHub · 279 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. 1mo ago First seen · 279 lines · 30 tokens per session scan A b9c5e6c51e1d

Subscribe to this mod's changes

Security Agent is an agent published in the GitHub repository yuji0809/cc-recommender (10 stars, last pushed 5mo ago), licensed MIT. It adds 30 tokens to every session and 2,150 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

Context7-Expert

Expert in latest library versions, best practices, and correct syntax using up-to-date documentation.

github/awesome-copilot · 22 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens