security-and-hardening

Harden web applications against OWASP Top 10 vulnerabilities, SSRF, supply-chain risks, and LLM threats.

Updated Mar 14, 2026
One-click install
npx skills add https://github.com/yourlabpt/yourlabpt_website --skill security-and-hardening-yourlabpt
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: security-and-hardening
Source: https://github.com/yourlabpt/yourlabpt_website/tree/main/projects/skills/security-and-hardening
Command: npx skills add https://github.com/yourlabpt/yourlabpt_website --skill security-and-hardening-yourlabpt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Applications that accept user input, manage sessions, or integrate external services are exposed to injection, XSS, broken access control, SSRF, and supply-chain attacks. This Skill provides a threat-model-first process and concrete prevention patterns so security is built into every feature rather than bolted on later. ## Core Features & Use Cases - Threat Modeling with STRIDE: Map trust boundaries, name assets, and write abuse cases before writing code, covering HTTP inputs, webhooks, file uploads, and LLM output. - OWASP Top 10 Prevention Patterns: Copy-ready TypeScript examples for parameterized queries, bcrypt password hashing, secure session cookies, CSP headers, authorization checks, and SSRF URL allowlisting with DNS resolution checks. - Dependency & Supply-Chain Triage: A decision tree for package-manager audit findings based on severity and reachability, plus lockfile integrity, install-script blocking, and typosquat detection. - Privacy & LLM Security: Data classification, retention, and deletion-path guidance for GDPR/CCPA, plus rules for treating model output as untrusted input and scoping agent tool permissions. - Use Case: Before shipping a login flow, run the security review checklist to verify password hashing, rate limiting with a shared store, httpOnly cookies, and generic error responses. ## Quick Start Audit my Express login endpoint for OWASP Top 10 vulnerabilities and tell me what to fix before release.

Frequently Asked Questions about security-and-hardening

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 using parameterized queries instead of string concatenation, such as db.query('SELECT * FROM users WHERE id = $1', [userId]), or an ORM like Prisma with typed inputs. Never interpolate user input directly into query strings.

How do I triage npm audit vulnerabilities?▼

Triage audit findings by severity and reachability: fix reachable critical or high issues immediately, schedule moderate production issues for the next release, and track low-severity items. Never run npm audit fix --force blindly; preview changes, read changelogs, and test each upgrade.

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

Prevent SSRF by allowlisting schemes and hosts, resolving all DNS records and rejecting any private or reserved IP range, and disabling redirects. Be aware of the TOCTOU DNS-rebinding gap; for high-risk surfaces pin the resolved IP or use a filtering agent.

Does express-rate-limit work behind a load balancer?▼

No, express-rate-limit keeps counters in process memory by default, so each instance counts separately and serverless invocations reset to zero. Use a shared store such as Redis via rate-limit-redis or an HTTP-based limiter like @upstash/ratelimit.

How do I secure LLM output in my application?▼

Treat all LLM output as untrusted input: never pass it to eval, SQL, a shell, or innerHTML. Parse it defensively with JSON.parse and a schema validator like zod, run only allowlisted actions, and encode it before rendering, per OWASP LLM05.

What should I do if a secret is committed to git?▼

Rotate the secret immediately by revoking and reissuing the key, because deleting the line or rewriting history is not enough once it reaches a remote. After rotation, purge it from history and add env files and key extensions to .gitignore.