Skip to content
Back to skills

Ruby Antipatterns

ASecurity

Forbidden Ruby/Rails patterns — eval with user input, YAML.load, mass assignment without permit, shell injection. Applies when editing Ruby files.

  • 5 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added October 21, 2026
ai-agentsrubyshellrailssecurity

Security analysis

A100/100

Pro scans all 9 files and shows the line behind each finding

Scanned October 21, 2026

npx -y skills add emgiezet/aisdlc --skill ruby-antipatterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ruby Antipatterns?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ruby Antipatterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/emgiezet-ruby-antipatterns/badge)](https://www.skillsdirectory.com/skills/emgiezet-ruby-antipatterns)

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

Download with Pro
SKILL.md
---
name: ruby-antipatterns
description: Forbidden Ruby/Rails patterns — eval with user input, YAML.load, mass assignment without permit, shell injection. Applies when editing Ruby files.
paths: ["**/*.erb","**/*.rake","**/*.rb"]
user-invocable: false
---

# Ruby anti-patterns — do not write these

Checks run automatically after each edit. Findings reference the IDs below.

## Blockers
- AP-RB-SEC-001 — Never `eval`/`send`/`constantize` with user input; use an explicit allowlist.
- AP-RB-SEC-002 — Always use `YAML.safe_load` instead of `YAML.load` on external data.
- AP-RB-SEC-004 — Use `Open3.capture2e('prog', arg1, arg2)` with separate args; never interpolate into backticks.
- AP-RB-SEC-005 — Use `where(email: email)` or `where('email = ?', email)`; never interpolate into `where`.

## Errors
- AP-RB-SEC-003 — Always use `params.require(:resource).permit(:allowed_fields)` in Rails controllers.
- AP-RB-SEC-006 — Use `SecureRandom.hex(32)` or `SecureRandom.urlsafe_base64` for all security tokens.
- AP-RB-MAINT-001 — Rescue `StandardError` at most; prefer specific exception types; log before retrying or re-raising.

Details for any ID: `reference/<ID>.md`

Files in this skill

  • SKILL.md1.2 KB
  • reference/AP-RB-MAINT-001.md744 B
  • reference/AP-RB-MAINT-002.md651 B
  • reference/AP-RB-SEC-001.md769 B
  • reference/AP-RB-SEC-002.md635 B
  • reference/AP-RB-SEC-003.md601 B
  • reference/AP-RB-SEC-004.md722 B
  • reference/AP-RB-SEC-005.md598 B
  • reference/AP-RB-SEC-006.md566 B

Attribution

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

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.