security

Implements authentication, authorization, input validation, and OWASP Top 10 defenses for backend APIs.

1|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/MARUCIE/openclaw-foundry --skill security-marucie
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: security
Source: https://github.com/MARUCIE/openclaw-foundry/tree/main/web/public/packs/spellbook-security-auditor/skills/security
Command: npx skills add https://github.com/MARUCIE/openclaw-foundry --skill security-marucie

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Backend services often ship with preventable vulnerabilities like SQL injection, broken access control, and leaked secrets because security guidance is scattered and applied inconsistently. This Skill consolidates authentication, authorization, secrets management, input validation, security headers, STRIDE threat modeling, and dependency scanning into one actionable reference for Python, TypeScript, and Go. ## Core Features & Use Cases - OWASP Top 10 Coverage: Quick-reference table plus deep dives on injection, broken access control (IDOR), and security misconfiguration with bad/good code examples in three languages. - Authentication & Authorization Patterns: Password hashing with bcrypt/argon2id, JWT signing and verification (RS256/HS256), refresh token rotation, OAuth2/OIDC flow selection with PKCE, RBAC vs ABAC, and resource-level ownership checks. - Secrets, Headers & Threat Modeling: Environment-based secrets progression from .env to Vault, security header baselines (CSP, HSTS, X-Frame-Options), CORS allowlisting, and a lightweight STRIDE threat modeling process. - Use Case: Before launching a new invoicing API, run a STRIDE threat model on each data flow, implement ownership checks on every handler, configure security headers via middleware, and wire pip-audit/npm audit/govulncheck into CI to fail builds on HIGH severity CVEs. ## Quick Start Ask the AI to audit your API endpoint code against the OWASP Top 10 checklist and fix any injection, access control, or secrets management issues it finds.

Frequently Asked Questions about security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent SQL injection in Python, TypeScript, and Go?▼

Prevent SQL injection by using parameterized queries instead of string concatenation in all database calls. Use placeholders like %s in Python, $1 in Node.js pg, and ? in Go, passing user input as separate arguments so the driver escapes it safely.

What is the difference between RBAC and ABAC authorization?▼

RBAC assigns permissions to roles and roles to users, making it simple to implement and audit for small teams. ABAC derives permissions from user, resource, and environment attributes using a policy engine like OPA or Casbin, suiting multi-tenant SaaS with fine-grained contextual rules.

Should I use RS256 or HS256 for JWT signing?▼

Use RS256 with an RSA key pair for microservices so services verify tokens with a public key without sharing secrets. HS256 uses a shared symmetric secret and is simpler for single-service deployments, but every verifier must hold the secret.

How do I check for IDOR vulnerabilities in my API?▼

Check for IDOR by verifying resource ownership in every handler, not just role membership in middleware. Filter queries by both the resource ID and the current user's ID, returning 404 when no owned record matches, to block horizontal privilege escalation.

Where should I store secrets in production versus local development?▼

Store local development secrets in a gitignored .env file and production secrets in a manager like HashiCorp Vault, AWS Secrets Manager, GCP Secret Manager, or Doppler. Never commit secrets to version control, and rotate immediately on suspected exposure.

Why does my dependency scan need to run on every pull request?▼

Dependency scanning must run on every PR because new CVEs are published daily and scanning only at release leaves known vulnerabilities merged for weeks. Configure pip-audit, npm audit, or govulncheck in CI to fail builds on HIGH or CRITICAL severity findings.