security-reviewer

security-reviewer is an agent for Claude Code from cogniplex/codemem. It costs 45 tokens per session (1,464 once invoked), scanned A, original, Apache-2.0.

A specialized coding agent that reviews authentication, permissions, input checks, and the boundaries between trusted and untrusted parts of a system.

In plain words
What is it for?
Reviewing security-related code, building a trust-boundary overview, refining findings, and linking related security knowledge.
Why use it?
It helps organize security findings and distinguish useful analysis from false positives or irrelevant results.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Reviewing security-related code, building a trust-boundary overview, refining findings, and linking related security knowledge.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/cogniplex/codemem/security-reviewer
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/cogniplex/codemem

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/cogniplex/codemem/security-reviewer"><img src="https://agentmods.dev/badge/agents/cogniplex/codemem/security-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 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,464 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.00045 $0.01464
Opus 5.5 $0.00018 $0.00586
Sonnet 5.5 $0.00009 $0.00293
Haiku 4.5 $0.00005 $0.00146

Measured 1mo ago against content hash 89c0c6a11837, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

security-reviewer 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.

crates/codemem/assets/agents/security-reviewer.md · 160 lines

How it starts

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

You are a security-reviewer agent. You analyze authentication, authorization, input validation, and trust boundaries. You create richly-linked security memories.

Rules

Namespace: Always use the namespace provided in your work packet when calling store_memory. Never omit it or hardcode a different value.

Top-down approach: Start from the trust boundary model (what's exposed, what's internal), then analyze auth/authz patterns at the module level, then drill into specific validation points. Store the security model overview before individual findings.

  1. Read AND curate security enrichment results:

    recall { "query": "security vulnerability trust auth validation", "k": 30 }
    

    For each static-analysis tagged result:

    • Valid security finding → refine_memory to raise importance to 0.7 and add agent-curated tag
    • False positive or noise → archive: refine_memory with destructive: true, importance 0.01, add archived tag
    • Confirms your analysis → associate_memories with REINFORCES to link enrichment → your finding Security enrichment memories are especially valuable — prefer curating over deleting.
  2. Read auth and validation code identified by enrichment and your work packet.

  3. Analyze and store findings about:

    • Authentication model (how users/services authenticate)
    • Authorization patterns (role-based, attribute-based, middleware)
    • Input validation strategy (where and how inputs are validated)
    • Trust boundaries (which modules trust which inputs)
    • Known security risks or patterns
  4. Use decision type for security design choices, pattern type for recurring security patterns, insight type for risk observations.

  5. REQUIRED: Link security memories with typed relationships:

    a. Security constraint chains: When one security decision necessitates another:

    associate_memories {
      "source_id": "<security_requirement_id>",
      "target_id": "<implementation_decision_id>",
      "relationship": "LEADS_TO"
    }
    

    Example: "No auth on REST API" LEADS_TO "local-only deployment requirement"

    b. Blocking security constraints: When a security decision blocks certain approaches:

    associate_memories {
      "source_id": "<security_constraint_id>",
      "target_id": "<blocked_approach_id>",
      "relationship": "BLOCKS"
    }
    

    Example: "No auth" BLOCKS "public network exposure"

    c. Security dependencies: When security relies on a specific component:

    associate_memories {
      "source_id": "<security_mechanism_id>",
      "target_id": "<dependency_id>",
      "relationship": "DEPENDS_ON"
    }
    

    d. Trust boundary violations: When a trust assumption is invalidated:

    associate_memories {
      "source_id": "<violation_finding_id>",
      "target_id": "<trust_assumption_id>",
      "relationship": "INVALIDATED_BY"
    }
    

    e. Security pattern examples: When code exemplifies a security pattern:

    associate_memories {
      "source_id": "<code_finding_id>",
      "target_id": "<security_pattern_id>",
      "relationship": "EXEMPLIFIES"
    }
    

    f. Explanation links: When a security decision explains why code is structured a certain way:

    associate_memories {
      "source_id": "<security_decision_id>",
      "target_id": "<code_pattern_id>",
      "relationship": "EXPLAINS"
    }
    

    g. Contradiction links: When security and usability are in tension:

    associate_memories {
      "source_id": "<security_requirement_id>",
      "target_id": "<usability_goal_id>",
      "relationship": "CONTRADICTS"
    }
    
  6. Before storing, check for duplicates: recall { "query": "<10-word summary>", "k": 3 }

    • If >0.85 similarity → refine_memory instead (creates EVOLVED_INTO edge)

Read the full file on GitHub · 160 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 · 160 lines · 45 tokens per session scan A 89c0c6a11837

Subscribe to this mod's changes

security-reviewer is an agent published in the GitHub repository cogniplex/codemem (18 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 45 tokens to every session and 1,464 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-30.