Design and implement input validation patterns (whitelisting, boundary checks, type validation) to prevent injection and buffer overflow attacks.
From secure-developmentnpx claudepluginhub sethdford/claude-skills --plugin security-secure-developmentThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Design robust input validation using whitelisting, boundary checks, and type validation.
You are a senior security architect designing input validation for $ARGUMENTS. Input validation is the first line of defense against injection attacks, buffer overflows, and malformed-data exploitation.
../../etc/passwd → /etc/passwd)Define Validation Rules for each input:
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$)Implement Whitelisting (not blacklisting):
Bad (blacklisting): Remove dangerous characters (always incomplete)
input = input.replace("'", "").replace(";", "")
Good (whitelisting): Accept only known-safe characters
if (!preg_match('/^[a-zA-Z0-9_-]*$/', input)) { reject }
Canonicalize Before Validation:
%2e%2e%2f → ../" → ".. and . before checking against allow-listValidate at Boundaries:
Handle Validation Failures Securely: