What problem does it solve?
This Skill provides structured, actionable guidance for securing Rails applications by addressing common web vulnerabilities such as XSS, SQL injection, CSRF, insecure file uploads, and command injection.
Core Features & Use Cases
- XSS Prevention: Avoid bypassing Rails defaults by escaping output and sanitizing user-generated content.
- SQL Injection Prevention: Use parameterized queries, hash conditions, and safe LIKE patterns to prevent data leakage or tampered queries.
- CSRF Protection: Ensure CSRF tokens are present in forms, headers, and fetch requests; implement CSP and safe request handling.
- File Upload Security: Validate content types, prefer ActiveStorage, and validate by content bytes; restrict upload sizes and storage.
- Command Injection Prevention: Prefer safe command execution methods and avoid shell interpolation; validate inputs.
Quick Start
Review the Rails security standards and implement the recommended practices in controllers, views, and models to harden your application.