security-implementation-guide

Implements authentication, input validation, and OWASP vulnerability mitigations for web applications.

Updated May 16, 2026
One-click install
npx skills add https://github.com/organvm-i-theoria/_agent-ontology --skill security-implementation-guide-organvm-i-theoria
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: security-implementation-guide
Source: https://github.com/organvm-i-theoria/_agent-ontology/tree/main/.agents/skills/security-implementation-guide
Command: npx skills add https://github.com/organvm-i-theoria/_agent-ontology --skill security-implementation-guide-organvm-i-theoria

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Web applications are routinely compromised through preventable vulnerabilities like SQL injection, XSS, broken access control, and weak authentication. This Skill provides concrete, code-level security patterns so developers can implement defenses correctly instead of reinventing them from scratch. ## Core Features & Use Cases - Authentication & Session Security: Password hashing with bcrypt, rate limiting on login endpoints, secure session cookie configuration, and MFA guidance. - OWASP Top 10 Mitigations: A complete reference covering broken access control, cryptographic failures, injection, SSRF, and more, each with vulnerable and corrected TypeScript code examples. - Security Review Checklist: A comprehensive audit checklist covering headers, CSRF protection, API security, dependency management, logging, and infrastructure hardening. - Use Case: While building an Express API, ask for a login endpoint implementation and receive rate-limited, CSRF-protected, bcrypt-hashed authentication code with proper session handling. ## Quick Start Ask the agent to implement a secure login endpoint with rate limiting and password hashing for your Express application.

Frequently Asked Questions about security-implementation-guide

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

FAQPage Schema
How do I prevent SQL injection in Node.js applications?▼

Prevent SQL injection by always using parameterized queries instead of string concatenation. Pass user input as bound parameters, for example db.query('SELECT * FROM users WHERE email = $1', [email]), and configure your ORM to parameterize where clauses.

How to hash passwords securely with bcrypt?▼

Hash passwords with bcrypt using a cost factor of 12 or higher, which generates a unique salt per password automatically. Verify credentials with bcrypt.compare rather than re-hashing, and never use MD5 or SHA1 for password storage.

What security headers should an Express app use?▼

Use the helmet middleware to set Content-Security-Policy, Strict-Transport-Security with a long max-age, X-Content-Type-Options: nosniff, X-Frame-Options: DENY, and a restrictive Referrer-Policy. Also disable the X-Powered-By header to avoid exposing server details.

How do I protect Express login endpoints from brute force attacks?▼

Apply express-rate-limit to authentication routes, for example 5 attempts per 15-minute window, and combine it with account lockout after repeated failures. Log failed attempts with IP address and user agent for monitoring and alerting.

How do I prevent SSRF when fetching user-supplied URLs?▼

Validate URLs by allowlisting protocols, blocking internal hostnames, resolving DNS to reject private IP ranges, and enforcing timeouts and response size limits. Add network-level egress rules as defense in depth.

When should I use SameSite cookies versus CSRF tokens?▼

Use SameSite=Strict or Lax cookies as a baseline defense, and add token-based CSRF validation for state-changing requests where broader browser compatibility or cross-site flows are required. Sensitive operations should also require re-authentication.