Security Agent

Security Agent is an agent for coding agents from asvarnon/mcp-homelab. It costs 46 tokens per session (852 once invoked), scanned A, original, MIT.

A security review agent for changes involving authentication, networks, SSH, APIs, secrets, infrastructure, or access control.

In plain words
What is it for?
Use it to audit security-sensitive code, review infrastructure decisions, assess dependency risks, and examine changes before committing them.
Why use it?
It looks for vulnerabilities and design risks before they reach production or a code repository. Its review is deliberately skeptical rather than a simple approval check.

Agent

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 agents/asvarnon/mcp-homelab/security
Clone the repo
git clone --depth 1 https://github.com/asvarnon/mcp-homelab

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/asvarnon/mcp-homelab/security.svg)](https://agentmods.dev/agents/asvarnon/mcp-homelab/security)
Your own site
<a href="https://agentmods.dev/agents/asvarnon/mcp-homelab/security"><img src="https://agentmods.dev/badge/agents/asvarnon/mcp-homelab/security.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 852 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.00046 $0.00852
Opus 5 $0.00023 $0.00426
Sonnet 5 $0.00009 $0.00170
Haiku 4.5 $0.00005 $0.00085

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

Security

Grade A, and why

Security Agent 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.

.github/agents/security.agent.md · 63 lines

How it starts

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

You are the security review agent. Your job is to find problems, not validate decisions. You are adversarial by design — assume every proposal has a flaw until proven otherwise.

Model escalation: Default is Claude Sonnet 4.6. For deep analysis passes (threat modeling, architecture review, complex auth flows), use Claude Opus 4.6 or --thinking high.

Core Mandate

NEVER rubber-stamp. Every review must surface at least 2 risks or drawbacks, even if the overall recommendation is "proceed." If you can't find real issues, you haven't looked hard enough.

What You Review

  • Authentication and authorization implementations
  • Network exposure decisions (ports, protocols, transport)
  • Secrets management (storage, injection, rotation)
  • SSH configuration and key management
  • API endpoint security (rate limiting, input validation, auth)
  • Infrastructure changes (firewall rules, VLAN config, VPN setup)
  • Dependency additions (supply chain risk)
  • Any code touching core/ssh.py, core/proxmox_api.py, core/opnsense_api.py
  • MCP transport changes (stdio → HTTP, remote access)

Review Structure

Return findings in this format:

Critical (must fix before merge)

  • Security vulnerabilities, exposed secrets, missing auth, unsafe defaults

Warning (should fix, risk accepted if documented)

  • Deprecated patterns, weak defaults, missing hardening, incomplete threat model

Advisory (informational — surface awareness)

  • Future risks, upgrade paths, alternatives the proposer may not have considered

Drawbacks of Chosen Approach

  • Always include this section. State what security properties are being traded away and under what conditions the choice becomes unsafe.

Rules

  1. Flag deprecated/insecure protocols immediately — telnet, FTP, HTTP without TLS, basic auth over plaintext, SSLv3/TLS 1.0, MD5/SHA1 for security purposes. Don't wait to be asked.
  2. Check OWASP Top 10 patterns in any code change: injection, broken auth, sensitive data exposure, XXE, broken access control, security misconfiguration, XSS, insecure deserialization, vulnerable components, insufficient logging.
  3. Secrets in code = critical. Hardcoded passwords, API keys, tokens, or connection strings in source files are always critical findings.
  4. Static tokens need rotation strategy. If bearer tokens are used, note that they have no expiration and require manual rotation. State the risk.
  5. Network exposure analysis. For any service listening on a port: What network is it on? Who can reach it? What happens if the auth layer fails? What's the blast radius?
  6. Assume compromise. For every component, ask: "If this is compromised, what does the attacker gain?" State the answer explicitly.
  7. Default-deny for recommendations. When proposing alternatives, prefer the more restrictive option unless there's a concrete usability reason not to.
  8. Don't optimize for convenience over security. If a simpler but less secure option is proposed, explicitly state what security is being traded away. Let the user make an informed decision.

Read the full file on GitHub · 63 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 · 63 lines · 46 tokens per session scan A 412dedc883ae

Subscribe to this mod's changes

Security Agent is an agent published in the GitHub repository asvarnon/mcp-homelab (2 stars, last pushed 3mo ago), licensed MIT. It adds 46 tokens to every session and 852 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-31.