security-and-hardening

Hardens web application code against OWASP vulnerabilities, SSRF, and LLM-specific attack surfaces.

Updated May 5, 2026
One-click install
npx skills add https://github.com/nikegeorgian-stack/otgruzka-tovara --skill security-and-hardening-nikegeorgian-stack
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: security-and-hardening
Source: https://github.com/nikegeorgian-stack/otgruzka-tovara/tree/main/.cursor/skills/security-and-hardening
Command: npx skills add https://github.com/nikegeorgian-stack/otgruzka-tovara --skill security-and-hardening-nikegeorgian-stack

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Web 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 run STRIDE over each boundary before writing controls, addressing OWASP A04 Insecure Design. - OWASP Prevention Patterns: Ready-to-use TypeScript code for parameterized queries, bcrypt password hashing, secure session cookies, CSP headers, schema validation with zod, and SSRF-safe URL fetching. - Supply-Chain & Dependency Triage: A decision tree for triaging audit findings by severity and reachability, plus rules for lockfile integrity and blocking unreviewed install scripts. - AI/LLM Security: Guidance mapped to the OWASP LLM Top 10 covering prompt injection, untrusted model output, excessive agency, and RAG tenant isolation. - Use Case: While building a new API endpoint that accepts file uploads and calls a third-party webhook, apply the three-tier boundary system (Always Do / Ask First / Never Do) and the security review checklist to ship it without injection, SSRF, or data-exposure flaws. ## Quick Start Ask the AI to review your new API endpoint or authentication flow using the security-and-hardening checklist and fix any violations it finds.

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 a Node.js API?▼

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. Validate all request bodies at the route boundary with a schema validator like zod.

How do I protect my server from SSRF attacks?▼

Protect against SSRF by allowlisting schemes and hosts, resolving all DNS records and rejecting any private or reserved IP range, and disabling redirects on outbound fetches. For high-risk surfaces, pin the resolved IP or use a filtering agent to close the DNS-rebinding TOCTOU gap.

What security headers should an Express app set?▼

An Express app should set CSP, HSTS, X-Frame-Options, and X-Content-Type-Options, most easily via the helmet middleware. Configure a restrictive Content-Security-Policy and limit CORS to known origins rather than using wildcard origins.

How should I triage npm audit vulnerabilities?▼

Triage npm audit results by severity and reachability: fix reachable critical and high findings immediately, schedule moderate ones for the next release, and track low ones. Never run npm audit fix --force blindly; review changelogs and test each upgrade.

Is it safe to pass LLM output into SQL or HTML?▼

No, LLM output must be treated as untrusted input. Never pass it into eval, SQL, a shell, or innerHTML; instead parse it defensively, validate it against a schema, and encode it before rendering, since model output can carry injection or stored XSS payloads.

What are the limitations of dependency security audits?▼

Dependency audits only match known advisories and cannot detect newly malicious or typosquatted packages, nor prove vulnerable code is unreachable. Complement audits with lockfile integrity checks, blocked install scripts, provenance verification, and manual review of new dependencies.