Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Code Review Ruby

ASecurity

Security review of Ruby code — dangerous sinks and Rails pitfalls. Load when reviewing a Ruby/Rails codebase/PR, on .rb source in scope, or "review this Rails app". Signals: Gemfile, config/routes.rb, ActiveRecord, ERB, YAML.load, send/constantize.

20 stars
0 votes
0 copies
0 views
Added 9/22/2026
securitygorubysqlrailscode-reviewapisecurity

Works with

api

Security Analysis

A100/100

Scanned 9/22/2026

$npx -y skills add NoorQureshi/SploitAgent --skill code-review-ruby --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Review Ruby?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Code Review Ruby
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/noorqureshi-code-review-ruby/badge)](https://www.skillsdirectory.com/skills/noorqureshi-code-review-ruby)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: code-review-ruby
description: >
  Security review of Ruby code — dangerous sinks and Rails pitfalls. Load when reviewing a Ruby/Rails
  codebase/PR, on .rb source in scope, or "review this Rails app". Signals: Gemfile, config/routes.rb,
  ActiveRecord, ERB, YAML.load, send/constantize.
domain: code-review
type: reference
stability: learning
modes: [bugbounty, defense, pentest]
severity: info
cwe: [CWE-94, CWE-89, CWE-502, CWE-915, CWE-78]
tools: [brakeman, semgrep, bundler-audit, ripgrep]
schema_version: 1
---

# Ruby / Rails source review

## When it applies
Reviewing Ruby source, usually Rails. Rails is safe by default in many places, so the bugs cluster
in dynamic dispatch, mass assignment gaps, raw SQL, and unsafe deserialization/rendering.

## Why it works
Ruby's metaprogramming (`send`, `constantize`, `eval`) turns strings into method/class/code
references, and Rails helpers have unsafe escape hatches (`.html_safe`, `where("...#{x}...")`,
`render inline:`). Tracing params to these is the whole game — and Brakeman automates the first pass.

## Sinks & patterns (grep, then trace to user input)
- **Code exec**: `eval`, `instance_eval`, `class_eval`, backticks/`system`/`%x`/`exec`/`open("|…")`.
- **Dynamic dispatch**: `send`/`public_send`/`__send__` with a param method name; `constantize`/
  `safe_constantize` on input (arbitrary class instantiation).
- **SQLi**: string interpolation in `where("name = '#{x}'")`, `find_by_sql`, `order(params[:sort])`,
  `pluck`/`group` with input.
- **Mass assignment**: missing/loose Strong Parameters (`params.permit!`, `permit(*keys)`).
- **Deserialization**: `YAML.load`(vs `safe_load`), `Marshal.load`, `Oj` in compat mode on input.
- **XSS/SSRF/render**: `.html_safe`/`raw` on user data, `render inline:`/`render text:` with input,
  `open`/`Net::HTTP` on user URLs, `send_file`/`params[:path]` traversal.

## Framework specifics
- **Rails**: `permit`/`require` correctness, `skip_before_action :verify_authenticity_token` (CSRF),
  `redirect_to params[...]` (open redirect), route globbing exposing actions, secrets in
  `credentials`/ENV, default `protect_from_forgery` disabled on APIs.

## Method
1. Run `brakeman` and `bundler-audit`; triage the warnings (Brakeman is high-signal for Rails).
2. `rg 'send\(|constantize|eval|where\(".*#\{|html_safe|YAML.load|render.*inline'` → trace to params.
3. Check every controller's strong-params and `before_action` auth coverage.
4. Confirm exploitable findings with `web-sqli`, `web-deserialization`, `web-ssrf`, `web-idor`.

## Gotchas
- `send` to a fixed symbol is fine; the bug is `send(params[:action])`.
- `YAML.safe_load` is safe; plain `YAML.load` on input is RCE-capable.
- Brakeman false positives exist — always confirm the param actually reaches the sink.

## References
Brakeman docs; Rails Security Guide; OWASP Ruby on Rails cheat sheet.

Attribution

NoorQureshiNoorQureshi
View sourceSee grades on GitHubMore from NoorQureshi →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Security Review

Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provides comprehensive security checklist and patterns.

2456590 votes

Springboot Security

Java Spring Boot 服务中关于身份验证/授权、验证、CSRF、密钥、标头、速率限制和依赖安全的 Spring Security 最佳实践。

2456590 votes

Paperclip Evals

Choose, inspect, validate, and report Paperclip Runner or Product E2E evaluations while preserving evidence, provenance, cost, and failure classification.

953190 votes

Paperclip Task Bridge

Create, comment on, update, and list Paperclip tasks from Hermes using scoped Paperclip API credentials.

953190 votes

Summarize Status

Write a short, colloquial summary for a Paperclip summary slot: open with the 1–3 specific, concrete actions the reader needs to take right now to unblock the work, then a brief plain-language status, streaming progress as it works.

953190 votes
View all in security →