security-and-hardening

Hardens web application code against OWASP vulnerabilities through threat modeling and defensive patterns.

5|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/PHenrique07/Sementis-IFSP-Pirituba --skill security-and-hardening-phenrique07
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: security-and-hardening
Source: https://github.com/PHenrique07/Sementis-IFSP-Pirituba/tree/main/.github/skills/security-and-hardening
Command: npx skills add https://github.com/PHenrique07/Sementis-IFSP-Pirituba --skill security-and-hardening-phenrique07

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, SSRF, broken access control, and supply-chain attacks. This Skill provides a systematic process to threat-model features and apply proven prevention patterns before vulnerabilities ship. ## Core Features & Use Cases - Threat Modeling with STRIDE: Map trust boundaries, name assets, and write abuse cases before writing code. - OWASP Top 10 Prevention Patterns: Copy-ready code for parameterized queries, bcrypt password hashing, secure session cookies, CSP headers, CORS restriction, and SSRF URL allowlisting. - Dependency & Supply-Chain Triage: A decision tree for package-manager audit findings based on severity, reachability, and fix availability, plus lockfile and install-script hygiene. - Privacy & LLM Security: Data classification, retention, and deletion rules for GDPR/CCPA, plus OWASP LLM Top 10 guidance for treating model output as untrusted input. - Use Case: Before merging a new login endpoint, run the security review checklist to confirm rate limiting uses a shared store, passwords are hashed with bcrypt, and error responses leak no internals. ## Quick Start Audit my authentication endpoint and user input handlers for OWASP Top 10 vulnerabilities and suggest fixes.

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 web applications?▼

Prevent SQL injection by using parameterized queries or an ORM instead of concatenating user input into SQL strings. Pass user values as bound parameters, for example db.query('SELECT * FROM users WHERE id = $1', [userId]).

How to secure session cookies against XSS and CSRF?▼

Set session cookies with httpOnly, secure, and sameSite flags so JavaScript cannot read them and cross-site requests cannot attach them. Hash passwords with bcrypt at 12+ salt rounds and keep session secrets in environment variables, never in code.

How do I triage npm audit vulnerability findings?▼

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 ones. Never run forced audit fixes automatically; preview changes and read changelogs first.

What is SSRF and how do I prevent it?▼

SSRF occurs when a server fetches a user-influenced URL, letting attackers reach internal services like cloud metadata endpoints. Prevent it by allowlisting hosts, requiring HTTPS, rejecting any resolved private or reserved IP, and disabling redirects.

Does rate limiting work on serverless or multi-instance deployments?▼

In-memory rate limiters fail across multiple instances because each process keeps its own counter, and serverless invocations start from zero. Use a shared store such as Redis via rate-limit-redis or an HTTP-based limiter like @upstash/ratelimit.

When should LLM output be treated as untrusted input?▼

Always treat LLM output as untrusted, since it can contain SQL, script tags, or shell commands injected via prompts. Parse it defensively with a schema, validate before use, and never pass it to eval, innerHTML, or raw queries.