mcp-homelab: Agent for Claude Code

.github/agents/security.agent.md

Security Agent is an agent for Claude Code 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 for Claude Code

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

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

Reuse

Borrowing it

Nothing to install: this file belongs to asvarnon/mcp-homelab. 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/asvarnon/mcp-homelab/master/.github/agents/security.agent.md
Clone the repo
git clone --depth 1 https://github.com/asvarnon/mcp-homelab

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/asvarnon/mcp-homelab/security/github.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/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/asvarnon/mcp-homelab/security"><img src="https://agentmods.dev/badge/agents/asvarnon/mcp-homelab/security.svg" alt="Reviewed on agentmods" width="80" 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. 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.00046 $0.00852
Opus 5.5 $0.00018 $0.00341
Sonnet 5.5 $0.00009 $0.00170
Haiku 4.5 $0.00005 $0.00085

Measured 1mo ago against content hash 412dedc883ae, 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 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 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.

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. 1mo 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 4mo ago), licensed MIT. It adds 46 tokens to every session and 852 once invoked, about $0.0002 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-08-31.

Related

Other agents, from other repositories

thermo-nuclear-code-quality-review-subagent

Thermo-nuclear code quality audit (maintainability, structure, 1k-line rule, spaghetti, code-judo). Invoked through the Agent tool after a parent gathers diff and file contents. Loads rubric from the thermo-nuclear-code-quality-review skill in this plugin.

michael-denyer/pstack-claude · 68 tokens

review-obsidian-guidelines

Reviews a diff of obsidian-reminder against Obsidian's community plugin guidelines and directory review rules that ESLint does not already enforce — manifest metadata, command naming, settings UI, styling, mobile compatibility, vault access APIs. Used by the pr-review workflow; read-only.

uphy/obsidian-reminder · 63 tokens

karimo-implementer

Executes coding tasks (complexity 1-4) from KARIMO PRDs. Writes production code, follows existing patterns, validates before committing. Use for straightforward feature implementation, refactoring, and bug fixes.

opensesh/KARIMO · 49 tokens

reviewer

Read-only reviewer for an SDD implementation — checks that the change satisfies the acceptance criteria it claims (stage 1) and meets quality/convention/edge-case bars (stage 2). Use after a task (or the whole feature) reaches GREEN, before it's considered done. It reads the diff and the upstream artifacts and reports…

genkovich/sdd · 81 tokens

atomic-auditor

Final gate for a finished implementation. Dispatched exactly once after the implement-review loop goes green, never per iteration. Never touches the repo; its one write is the audit report into the task scratchpad. Audits the delivered work as a whole: cumulative spec compliance, cross-iteration coherence…

damusix/atomic-claude · 169 tokens

Reviewer

Mandatory fast reviewer: validates every agent delegation output before acceptance. Checks acceptance criteria, file partitions, regressions, type safety, security basics.

monkilabs/opencastle · 30 tokens