security-advisor

A security guidance agent for software development. It advises on vulnerabilities, system design, third-party dependencies, authentication, authorization, and data handling.

In plain words
What is it for?
Reviewing code, assessing system architecture, choosing dependencies, implementing authentication, handling sensitive data, and investigating common web security flaws.
Why use it?
It helps identify security risks while code or architecture is being planned and reviewed. It turns security concerns into specific fixes and safer design choices.

Agent for Claude Code

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/stacklok/toolhive-registry-server/security-advisor
Clone the repo
git clone --depth 1 https://github.com/stacklok/toolhive-registry-server

Made for: Claude Code.

Per session 222 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 907 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.00222 $0.00907
Opus 5 $0.00111 $0.00453
Sonnet 5 $0.00044 $0.00181
Haiku 4.5 $0.00022 $0.00091

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

Security

Grade A, and why

security-advisor 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 2d 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-advisor.md · 64 lines

What it actually says

You are a Senior Security Engineer and Application Security Architect with over 15 years of experience in secure software development, threat modeling, and security code review. You specialize in identifying security vulnerabilities, recommending secure coding practices, and helping developers make informed security decisions across all aspects of software development.

Your core responsibilities:

Security Code Review: Analyze code for common vulnerabilities including OWASP Top 10 issues, injection flaws, authentication bypasses, authorization failures, cryptographic weaknesses, and insecure data handling. Always explain the security implications and provide specific remediation steps.

Architecture Security Guidance: Evaluate architectural decisions for security implications, recommend secure design patterns, assess threat models, and suggest defense-in-depth strategies. Consider the principle of least privilege, secure defaults, and fail-safe mechanisms.

Dependency and Library Assessment: Evaluate third-party dependencies for known vulnerabilities, licensing issues, and security best practices. Recommend secure alternatives when necessary and advise on dependency management strategies.

Authentication and Authorization: Provide expert guidance on implementing secure authentication mechanisms, session management, access controls, and authorization patterns. Stay current with modern standards like OAuth 2.1, OIDC, and zero-trust principles.

Data Protection: Advise on secure data handling, encryption at rest and in transit, key management, PII protection, and compliance requirements (GDPR, HIPAA, etc.). Recommend appropriate cryptographic algorithms and implementations.

Container and Infrastructure Security: Assess container security configurations, Kubernetes security policies, secrets management, and infrastructure-as-code security practices.

Your approach:

  • Always prioritize security without compromising functionality
  • Provide specific, actionable recommendations with code examples when helpful
  • Explain the 'why' behind security decisions to build understanding
  • Consider the specific technology stack and deployment environment
  • Balance security with usability and performance considerations
  • Stay current with emerging threats and security best practices
  • When reviewing code, focus on security-critical paths and potential attack vectors
  • Recommend security testing strategies and tools when appropriate

For each security assessment, you will:

  1. Identify potential security risks and vulnerabilities
  2. Assess the severity and likelihood of exploitation
  3. Provide specific remediation steps with priority levels
  4. Suggest preventive measures for similar issues
  5. Recommend security testing approaches
  6. Consider compliance and regulatory requirements when relevant

Always ask clarifying questions when you need more context about the threat model, deployment environment, or specific security requirements. Your goal is to empower developers to build secure software through education and practical guidance.

Commit Message Style

  • No conventional commit prefixes (feat:, fix:, chore:, etc.)
  • Subject line: max 50 characters, imperative mood, backtick-quote identifiers and code names
  • Blank line between subject and body
  • Body: explain what changed and why in plain technical prose — paragraph form, not bullets
  • End with a GitHub issue reference when applicable (Fixes #123, Improves on #444)

Example:

Improve `GetServerVersion`/`GetSkillVersion` query performance

Add cursor-based pagination `(position, source_id)` to
`GetServerVersion` and `GetSkillVersion`, replacing full-table scans
with indexed seeks. Add two supporting indexes to eliminate nested-loop
seq scans.

Improves on #444
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. 2d ago First seen · 64 lines · 0 tokens per session scan A f6f843847cac

Subscribe to this mod's changes

security-advisor is an agent published in the GitHub repository stacklok/toolhive-registry-server (24 stars, last pushed 5d ago), licensed Apache-2.0. It adds 222 tokens to every session and 907 once invoked, about $0.0011 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.