More screenshots
Works with the AI Agents you already use
Security and Hardening: OWASP Code Defense
Design security in before the code exists: threat-model the feature, apply the OWASP-class controls that actually prevent breaches, minimize the data, then test the abuse cases.
$5
Security and Hardening: OWASP Code Defense
Example session with this skill installed
We're adding password reset by email and avatar uploads to our SaaS next sprint. Run this method on both before we write code, and tell us what to build and what to test.
- Read your context and instructions
- Compiled the security and hardening
FEATURE 1 — PASSWORD RESET
Entry points: the reset-request form, the emailed token link, the new-password form. Asset: account takeover — this feature is an alternate login path, so it gets login-grade controls. Abuse case: "as an attacker, I request resets for addresses I don't own, learn which are registered from the responses, then race a reused token."
Controls decided: tokens single-use, 30-minute expiry, invalidated by any password change, stored hashed so a database leak hands out nothing live; the request endpoint answers identically whether or not the email is registered; rate limits per address and per IP, counters in the shared store because three instances serve traffic; reset events logged without the token. Rejected, with reason: security questions — weaker than the password they would protect.
FEATURE 2 — AVATAR UPLOADS
Entry points: the upload endpoint and every page rendering an avatar. Assets: stored cross-site scripting against other users, and server disk. Abuse case: "I upload an HTML file renamed to .png and get it served from the app domain into a victim's browser."
Controls decided: allowlist PNG/JPEG/WebP verified by magic bytes, not extension; 2 MB cap; every upload re-encoded server-side, which strips payloads and metadata; served from a separate media domain with a content-disposition header; never executed or included. Rejected, with reason: client-side-only validation — the client is attacker-controlled.
DATA DECISIONS: upload originals deleted as soon as the re-encode succeeds; no guest data collected by either feature.
ABUSE-CASE TESTS TO WRITE BEFORE LAUNCH: reuse a spent token (expect failure), probe for registered-email leakage via response differences (expect none), upload a renamed HTML file (expect rejection or inert serving).
Connects securely to your tools. The creator never sees your data.
About this skill
A defensive design method for developers building features that handle user input, authentication, sensitive data, uploads, outbound fetching, or integrations. It starts where breaches actually start — design decisions — with a five-minute attacker-thinking pass that names the entry points, the assets, one written abuse case per feature, and the trust boundaries. Only then does it choose controls, organized by the OWASP Top 10 risk classes: boundary validation and parameterized queries against injection, per-resource authorization against broken access control, real password hashing against cryptographic failures, hardened sessions and headers against authentication failures and misconfiguration, dependency and integrity discipline, logging that records security events without leaking secrets, and explicit SSRF defenses for server-side fetching. High-risk neighborhoods get dedicated treatment: authentication flows, file uploads, URL fetching, secrets handling, and dependencies. A data-minimization step cuts breach scope by deleting what you never needed to collect. The method ships with a threat-model worksheet, a risk decision table for review findings, a complete worked example (guest sharing links for a file app, from abuse case to passing abuse-case tests), edge cases for legacy code, third-party embeds, and LLM features, and a rationalization field guide for the six excuses that most often talk teams out of the controls. It ends with a verify-don't-assume quality gate: walk the boundaries again and run every abuse case as a test.
- It produces design decisions and tests; it does not scan code or run a test suite for you — you implement and execute in your own environment.
- Control selection is calibrated judgment for typical web systems; regulated or safety-critical environments may require formal review beyond this method.
- Coverage of a running system's configuration and infrastructure is out of scope — this skill works at the feature and code level.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 24 days ago
Permissions
No special permissions declared or detected