noorqureshi/security-skills/code-review-ruby
Claude Code and agent skill by noorqureshi/security-skills
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install noorqureshi/security-skills/code-review-rubySKILL.md
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(vssafe_load),Marshal.load,Ojin compat mode on input. - XSS/SSRF/render:
.html_safe/rawon user data,render inline:/render text:with input,
open/Net::HTTP on user URLs, send_file/params[:path] traversal.
Framework specifics
- Rails:
permit/requirecorrectness,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
- Run
brakemanandbundler-audit; triage the warnings (Brakeman is high-signal for Rails). rg 'send\(|constantize|eval|where\(".*#\{|html_safe|YAML.load|render.*inline'→ trace to params.- Check every controller's strong-params and
before_actionauth coverage. - Confirm exploitable findings with
web-sqli,web-deserialization,web-ssrf,web-idor.
Gotchas
sendto a fixed symbol is fine; the bug issend(params[:action]).YAML.safe_loadis safe; plainYAML.loadon 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.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/code-review/code-review-ruby/SKILL.md
Popularity
- Repository stars
- 27
- Repository forks
- 8
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/noorqureshi/security-skills/code-review-ruby)