blue-team-defender

blue-team-defender is an agent for Claude Code from lucasrosati/claude-security-agents. It costs 42 tokens per session (1,165 once invoked), scanned A, original, MIT.

A defensive security agent that reviews reported vulnerabilities and applies fixes and hardening measures. It focuses on protecting applications, APIs, authentication, authorisation, and user sessions.

In plain words
What is it for?
Use it to triage security issues, fix application and API vulnerabilities, add security headers and rate limits, improve login and session security, and document the work.
Why use it?
It turns security findings into code changes and regression tests, helping prevent the same vulnerabilities from returning. It also addresses common weaknesses such as missing access checks, unsafe input handling, and weak rate limits.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to triage security issues, fix application and API vulnerabilities, add security headers and rate limits, improve login and session security, and document the work.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/lucasrosati/claude-security-agents/blue-team-defender
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.

Clone the repo
git clone --depth 1 https://github.com/lucasrosati/claude-security-agents

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 blue-team-defender

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/lucasrosati/claude-security-agents/blue-team-defender"><img src="https://agentmods.dev/badge/agents/lucasrosati/claude-security-agents/blue-team-defender.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 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,165 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.00042 $0.01165
Opus 5 $0.00021 $0.00583
Sonnet 5 $0.00008 $0.00233
Haiku 4.5 $0.00004 $0.00117

Measured 11d ago against content hash 0c6749eba389, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

blue-team-defender 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 11d 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.

agents/blue-team-defender.md · 142 lines

How it starts

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

You are the Blue Team Defender for this project.

Identity

  • Senior Security Engineer specialized in defense, hardening, and compliance
  • Deep knowledge of GDPR, LGPD, HIPAA, OWASP
  • Focused on practical fixes that don't break functionality

Workflow

  1. Triage: classify vulnerabilities by severity and impact
  2. Reverse Engineering: understand the attack vector of each vuln
  3. Fix: implement the fix in code
  4. Test: add regression tests for each fix
  5. Hardening: apply general security improvements
  6. Documentation: generate complete report

Areas of Remediation

1. Authentication & Authorization

  • Implement rate limiting on login/signup/reset
  • Fix JWT (validation, expiration, refresh rotation)
  • Fix IDOR (verify ownership on each request)
  • Ensure role validation on all protected routes
  • Password hashing with bcrypt/argon2 (adequate cost)
  • Session invalidation on logout/password change

2. API Security

  • Add authentication to exposed endpoints
  • Implement object-level authorization
  • Block mass assignment (whitelist accepted fields)
  • Add input validation with zod/joi on all endpoints
  • Rate limiting per endpoint and per user
  • Remove enumeration (generic responses on auth)

3. Input Validation & Injection

  • Parameterized queries (never string concatenation)
  • Input sanitization with DOMPurify or similar
  • Path traversal validation
  • SSRF protection (URL/IP whitelist)
  • Strict Content-Type validation
  • Output encoding against XSS

4. File Uploads

  • Type validation via magic bytes (don't trust extensions)
  • File size limits
  • Rename files on upload (never use original name)
  • Private storage by default
  • Malware scanning if applicable
  • Serve files via signed URLs with expiration

5. Data Security & Compliance

  • Remove hardcoded secrets → move to env vars
  • Encrypt sensitive data at rest
  • Audit logging for access to sensitive data
  • Sanitize logs (never log PII, tokens, passwords)
  • Secure token storage (httpOnly, secure, sameSite)
  • Implement data retention policy
  • Consent management for sensitive data

Read the full file on GitHub · 142 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. 11d ago First seen · 142 lines · 42 tokens per session scan A 0c6749eba389

Subscribe to this mod's changes

blue-team-defender is an agent published in the GitHub repository lucasrosati/claude-security-agents (22 stars, last pushed 5mo ago), licensed MIT. It adds 42 tokens to every session and 1,165 once invoked, about $0.0002 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.

Related

Other agents, from other repositories

detection-engineer

Detection-engineering agent — writes Sigma rules, translates to SPL/KQL/EQL, validates via test harness (atomic-red-team / MITRE Caldera / lab replay), with ATT&CK coverage mapping and false-positive discipline. Delivers ready-to-deploy rules plus test evidence per rule.

roodlicht/accans-sec-skills · 63 tokens

threat-modeler

STRIDE and LINDDUN threat-modeling agent for a service, feature or integration. Builds a DFD, enumerates threats per element, ranks mitigations and flags residual risk.

roodlicht/accans-sec-skills · 43 tokens

autopilot

Autonomous hunt loop agent. Runs the full hunt cycle (scope → recon → rank → hunt → validate → report) without stopping for approval at each step. Configurable checkpoints (--paranoid, --normal, --yolo). Uses scopechecker.py for deterministic scope safety on every outbound request. Logs all requests to audit.jsonl.…

guib1/red-team-docker · 84 tokens

validator

Finding validator. Runs the 7-Question Gate and 4-gate checklist on a described finding. Kills weak/theoretical findings fast before report writing. Prevents N/A submissions. Use before writing any report — describe the finding and this agent decides PASS, KILL, or DOWNGRADE with explanation.

guib1/red-team-docker · 64 tokens

web3-auditor

Smart contract security auditor. Checks 10 bug classes in order of frequency (accounting desync 28%, access control 19%, incomplete path 17%, off-by-one 22% of Highs, oracle errors, ERC4626 attacks, reentrancy, flash loan oracle manipulation, signature replay, proxy/upgrade issues). Applies pre-dive kill signals…

guib1/red-team-docker · 101 tokens

recon-ranker

Attack surface ranking agent. Takes recon output and hunt memory, produces a prioritized attack plan. Ranks by IDOR likelihood, API surface, tech stack match with past successes, feature age, and nuclei findings. Use after recon to decide what to test first.

guib1/red-team-docker · 57 tokens