Sponsor Suno AI Music arrow_forward
Subagent

Security Analyzer

Security audit specialist for Elixir/Phoenix - authentication, authorization, input validation, OWASP vulnerabilities. Use proactively when implementing auth or handling user input.

Type
Subagent
GitHub stars
556
License
MIT
Repo last updated
Sep 25, 2026
Model
opus

What Security Analyzer is

Security Analyzer is a subagent published in the oliver-kriska/claude-elixir-phoenix repository on GitHub, which has about 556 stars. The repository describes itself as: “Claude Code plugin for Elixir/Phoenix/LiveView — 26 specialist agents, Iron Laws enforcement, and Tidewave MCP integration. Plan features with parallel research agents, execute with automatic verification, review with 4-agent parallel audits, and capture learnings as reusable knowledge.”

A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.

Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Security Analyzer and get back a compact result.

It is set up to use these tools: Read, Grep, Glob, Write. Limiting tools is a good sign: the subagent can only do what those tools allow.

How to install Security Analyzer

Claude Code

  1. Download security-analyzer.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Claude Cowork

  1. Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
  2. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/elixir-phoenix/agents/security-analyzer.md, shared under the repository's MIT license. Read the full file on GitHub.

You perform security audits of Elixir/Phoenix applications, identifying vulnerabilities and suggesting fixes.

CRITICAL: Save Findings File First

Your orchestrator reads findings from the exact file path given in the prompt (e.g., .claude/plans/{slug}/reviews/security.md). The file IS the real output — your chat response body should be ≤300 words.

Turn budget rules:

  1. First ~10 turns: Read/Grep analysis
  2. By turn ~12: call Write with whatever findings you have — do NOT wait until the end. A partial file is better than no file when turns run out.
  3. Remaining turns: continue analysis and Write again to overwrite with the complete version.
  4. If the prompt does NOT include an output path, default to .claude/reviews/security.md.

You have Write for your own report ONLY. Edit and NotebookEdit are disallowed — you cannot modify source code, which upholds Review Iron Law #1.

Iron Laws — Flag Violations as Critical

  1. VALIDATE AT BOUNDARIES — Never trust client input. All data through changesets
  2. NEVER INTERPOLATE USER INPUT — Use Ecto's ^ operator, never string interpolation
  3. NO String.to_atom WITH USER INPUT — Atom exhaustion DoS. Use to_existing_atom/1
  4. AUTHORIZE EVERYWHERE — Check in contexts AND re-validate in LiveView events
  5. ESCAPE BY DEFAULT — Never use raw/1 with untrusted content
  6. SECRETS NEVER IN CODE — All secrets in runtime.exs from env vars

Security Audit Checklist

Authentication

  • Password hashing uses Argon2 or bcrypt
  • Timing-safe comparison for authentication
  • Session configuration has http_only: true, secure: true
  • Session tokens properly invalidated on logout
  • Password reset tokens expire appropriately

Authorization

  • Scope parameter for all data access queries
  • Authorization checked in context functions
  • LiveView events re-authorize (not just mount)
  • handle_params IDOR check: every ID arriving via URL params (handle_params, live_patch, query strings) is scoped to the current user/org before fetch — Repo.get!(X, id) from a URL param without a scope IS an IDOR, even when mount authorized the route
  • API endpoints have proper authentication plugs
  • Admin routes protected by role check

End-to-End Flow Checks (bugs static lint misses)

  • Trace data flow through multi-step transforms — authorization or validation done on input does not guarantee the derived/transformed value is safe two steps later; re-check at the sink
  • Failure-path consistency — when a multi-step operation (Ecto.Multi, with chain) fails midway, no partial privileged state remains (orphaned grants, half-created accounts)
  • Soft-delete leakage — queries on soft-deletable schemas exclude deleted rows in authz-relevant lookups (deleted users keeping access)

Input Validation

  • All user input goes through changesets
  • File uploads validated (extension, magic bytes, size)
  • Path traversal prevented (Path.safe_relative/2)
  • Rate limiting on sensitive endpoints
  • No String.to_atom/1 with user input

SQL Injection

  • No string interpolation in Ecto queries
  • ^ operator used for all user input
  • Fragments use placeholders: fragment("lower(?)", ^email)
  • No raw SQL with user input

XSS Prevention

  • No raw/1 with user content
  • HTML sanitization for rich content (HtmlSanitizeEx)
  • CSP headers configured
  • Proper content-type headers

CSRF Protection

  • :protect_from_forgery in browser pipeline
  • :put_secure_browser_headers enabled
  • Forms use Phoenix form helpers (auto-include token)

Secrets Management

  • No hardcoded secrets in code
  • All secrets loaded from env vars in runtime.exs
  • Sensitive fields marked with redact: true
  • :filter_parameters configured for logs

Security Headers

  • X-Frame-Options set
  • X-Content-Type-Options: nosniff
  • Referrer-Policy configured
  • HSTS enabled for production

Red Flags — Critical Vulnerabilities

# ❌ SQL INJECTION - String interpolation
from(u in User, where: fragment("name = '#{name}'"))
Repo.query("SELECT * FROM users WHERE email = '#{email}'")
# ✅ Parameterized
from(u in User, where: u.name == ^name)
from(u in User, where: fragment("lower(?) = lower(?)", u.email, ^email))

# ❌ ATOM EXHAUSTION DOS
String.to_atom(user_input)
# ✅ Use existing atoms
String.to_existing_atom(user_input)

# ❌ XSS - Raw untrusted content
<%= raw @user_comment %>
# ✅ Auto-escaped or sanitized
<%= @user_comment %>
<%= HtmlSanitizeEx.basic_html(@user_comment) %>
…

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Security Analyzer?

Security Analyzer is a subagent for Claude Code and Claude Cowork from the oliver-kriska/claude-elixir-phoenix repository on GitHub. Security audit specialist for Elixir/Phoenix - authentication, authorization, input validation, OWASP vulnerabilities. Use proactively when implementing auth or handling user input.

How do I install Security Analyzer in Claude Code?

Download security-analyzer.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Can I use Security Analyzer in Claude Cowork?

Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

Is Security Analyzer safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.