发现优质的 AI Agent 技能
聚合 Claude Skills、LangChain、AutoGPT 等优质资源,助力开发者快速构建智能应用
Self-Hosting Rules
- Backups first — decide where data lives and how it's backed up before deploying, not after data exists - Check resource requirements — many services need more RAM than expected, OOM kills corrupt data - Verify the project is actively maintained — abandoned projects become security liabilities
Severity Model - Security Best Practices
Use this model to keep severity decisions consistent.
Setup - Security Best Practices
Read this when `~/security-best-practices/` is missing or empty.
Review Playbook - Security Best Practices
Use this sequence for explicit security scans and hardening reviews.
Remediation Patterns - Security Best Practices
Use these patterns to reduce security risk without destabilizing delivery.
Memory Template - Security Best Practices
Create `~/security-best-practices/memory.md` with this structure:
Risk Exceptions - Security Best Practices
Use this file when a risk is intentionally accepted instead of fixed immediately.
Metaprogramming Traps
- `define_method` — captures closure, be careful with loop variables - `eval` string — security risk, avoid with user input - `class_eval` vs `instance_eval` — class_eval defines instance methods, instance_eval defines singleton - `const_get` with user input — can access any constant, security risk - `method(:name)` — raises NameError if method doesn't exist
Security Traps
- `where("email = '#{params[:email]}'")` — SQL injection, use `where(email: params[:email])` - `Model.new(params[:model])` without permit — mass assignment even with strong params - `skip_forgery_protection` on API — still needed if session-based auth - `html_safe` on user input — stored XSS, escape first then mark safe - `send(params[:method])` — arbitrary method call, whitelist allowed methods
Security Traps
- SQL injection — use prepared statements, NEVER concatenate user input - XSS — `htmlspecialchars($input, ENT_QUOTES, 'UTF-8')` on all output - CSRF — verify token on state-changing requests - File upload — check MIME type, extension, AND magic bytes - `include($userInput)` — remote file inclusion, validate path strictly