security-sentinel
Use when working with authentication, API routes, user input, or sensitive data. Audits code for security vulnerabilities based on OWASP Top 10. Critical for payment processing, auth systems, and data handling.
What this skill does
# Security Sentinel (World-Class Security Skill)
## When to Use
**ALWAYS use this skill when:**
- Writing/reviewing API routes (especially POST/PATCH/PUT/DELETE)
- Implementing authentication or authorization
- Handling user input (forms, query params, file uploads)
- Working with database queries
- Processing file operations
- Managing environment variables and secrets
- Building payment processing features
- Implementing session management
- Handling sensitive data or encryption
- Before creating pull requests
- Before deployment
## Comprehensive Documentation
This skill includes complete security references:
### ๐ Core References (10,426 lines total)
1. **owasp-top-10-complete.md** (2,133 lines) - Complete OWASP Top 10 with code examples
- A01: Broken Access Control (IDOR, path traversal)
- A02: Cryptographic Failures (weak hashing, hardcoded secrets)
- A03: Injection (SQL, NoSQL, Command injection)
- A04: Insecure Design (race conditions, rate limiting)
- A05: Security Misconfiguration (CORS, error messages)
- A06: Vulnerable Components (dependency management)
- A07: Authentication Failures (weak passwords, MFA)
- A08: Integrity Failures (supply chain, deserialization)
- A09: Logging Failures (audit trails, monitoring)
- A10: SSRF (URL validation, IP blocking)
2. **authentication-patterns.md** (1,529 lines) - Complete authentication guide
- JWT token authentication
- Session-based authentication
- Password hashing (bcrypt, Argon2)
- Password reset flow
- Email verification
- Multi-factor authentication (TOTP)
- OAuth 2.0 (GitHub, Google)
- Passwordless authentication (magic links)
- Refresh token pattern
3. **authorization-patterns.md** (1,062 lines) - Access control implementation
- Role-Based Access Control (RBAC)
- Attribute-Based Access Control (ABAC)
- Middleware protection
- API route protection
- Server Action protection
- Row-level security (Drizzle patterns)
- Permission system
- Resource ownership validation
4. **input-validation-complete.md** (900 lines) - Zod validation for everything
- String, number, boolean, enum validation
- Email, URL, phone, UUID validation
- File upload validation (images, PDFs, CSVs)
- Password strength requirements
- Credit card validation (Luhn algorithm)
- IP address validation (v4, v6)
- Async validation (database checks)
- Error handling and display
5. **sql-injection-prevention.md** (741 lines) - Drizzle ORM security
- Parameterized queries (always safe)
- Dynamic query building
- Raw SQL safety patterns
- LIKE query sanitization
- Database schema security
- Testing for SQL injection
6. **xss-prevention.md** (630 lines) - React/Next.js XSS protection
- React's built-in escaping
- dangerouslySetInnerHTML with DOMPurify
- URL sanitization
- Content Security Policy (CSP)
- User-generated content handling
- innerHTML safety
7. **csrf-prevention.md** (597 lines) - Cross-Site Request Forgery protection
- SameSite cookies (primary defense)
- CSRF tokens implementation
- Double submit cookie pattern
- Server Actions protection
- Origin header validation
8. **secret-management.md** (547 lines) - Secure secret handling
- Environment variables best practices
- Secret rotation strategies
- Encryption at rest (AES-256-GCM)
- Secret detection (gitleaks, trufflehog)
- Production secrets (Vercel, AWS, Vault)
9. **rate-limiting-patterns.md** (826 lines) - Prevent API abuse
- In-memory rate limiting
- Redis-based rate limiting
- API route protection
- Server Action protection
- IP-based rate limiting
- User-based rate limiting
- Sliding window algorithm
- Token bucket algorithm
10. **security-checklist.md** (471 lines) - Pre-deployment audit (250+ items)
- Authentication security (passwords, sessions, JWT, MFA)
- Authorization security (access control, RLS)
- Input validation
- Data security (secrets, logging, database)
- File upload security
- Rate limiting
- Security headers (CSP, CORS, HSTS)
- Error handling
- Dependency security
- Monitoring and logging
- Infrastructure security
- Compliance (GDPR, PCI DSS)
### ๐ ๏ธ Security Tools
- **validate-security.py** (414 lines) - Automated vulnerability scanner
- Detects 20+ vulnerability types
- Scans for hardcoded secrets (API keys, passwords, tokens)
- Checks for SQL injection patterns
- Detects XSS vulnerabilities (dangerouslySetInnerHTML, innerHTML)
- Finds eval() and Function() usage
- Identifies weak cryptography (MD5, SHA1)
- Detects insecure randomness
- Checks for command injection
- Validates path traversal prevention
- Tests password hashing strength
- Audits JWT security
- Checks CORS configuration
- Validates cookie security (httpOnly, secure)
- Reports TypeScript issues (@ts-ignore, any)
- Exits with error on CRITICAL/HIGH issues
- Identifies XSS vulnerabilities
- Finds eval() and Function() usage
- Detects weak cryptography (MD5, SHA1)
- Checks for command injection
- Validates password hashing
- Finds CORS misconfigurations
- Checks for missing httpOnly cookies
- Reports TypeScript issues (@ts-ignore, any types)
### ๐ Quick Start
**Before implementing ANY security-sensitive feature:**
```bash
# 1. Read the relevant guide
cat owasp-top-10-complete.md
cat authentication-patterns.md
# 2. Implement following patterns
# 3. Run security scanner
python validate-security.py src/
# 4. Check against security checklist
cat security-checklist.md
```
## When to Use
## OWASP Top 10 Security Checks
### 1. Injection Attacks
#### SQL Injection
```typescript
// โ DON'T: String concatenation in queries
const query = `SELECT * FROM users WHERE email = '${email}'`
// Vulnerable to: email = "' OR '1'='1"
// โ
DO: Use Prisma (parameterized queries)
const user = await prisma.user.findUnique({
where: { email },
})
```
#### Command Injection
```typescript
// โ DON'T: Unvalidated shell commands
const fileName = req.body.fileName
exec(`cat ${fileName}`) // Vulnerable to: fileName = "; rm -rf /"
// โ
DO: Validate input and use safe APIs
const allowedFiles = ['log.txt', 'data.csv']
if (!allowedFiles.includes(fileName)) {
throw new Error('Invalid file name')
}
const content = await fs.readFile(path.join(SAFE_DIR, fileName))
```
#### NoSQL Injection
```typescript
// โ DON'T: Direct object insertion
const user = await db.users.findOne({ email: req.body.email })
// Vulnerable to: { email: { $ne: null } }
// โ
DO: Validate input with Zod
const emailSchema = z.string().email()
const email = emailSchema.parse(req.body.email)
const user = await db.users.findOne({ email })
```
### 2. Broken Authentication
#### Password Storage
```typescript
// โ DON'T: Plain text passwords
const user = await prisma.user.create({
data: {
email,
password, // Never store plain text!
},
})
// โ
DO: Hash with bcrypt
import bcrypt from 'bcrypt'
const hashedPassword = await bcrypt.hash(password, 12) // 12 rounds minimum
const user = await prisma.user.create({
data: {
email,
password: hashedPassword,
},
})
```
#### Session Management
```typescript
// โ DON'T: Weak session tokens
const sessionId = Math.random().toString()
// โ
DO: Cryptographically secure tokens
import crypto from 'crypto'
const sessionId = crypto.randomBytes(32).toString('hex')
// โ
DO: Set secure session cookie
res.setHeader('Set-Cookie', [
`session=${sessionToken}; HttpOnly; Secure; SameSite=Strict; Max-Age=3600`,
])
```
#### JWT Security
```typescript
// โ DON'T: Weak secret
const token = jwt.sign(payload, 'secret123')
// โ
DO: Strong secret from environment
const token = jwt.sign(payload, process.env.JWT_SECRET!, {
expiresIn: '1h',
algorithm: 'HS256',
})
// โ
DO: Verify JWT properly
try {
const decoded = jwt.verify(token, process.env.JWT_SECRET!)
// Use decoded data
} catch (error) {
thRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only โ no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.