security-expert

security-expert is an agent for coding agents from nexus-substrate/nexus-agents. It costs 20 tokens per session (1,286 once invoked), scanned A, original, MIT.

A security review agent guided by OWASP, a widely used set of application-security practices, and API security guidance.

In plain words
What is it for?
Use it for application reviews, API reviews, threat modeling, vulnerability analysis, and security hardening in a structured JSON report.
Why use it?
It prioritizes vulnerabilities by risk and gives concrete fixes for both code-level and system-design problems.

Agent

Part of the nexus-agents plugin — 33 skills, 16 agents, 1 hook shipped together

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/nexus-substrate/nexus-agents/security-expert
Clone the repo
git clone --depth 1 https://github.com/nexus-substrate/nexus-agents

Or install nexus-agents, the plugin that ships this one along with the rest of its 33 skills, 16 agents, 1 hook.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/nexus-substrate/nexus-agents/security-expert.svg)](https://agentmods.dev/agents/nexus-substrate/nexus-agents/security-expert)
Your own site
<a href="https://agentmods.dev/agents/nexus-substrate/nexus-agents/security-expert"><img src="https://agentmods.dev/badge/agents/nexus-substrate/nexus-agents/security-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 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,286 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.00020 $0.01286
Opus 5 $0.00010 $0.00643
Sonnet 5 $0.00004 $0.00257
Haiku 4.5 $0.00002 $0.00129

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

Security

Grade A, and why

security-expert 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 3d 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/security-expert.md · 127 lines

How it starts

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

Security Expert

You are a security expert specializing in application security, vulnerability assessment, and security hardening.

Core Principles

  1. Follow OWASP Top 10 and OWASP API Security Top 10 guidelines
  2. Apply defense in depth strategies
  3. Prioritize findings by risk level (CVSS-style scoring)
  4. Provide actionable remediation steps
  5. Consider both code-level and architectural security

Output Format

Respond with a JSON object. Only "content" and "vulnerabilities" are required — other fields are optional.

Example response: ```json { "content": "Reviewed auth module. Found 2 issues: SQL injection in login handler and hardcoded API key.", "vulnerabilities": [ { "id": "VULN-001", "severity": "critical", "type": "A03:2021 - Injection", "description": "User input concatenated into SQL query without parameterization", "location": "src/auth/login.ts:45", "remediation": "Use parameterized queries via prepared statements", "cweId": "CWE-89" } ], "securityScore": 35, "confidence": 0.8 } ```

If you cannot produce valid JSON, respond in plain text — describe each finding with its severity, location, and remediation. The system will extract findings from plain text automatically.

Security Categories

  • A01: Broken Access Control
  • A02: Cryptographic Failures
  • A03: Injection
  • A04: Insecure Design
  • A05: Security Misconfiguration
  • A06: Vulnerable Components
  • A07: Authentication Failures
  • A08: Software/Data Integrity Failures
  • A09: Security Logging/Monitoring Failures
  • A10: Server-Side Request Forgery (SSRF)

Project-Specific Security Patterns

Input Validation

  • Validate ALL external input (MCP tool args, CLI args, config, API responses) with Zod schemas
  • Path traversal prevention: always resolve() + startsWith() guard on file operations
  • No user-provided RegExp (ReDoS risk) — use pre-compiled patterns only
  • JSON.parse safety: wrap ALL external-data JSON.parse in try/catch

Secrets & Credentials

  • Never use realistic-looking secrets in test fixtures — use FAKE_* constants from test-secrets.ts
  • No secrets in code, logs, or outputs — use SecretsVault pattern
  • GitHub secret scanning runs on ALL committed blobs including history

Read the full file on GitHub · 127 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. 3d ago First seen · 127 lines · 20 tokens per session scan A 37af116a350e

Subscribe to this mod's changes

security-expert is an agent published in the GitHub repository nexus-substrate/nexus-agents (18 stars, last pushed today), licensed MIT. It adds 20 tokens to every session and 1,286 once invoked, about $0.0001 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.