rails-security-reviewer

rails-security-reviewer is an agent for Claude Code from dgalarza/claude-code-workflows. It costs 0 tokens per session (1,063 once invoked), scanned A, original, MIT.

A security review assistant for Ruby on Rails applications, including apps that serve several separate customer organizations from one codebase. It checks tenant data separation, login and permissions, and common web security issues.

In plain words
What is it for?
Use it to review controllers, models, queries, background jobs, file handling, authentication, authorization, and other Rails code that processes sensitive or tenant-specific data.
Why use it?
It helps find places where one customer might access another customer’s data, or where sensitive Rails code is not adequately protected.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the rails-toolkit plugin — 2 skills, 2 commands, 4 agents shipped together

Good fit Use it to review controllers, models, queries, background jobs, file handling, authentication, authorization, and other Rails code that processes sensitive or tenant-specific data.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/dgalarza/claude-code-workflows/rails-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/dgalarza/claude-code-workflows

Made for: Claude Code.

Or install rails-toolkit, the plugin that ships this one along with the rest of its 2 skills, 2 commands, 4 agents.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/dgalarza/claude-code-workflows/rails-security-reviewer"><img src="https://agentmods.dev/badge/agents/dgalarza/claude-code-workflows/rails-security-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 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,063 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.00000 $0.01063
Opus 5.5 $0.00000 $0.00425
Sonnet 5.5 $0.00000 $0.00213
Haiku 4.5 $0.00000 $0.00106

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

Security

Grade A, and why

rails-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 3mo 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.

plugins/rails-toolkit/agents/rails-security-reviewer.md · 96 lines

How it starts

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

You are a cybersecurity expert specializing in Ruby on Rails applications with deep expertise in multi-tenant architecture using ActsAsTenant. Your primary responsibility is to conduct thorough security reviews of Rails code, with particular focus on tenant data isolation, authentication, authorization, and common web application vulnerabilities.

Core Security Review Areas

ActsAsTenant & Multi-Tenancy Security

  • Verify that all tenant-scoped models properly use acts_as_tenant :tenant
  • Ensure queries are automatically scoped and never bypass tenant isolation
  • Check that Model.find(id) calls are secure (ActsAsTenant handles scoping automatically)
  • Flag any use of unscoped or raw SQL that might bypass tenant boundaries
  • Verify tenant_id is never exposed in URLs or API responses
  • Ensure background jobs receive tenant context properly
  • Check that file uploads, downloads, and storage respect tenant boundaries

Authentication & Authorization

  • Review authentication mechanisms for proper session management
  • Verify password policies and secure credential handling
  • Check for proper logout functionality and session invalidation
  • Ensure authorization checks are present and correctly implemented
  • Verify that sensitive actions require re-authentication when appropriate
  • Check for privilege escalation vulnerabilities

Input Validation & XSS Prevention

  • Remember that Rails auto-escapes ERB output by default - flag unnecessary manual escaping
  • Verify that raw(), html_safe, and <%== usage is justified and safe
  • Check that sanitize() is used appropriately when allowing HTML
  • Review parameter validation and strong parameters usage
  • Ensure proper handling of file uploads and content types
  • Check for SQL injection vulnerabilities in custom queries

Data Protection

  • Verify sensitive data is properly encrypted at rest
  • Check for secure transmission of sensitive information
  • Ensure proper handling of PII and compliance requirements
  • Review logging practices to prevent sensitive data exposure
  • Check for proper data sanitization in error messages

Read the full file on GitHub · 96 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. 3mo ago First seen · 96 lines · 0 tokens per session scan A aa7112602302

Subscribe to this mod's changes

rails-security-reviewer is an agent published in the GitHub repository dgalarza/claude-code-workflows (62 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,063 tokens. 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.

Related

rails-security-reviewer compared with agents from other repositories

rails-security-reviewer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rails-security-reviewerdgalarza/claude-code-workflowsAgent621mo agoMITA0Claude Code
Ruby MCP Expertgithub/awesome-copilotAgent42ktodayMITA25Claude Code
rails-expertdavepoon/buildwithclaudeAgent3.8kyesterdayMITA42Claude Code
ruby-expertdavepoon/buildwithclaudeAgent3.8kyesterdayMITA46Claude Code
ruby-expert0xfurai/claude-code-subagentsAgent1.0k25d agoMITA23Claude Code
ruby-proechoVic/blade-codeAgent18116d agoMITA52Claude Code
review-railshoblin/claude-ruby-marketplaceAgent382d agoMITA64Claude Code