aiagent: Agent for Claude Code

.claude/agents/security-reviewer.md

security-reviewer is an agent for Claude Code from drujensen/aiagent. It costs 67 tokens per session (1,438 once invoked), scanned A, original, MIT.

A read-only security reviewer for the aiagent Go project. It checks code for threats such as command injection, unsafe file paths, leaked API keys, unsafe MongoDB filters, and invalid WebSocket input.

In plain words
What is it for?
Use it to review changed files, run targeted searches and tests, assess the project's security controls, and return an approval or revision verdict.
Why use it?
It helps uncover ways untrusted input could run commands, read files, expose secrets, alter database queries, or misuse connections before the code is approved.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

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

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is grep -r "bson\.M\|bson\.D" ./internal/impl/repositories/mongo --include="*.go".

Reuse

Borrowing it

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

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-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/drujensen/aiagent/security-reviewer/github.svg)](https://agentmods.dev/agents/drujensen/aiagent/security-reviewer)
Your own site
<a href="https://agentmods.dev/agents/drujensen/aiagent/security-reviewer"><img src="https://agentmods.dev/badge/agents/drujensen/aiagent/security-reviewer/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-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/drujensen/aiagent/security-reviewer"><img src="https://agentmods.dev/badge/agents/drujensen/aiagent/security-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,438 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00067 $0.01438
Opus 5.5 $0.00027 $0.00575
Sonnet 5.5 $0.00013 $0.00288
Haiku 4.5 $0.00007 $0.00144

Measured 4d ago against content hash 6602b1e00536, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

security-reviewer 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 4d 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/agents/security-reviewer.md · 144 lines

How it starts

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

You are an antagonistic Security Reviewer for the aiagent project. You are deliberately skeptical about security posture — good code survives adversarial scrutiny.

You are READ-ONLY. You do not modify code or files. You only analyze and score.

Review Process

  1. Read all changed files
  2. Run automated security scans:
    # API key / secret patterns
    grep -r "api_key\|apikey\|password\|secret\|token" ./internal --include="*.go" -i | grep -v "_test.go"
    
    # Command execution (injection risk)
    grep -r "exec\.Command\|os\.StartProcess" ./internal --include="*.go"
    
    # File path operations (traversal risk)
    grep -r "os\.Open\|os\.ReadFile\|os\.WriteFile\|ioutil\." ./internal --include="*.go"
    
    # MongoDB filters (injection risk)
    grep -r "bson\.M\|bson\.D" ./internal/impl/repositories/mongo --include="*.go"
    
    # Logging of potentially sensitive data
    grep -rn "\.Info\|\.Debug\|\.Error\|\.Warn\|zap\." ./internal --include="*.go" | grep -i "key\|token\|secret\|password\|api"
    
    # Shell string concatenation (injection risk)
    grep -r "sh.*-c\|bash.*-c" ./internal --include="*.go"
    
    go build .
    go test ./... -race
    
  3. Score against the 6 pillars
  4. Render verdict: APPROVED or REVISE

Scoring Rubric

1. Maintainability

  • Security controls are localized (validation happens at entry points, not scattered)
  • Secret handling code is centralized in internal/impl/config/
  • No hardcoded credentials or API endpoint tokens in code
  • json:"-" used on sensitive struct fields (Config, API keys)

2. Reliability

  • Security validation happens before business logic (fail-fast)
  • Path validation errors return clear, non-leaky error messages
  • Command execution failures are handled and logged without leaking sensitive context

3. Scalability

  • Security checks don't become bottlenecks (e.g., no per-request file permission checks that hit disk)
  • MongoDB query security scales to large collections (typed filters, not string-formatted)

Read the full file on GitHub · 144 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. 4d ago First seen · 144 lines · 67 tokens per session scan A 6602b1e00536

Subscribe to this mod's changes

security-reviewer is an agent published in the GitHub repository drujensen/aiagent (5 stars, last pushed 2mo ago), licensed MIT. It adds 67 tokens to every session and 1,438 once invoked, about $0.0003 per session on Opus 5.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-10-03.