devs:security-core
Comprehensive application security expertise covering authentication, authorization, OWASP Top 10, and security best practices. Use when (1) Implementing authentication (JWT, OAuth2, sessions, OAuth for CLI/TUI/desktop apps), (2) Adding authorization (RBAC, ABAC, RLS with Supabase/PostgreSQL), (3) Security auditing code or infrastructure, (4) Setting up security infrastructure (headers, CORS, CSP, rate limiting), (5) Managing secrets and credentials, (6) Preventing OWASP Top 10 vulnerabilities (injection, XSS, CSRF, etc.), (7) Reviewing code for security issues, (8) Configuring secure web applications in TypeScript, Python, or Rust. Automatically triggered when working with authentication/authorization systems, security reviews, or addressing security vulnerabilities.
What this skill does
# Security Core Comprehensive application security guidance for TypeScript, Python, and Rust applications. ## Quick Start ### Common Security Tasks **Setting up authentication:** 1. Generate JWT keys: `./scripts/generate_jwt_keys.sh RS256` 2. Consult [authentication.md](references/authentication.md) for implementation patterns 3. Use security templates from `assets/configs/` **Implementing authorization:** 1. Review [authorization.md](references/authorization.md) for RBAC/ABAC/RLS patterns 2. For Supabase: See RLS section with multi-tenant examples 3. Implement permission checking at API and database layers **Security auditing:** 1. Run: `./scripts/audit_security.sh` 2. Review [code-review.md](references/code-review.md) checklist 3. Check [owasp-top-10.md](references/owasp-top-10.md) for vulnerabilities **Hardening application:** 1. Apply security headers from [security-headers.md](references/security-headers.md) 2. Implement rate limiting from [rate-limiting.md](references/rate-limiting.md) 3. Configure secrets management per [secrets-management.md](references/secrets-management.md) ## When to Use This Skill ### Authentication Scenarios - Implementing login/signup flows - Adding JWT or session-based authentication - Integrating OAuth 2.0 providers - **OAuth for CLI, TUI, or desktop applications** (Device Flow) - Multi-factor authentication (TOTP, SMS/Email OTP) - Password hashing and validation ### Authorization Scenarios - Role-Based Access Control (RBAC) - Attribute-Based Access Control (ABAC) - **Row Level Security (RLS) with Supabase/PostgreSQL** - Multi-tenant data isolation - Permission-based access control - Resource ownership validation ### Security Auditing - Code security reviews - Dependency vulnerability scanning - OWASP Top 10 compliance checks - Secret detection in code - Security configuration verification ### Infrastructure Security - Security headers (CSP, HSTS, X-Frame-Options) - CORS configuration - Rate limiting implementation - Secrets management - API security hardening ## Core Resources ### Scripts (`scripts/`) **`audit_security.sh`** - Security audit for TypeScript, Python, and Rust projects - Runs dependency vulnerability scanners (npm audit, pip-audit, cargo-audit) - Detects hardcoded secrets in code - Checks for common security misconfigurations - Usage: `./scripts/audit_security.sh [project-directory]` **`generate_jwt_keys.sh`** - Generate secure JWT signing keys - Supports HS256 (symmetric), RS256 (asymmetric), ES256 (elliptic curve) - Automatically adds keys to .gitignore - Provides usage examples - Usage: `./scripts/generate_jwt_keys.sh [ALGORITHM] [OUTPUT_DIR]` ### Reference Documentation (`references/`) **[authentication.md](references/authentication.md)** - Complete authentication guide - JWT implementation (TypeScript, Python, Rust) - Session-based authentication - OAuth 2.0 Authorization Code Flow - **OAuth Device Flow for CLI/TUI/desktop apps** ⭐ - Multi-factor authentication (TOTP, SMS) - Password security and hashing - Token storage best practices **[authorization.md](references/authorization.md)** - Authorization patterns and implementations - Role-Based Access Control (RBAC) - Attribute-Based Access Control (ABAC) - **Row Level Security (RLS) with Supabase/PostgreSQL** ⭐ - Multi-tenant RLS patterns - Permission checking patterns - Resource-based authorization - Testing authorization logic **[owasp-top-10.md](references/owasp-top-10.md)** - OWASP Top 10 prevention guide - A01: Broken Access Control - A02: Cryptographic Failures - A03: Injection (SQL, NoSQL, Command) - A04: Insecure Design - A05: Security Misconfiguration - A06: Vulnerable Components - A07: Authentication Failures - A08: Data Integrity Failures - A09: Logging & Monitoring Failures - A10: Server-Side Request Forgery (SSRF) **[secrets-management.md](references/secrets-management.md)** - Secrets and credentials management - Environment variables best practices - Secret managers (AWS Secrets Manager, HashiCorp Vault) - Secret rotation strategies - CI/CD secrets handling - Local development with .env files **[security-headers.md](references/security-headers.md)** - HTTP security headers - Content-Security-Policy (CSP) - Strict-Transport-Security (HSTS) - X-Frame-Options, X-Content-Type-Options - CORS configuration - Implementation examples for all frameworks **[rate-limiting.md](references/rate-limiting.md)** - Rate limiting strategies - Fixed window, sliding window, token bucket - Implementation in TypeScript, Python, Rust - Distributed rate limiting with Redis - Per-user and per-IP limiting - Rate limit headers and responses **[code-review.md](references/code-review.md)** - Security code review checklist - Authentication & authorization checks - Input validation & sanitization - Data protection and encryption - Security headers & configuration - Session management - API security - Common vulnerabilities (XSS, CSRF, SQL injection) ### Configuration Templates (`assets/configs/`) Ready-to-use security middleware for all supported languages: **TypeScript:** `assets/configs/typescript/security-config.ts` - Express + Helmet configuration - CORS setup - Rate limiting - Security headers **Python:** `assets/configs/python/security_middleware.py` - FastAPI middleware - Security headers - CORS - Rate limiting with slowapi **Rust:** `assets/configs/rust/security_middleware.rs` - Axum middleware - tower-http CORS layer - Security headers ## Decision Guides ### Choosing Authentication Method | Method | Use When | Complexity | Best For | |--------|----------|------------|----------| | JWT | Stateless APIs, microservices | Medium | SPAs, mobile apps, APIs | | Sessions | Traditional web apps | Low | Server-rendered apps | | OAuth 2.0 | Third-party auth, SSO | High | Delegated authentication | | API Keys | Service-to-service | Low | Internal services | See [authentication.md](references/authentication.md) for detailed implementation patterns. ### Choosing Authorization Model | Model | Use When | Complexity | Best For | |-------|----------|------------|----------| | RBAC | Simple role hierarchies | Low | Standard web apps | | ABAC | Complex, dynamic policies | High | Enterprise apps | | RLS | Multi-tenant with data isolation | Medium | SaaS applications | | Permissions | Fine-grained control | Medium | Admin panels, APIs | See [authorization.md](references/authorization.md) for implementation patterns and RLS examples. ### OAuth for CLI/TUI/Desktop For applications without traditional browser redirects: **Device Authorization Flow (OAuth 2.0):** 1. App requests device code 2. User opens browser and enters code 3. App polls for token 4. Token granted after user approval Full implementation examples in [authentication.md - OAuth for CLI, TUI, and Desktop Apps](references/authentication.md#oauth-for-cli-tui-and-desktop-apps). ## Common Workflows ### 1. Implementing JWT Authentication ```bash # Generate keys ./scripts/generate_jwt_keys.sh RS256 ./keys # Review implementation patterns # See references/authentication.md#jwt-authentication ``` Then implement using examples for your language (TypeScript/Python/Rust). ### 2. Adding Row Level Security (Supabase) ```bash # Review RLS patterns # See references/authorization.md#row-level-security-rls ``` Implement RLS policies for multi-tenant isolation: - Enable RLS on tables - Create policies for SELECT, INSERT, UPDATE, DELETE - Use helper functions for complex rules - Test with different user contexts ### 3. Security Audit Workflow ```bash # Run automated audit ./scripts/audit_security.sh # Manual review # 1. Check references/code-review.md checklist # 2. Review references/owasp-top-10.md for vulnerabilities # 3. Verify security headers with references/security-headers.md # 4. Test rate limiting per references/rate-limiting.md ``` ### 4. Hardening New Application 1. **Apply security templates:** - Copy appropriate config from `assets/configs/[language]/` - Configur
Related 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.