Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Security Law

ASecurity

The Atelier Security Law — OWASP-grade defense for every request path (injection, XSS, CSRF, tenant isolation, rate limiting, transport). Load before writing ANY endpoint, form, or data-processing code — not just auth. Auth token/session mechanics live in [[auth-law]]; this is everything else.

2 stars
0 votes
0 copies
0 views
Added 9/22/2026
ai-agentsrustshellsqlreactvueapifrontendbackendsecurity

Works with

cliapi

Security Analysis

A100/100

Scanned 9/22/2026

Install to Claude Code

$npx -y skills add INERATE/atelier --skill security-law --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Security Law?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Security Law
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/inerate-security-law/badge)](https://www.skillsdirectory.com/skills/inerate-security-law)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: security-law
description: The Atelier Security Law — OWASP-grade defense for every request path (injection, XSS, CSRF, tenant isolation, rate limiting, transport). Load before writing ANY endpoint, form, or data-processing code — not just auth. Auth token/session mechanics live in [[auth-law]]; this is everything else.
---

# Security Law

Assume every request is hostile until proven otherwise. Client-sent data is
never trusted, including things that "should" be safe (an org id, a role, a
price) — trust only what the server derives from the verified session.

## 1. Injection

- **SQL/NoSQL: parameterized queries / ORM only.** Never string-concat or
  f-string a query. No exceptions for "internal" or "admin" endpoints.
- Shell/command execution: never pass user input to a shell; use argument
  arrays, never `shell=True` / string-built commands.

## 2. XSS

- Never `dangerouslySetInnerHTML` (or equivalent) on untrusted content —
  user text, imported files (Excel/CSV), rendered markdown. Sanitize
  server-side (allowlist tags/attrs) before it's ever stored or rendered.
- Set a CSP header; no inline `<script>` from user data.
- React/Vue/etc. auto-escaping is the default path — don't opt out of it to
  "fix" a rendering quirk.

## 3. CSRF & cookie theft

- Session cookies: `HttpOnly` + `Secure` + `SameSite=Lax/Strict` (see
  [[auth-law]] for the token model itself).
- **No state change on GET.** Mutations only via POST/PUT/PATCH/DELETE with
  the session cookie + (for cookie-authed browser clients) a CSRF token or
  origin check.

## 4. Transport & replay

- HTTPS + HSTS everywhere; no mixed content.
- Short-lived access tokens, single-use rotating refresh (already specified
  in [[auth-law]]) — this is what makes a captured token worthless within
  minutes even without CSRF.

## 5. Tenant isolation (the worst bug class)

- `organization_id` / `tenant_id` used in ANY query comes from the verified
  JWT/session server-side — **never from the request body, query string, or
  a client-supplied header.** A user editing a JSON payload must not be able
  to touch another tenant's row.
- Every list/detail/mutation endpoint filters by the session's tenant AND
  checks resource ownership — "authenticated" is not "authorized."
- Test this class explicitly: user A's token against user B's resource ID
  must 403/404, never 200.

## 6. Abuse & brute force

- Rate-limit login, 2FA verify, password reset, and any public form (Redis
  `SETNX`+expiry, see [[stack-guides/redis-celery]]). Lock/backoff after N
  failures per account AND per IP.
- Turnstile/CAPTCHA on public unauthenticated forms (signup, contact, reset).
- Generic errors outward ("invalid credentials"), detailed errors only in
  server logs — never leak which field was wrong, or stack traces, to the
  client.

## 7. Validation at trust boundaries

- Validate/normalize on the server regardless of client-side validation —
  Zod on the frontend is UX, not security; the backend schema (Pydantic/etc.)
  is the actual gate.
- File uploads: validate type/size server-side by content, not extension;
  store outside the webroot; serve through a handler, not direct static path.

## Shipping checklist

- [ ] No string-built queries anywhere in the diff
- [ ] No `dangerouslySetInnerHTML`/raw-HTML render on user-sourced content
- [ ] Every mutating endpoint requires non-GET + authz check on the resource
- [ ] Every tenant-scoped query derives `organization_id` from the session, never the payload
- [ ] Public forms rate-limited + Turnstile; login/2FA rate-limited per account+IP
- [ ] Server-side validation exists independent of client-side validation

Attribution

INERATEINERATE
View sourceMore from INERATE →
SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Related Skills

Caveman

Ultra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for /caveman, "caveman mode", "talk like caveman", "be brief" or "less tokens".

1074701 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

693161 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3351 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

691 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →