input-validation

Validate, sanitize, and encode user inputs to prevent injection attacks.

1|Updated Aug 29, 2025
One-click install
npx skills add https://github.com/CyberSecAI/genai-sec-agents --skill input-validation-cybersecai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: input-validation
Source: https://github.com/CyberSecAI/genai-sec-agents/tree/main/.claude/skills/input-validation
Command: npx skills add https://github.com/CyberSecAI/genai-sec-agents --skill input-validation-cybersecai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps prevent injection attacks by validating, sanitizing, and encoding all user inputs. It maps findings to ASVS/CWE and provides secure input handling patterns.

Core Features & Use Cases

  • Injection prevention for SQL, NoSQL, Command, LDAP/XPath, and XSS
  • Input sanitization, allowlist validation, and data type enforcement
  • Output encoding and secure query patterns (parameterized queries)
  • Returns ASVS-mapped findings and practical examples

Quick Start

Load this skill with /input-validation and apply parameterized queries for SQL, sanitize inputs with allowlists, and encode outputs for rendering.

Frequently Asked Questions about input-validation

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

FAQPage Schema
How do I prevent SQL and NoSQL injection in my application?

Prevent SQL and NoSQL injection by validating, sanitizing, and encoding all user inputs. Implement allowlist validation, enforce data types, and apply parameterized queries to secure all code paths.

What is the best way to sanitize user input for XSS prevention?

Sanitize user input for XSS prevention by validating data against allowlists and enforcing data types. Output encoding must be applied to all user inputs before rendering them in web contexts.

How do injection prevention techniques map to CWE and ASVS standards?

Injection prevention techniques map to CWE and ASVS standards by returning ASVS-mapped findings. This provides detection patterns and secure query examples that align with application security verification requirements.

Does input validation protect against LDAP and XPath injection?

Input validation protects against LDAP and XPath injection by validating, sanitizing, and encoding user inputs across all code paths. It provides secure input handling patterns specifically mapped to these injection vectors.

How do I implement secure parameterized queries for command shell inputs?

Implement secure parameterized queries for command shell inputs by sanitizing inputs with allowlists and enforcing strict data types. This prevents shell injection by separating code from user-supplied data across code paths.