web-security

Enforce web security best practices for XSS, injection, authentication, and browser security APIs.

Updated Jan 11, 2025
One-click install
npx skills add https://github.com/rdjakovic/todo2 --skill web-security-rdjakovic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web-security
Source: https://github.com/rdjakovic/todo2/tree/main/.claude/skills/web-security
Command: npx skills add https://github.com/rdjakovic/todo2 --skill web-security-rdjakovic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers build and maintain secure web applications by providing clear guidelines and best practices to prevent common vulnerabilities.

Core Features & Use Cases

  • Security Principles: Enforces core tenets like never trusting user input and validating data at boundaries.
  • Vulnerability Prevention: Offers guidance on mitigating Cross-Site Scripting (XSS), SQL injection, and other common attacks.
  • Authentication & Authorization: Provides best practices for secure handling of user credentials and access control.
  • Browser Security: Details the use of security APIs like CORS and CSP.
  • Use Case: A developer can use this skill to ensure their new web feature adheres to security best practices before deployment, reducing the risk of breaches.

Quick Start

Review the web security guidelines to ensure all user inputs are validated.

Frequently Asked Questions about web-security

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

FAQPage Schema
How do I prevent XSS and injection attacks in my web application?

To prevent XSS and injection attacks, you must treat all user input as hostile and strictly validate data at all system boundaries. Enforcing secure coding principles mitigates cross-site scripting and SQL injection vulnerabilities before deployment.

What are the best practices for securing web authentication and authorization?

Securing web authentication and authorization requires following established best practices for handling user credentials and enforcing strict access control. This ensures that only authenticated users gain access to protected resources.

How do I configure Content Security Policy and CORS for browser security?

Configuring Content Security Policy (CSP) and Cross-Origin Resource Sharing (CORS) involves leveraging browser security APIs to restrict resource loading and control cross-origin requests. This mitigates malicious data injection and unauthorized data access.

Why should user input be treated as hostile when building web features?

User input must be treated as hostile because unvalidated data is the primary vector for web vulnerabilities like XSS and injection attacks. Validating data at all boundaries ensures that malicious payloads cannot execute within your application.

Can I use these secure coding guidelines for existing web applications or only new features?

You can apply these secure coding guidelines to both new web features and existing applications. Reviewing security principles helps developers validate user inputs and mitigate vulnerabilities across the entire software lifecycle.