Skip to content
Skills Library
Security · Review & audit

security-audit

/security-audit

Audits Rails application security against OWASP Top 10, detects vulnerabilities with Brakeman, and verifies Pundit authorization policies. Use when the user wants a security audit, vulnerability scan, or when user mentions security, OWASP, Brakeman, XSS, SQL injection, or authorization. WHEN NOT: Implementing security fixes (use specialist agents), setting up authentication (use authentication-flow), or writing Pundit policies (use policy-agent).

Licence
MIT
Last repository change
01.06.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 01.06.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Audits Rails application security against OWASP Top 10, detects vulnerabilities with Brakeman, and verifies Pundit authorization policies. Use when the user wants a security audit, vulnerability scan, or when user mentions security, OWASP, Brakeman, XSS, SQL injection, or authorization. WHEN NOT: Implementing security fixes (use specialist agents), setting up authentication (use authentication-flow), or writing Pundit policies (use policy-agent).

Arguments

/security-audit [file or directory path]
Original author description

Audits Rails application security against OWASP Top 10, detects vulnerabilities with Brakeman, and verifies Pundit authorization policies. Use when the user wants a security audit, vulnerability scan, or when user mentions security, OWASP, Brakeman, XSS, SQL injection, or authorization. WHEN NOT: Implementing security fixes (use specialist agents), setting up authentication (use authentication-flow), or writing Pundit policies (use policy-agent).

How it works

  1. Audit Process
  2. OWASP Top 10 — Rails Patterns
  3. Security Checklist
Original SKILL.md headings · 131 lines, 379 words
SKILL.md preview
---
name: security-audit
description: >-
  Audits Rails application security against OWASP Top 10, detects
  vulnerabilities with Brakeman, and verifies Pundit authorization policies.
  Use when the user wants a security audit, vulnerability scan, or when user
  mentions security, OWASP, Brakeman, XSS, SQL injection, or authorization.
  WHEN NOT: Implementing security fixes (use specialist agents), setting up
  authentication (use authentication-flow), or writing Pundit policies (use
  policy-agent).
context: fork
agent: Explore
model: opus
effort: high
allowed-tools: Read, Grep, Glob, Bash
user-invocable: true
argument-hint: "[file or directory path]"
---

# Security Audit

You are an expert in Rails application security, OWASP Top 10, and common web vulnerabilities.
You NEVER modify credentials, secrets, or production files.

## Audit Process

### Step 1: Run Security Tools

```bash
bin/brakeman
bin/bundler-audit check --update
bundle exec rspec spec/policies/
```

### Step 2: Manual Code Review

Audit all files in `app/controllers/`, `app/models/`, `app/services/`,
`app/queries/`, `app/forms/`, `app/views/`, `app/policies/`, `config/`.

### Step 3: Report Findings

Format: **Vulnerability** → **Location** (file:line) → **Risk** → **Fix** (code example)
Prioritize: P0 (critical) → P1 (high) → P2 (medium) → P3 (low)

## OWASP Top 10 — Rails Patterns

### 1. Injection (SQL, Command)
```ruby
# Bad — SQL Injection
User.where("email = '#{params[:email]}'")

# Good — Bound parameters
User.where(email: params[:email])
```

### 2. Broken Authentication
```ruby
# Bad — Predictable token
user.update(reset_token: SecureRandom.hex(4))

# Good — Sufficiently long token
user.update(reset_token: SecureRandom.urlsafe_base64(32))
```

### 3. Sensitive Data Exposure
```ruby
# Bad — Logging sensitive data
Rails.logger.info("Password: #{password}")

# Good — Filter sensitive params
Rails.application.config.filter_parameters += [:password, :token, :secret]
```

### 4. XXE
```ruby
# Bad
Nokogiri::XML(user_input)

# Good
Nokogiri::XML(user_input) { |config| config.nonet.noent }
```

### 5. Broken Access Control
```ruby
# Bad — No authorization
@entity = Entity.find(params[:id])

# Good — Pundit
@entity = Entity.find(params[:id])
authorize @entity
```

### 6. Security Misconfiguration
```ruby
# production.rb
config.force_ssl = true
```

### 7. XSS
```erb
<%# Bad %>
<%= raw user_input %>
<%= user_input.html_safe %>

<%# Good %>
<%= user_input %>
<%= sanitize(user_input) %>
```

### 8. Insecure Deserialization
```ruby
# Bad
YAML.load(user_input)

# Good
YAML.safe_load(user_input, permitted_classes: [Symbol, Date])
```

### 9. Vulnerable Dependencies
```bash
bin/bundler-audit check --update
```

### 10. Insufficient Logging
```ruby
Rails.logger.warn("Failed login for #{email} from #{request.remote_ip}")
```

## Security Checklist

### Configuration
- [ ] `config.force_ssl = true` in production
- [ ] CSRF protection enabled
- [ ] Content Security Policy configured
- [ ] Sensitive parameters filtered from logs
- [ ] Secure sessions (httponly, secure, same_site)

### Code
- [ ] Strong Parameters on all controllers
- [ ] Pundit `authorize` on all actions
- [ ] No `html_safe`/`raw` on user input
- [ ] Parameterized SQL queries only
- [ ] File upload validation

### Dependencies
- [ ] Bundler Audit clean
- [ ] Gems up to date
- [ ] No abandoned gems

Versions

RepositoryScoreLicence
This page · ThibautBaissac/rails_ai_agents100MIT
posthog/posthog100MIT
mono/SkiaSharp100MIT
iuliandita/skills100MIT
gtlpanda/PandaStack100MIT
ericrisco/rsc-harness100MIT
matthewliu/matt-agent-playbook100MIT
drvoss/everything-copilot-cli100MIT
stella/stella100Apache-2.0

Identical content appears in 1 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version 9100eca76227 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100brakeman
    Static analysis security vulnerability scanner for Ruby on Rails applications. Use when analyzing Rails code for security issues, running security audits, reviewing code for vulnerabilities, setting up security scanning in CI/CD, managing security warnings, or investigating…
  • 100security
    Application security principles and OWASP Top 10. Use to review code for vulnerabilities, implement authentication or authorization, handle secrets, configure security headers, prevent injection (SQL, XSS, CSRF), or prepare for an audit.
  • 90security
    Rails/Grape security review: authz, injection, output sanitization, SSRF. Triggers: \"is this vulnerable\", \"SQL injection\", \"XSS\", \"Brakeman warning\". Do NOT use for: secret scans.
  • 100rails-cto-security
    Run Brakeman and bundler-audit security scans on changed files and fix high/medium confidence warnings. Use when any .rb or .html.erb file is created or modified. Also use when the user mentions "security", "brakeman", "bundle-audit", "audit", "vulnerability", "XSS", "SQL…
  • 100security
    Security auditing for code vulnerabilities (OWASP Top 10, XSS, SQL injection) and dependency scanning (pnpm audit, Snyk). Use when handling user input, adding authentication, before deployments, or resolving CVEs.
  • 100security
    Security auditing for code vulnerabilities (OWASP Top 10, XSS, SQL injection) and dependency scanning (pnpm audit, Snyk). Use when handling user input, adding authentication, before deployments, or resolving CVEs.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.