Scan a codebase to find every instance of missing or inadequate input validation for data from external or untrusted sources, then propose context-appropriate fixes using whitelisting, regex, type coercion, size/range checks, encoding, etc. Use whenever the user asks to audit, review, or harden input validation in any codebase regardless of language. Trigger on: "check my inputs", "find injection risks", "validate user input", "security audit inputs", "input sanitisation review", "taint analysis", "harden my API inputs", "check for missing validation", "is my app safe from injection?". Platform- and language-independent.
88
85%
Does it follow best practices?
Impact
90%
1.15xAverage score across 3 eval scenarios
Passed
No known issues
This is skill dancon-input-validation by Danielyan Consulting: https://danielyan.consulting
Systematically review an entire codebase, identify every location where data from an external or untrusted source is consumed without adequate validation, and produce a structured report with context-appropriate remediation advice.
Before starting, read the reference file at
references/validation-patterns.md for the catalogue of
validation strategies and the threat model you should apply.
Exhaustive coverage -- continue scanning until every file that could contain input-handling logic has been reviewed. Never stop after the first finding. Explicitly confirm to the user that the full codebase has been reviewed.
Whitelisting over blacklisting -- Every recommendation must use a positive-security model.
Defence in depth -- validation should occur at the boundary closest to the untrusted source.
Secrets redaction -- if any hardcoded secret (password, API key, token,
private key, connection string with credentials, etc.) is found anywhere in the
codebase, flag it as a critical finding. NEVER display the secret itself; always
substitute REDACTED for the actual value and explain that the secret must be
moved to a secure secret store or environment variable.
Language/platform independence -- apply the same methodology regardless of whether the code is Python, JavaScript, TypeScript, Java, C#, Go, Rust, PHP, Ruby, C/C++, Swift, Kotlin, shell scripts, SQL, infrastructure-as-code (Terraform, CloudFormation), or any other language or DSL. Adapt your recommended fix syntax to the language at hand.
List every file in the target directory tree (recursively), filtering out binary files, dependency/vendor directories (node_modules, vendor, .venv, pycache, dist, build, etc.), and lock files. Build a mental map of:
If the codebase is large (many hundreds of files), process it in batches by directory. Announce progress to the user: "Reviewing directory src/api/ (batch 3 of 7)..."
For every entry point identified in Step 1, trace the data flow from ingestion to use. At each stage, check:
| Check | What to look for |
|---|---|
| Presence of validation | Is there ANY validation before the data is used? |
| Type enforcement | Is the expected type checked or coerced (e.g. parseInt, type hints, schema validation)? |
| Allowlist / enum check | For categorical values, is there a whitelist of permitted values? |
| Format validation | For structured strings (emails, URLs, dates, UUIDs, etc.), is the format validated with a regex or parser? |
| Length / size limits | Are maximum (and where appropriate minimum) lengths enforced? |
| Range checks | For numeric inputs, are upper and lower bounds enforced? |
| Encoding / escaping | Is output properly encoded for its context (HTML, SQL, shell, URL, JSON, XML)? |
| Parameterised queries | Are database queries parameterised rather than built via string concatenation? |
| Path traversal guards | For file paths, is the input canonicalised and confined to an expected directory? |
| Deserialisation safety | Is untrusted data deserialised with a safe method (no pickle.loads on user input, etc.)? |
| Authentication context | Is the identity of the caller verified before the input is processed? |
| Authorisation context | Even if the caller is authenticated, is access-control checked for this operation? |
Scan every file (including configuration, CI/CD, and infrastructure files) for patterns that suggest hardcoded secrets:
When reporting, substitute REDACTED for every secret value. Example:
CRITICAL -- Hardcoded secret found File:
src/config.js, line 14 VariableDB_PASSWORDis set toREDACTED. Move this value to an environment variable or a dedicated secret-management service.
Present findings as a structured list grouped by file. Each finding must include:
After all findings, include a summary table:
| Severity | Count |
|---|---|
| Critical | ... |
| High | ... |
| Medium | ... |
| Low | ... |
End with a confirmation: "The entire codebase has been reviewed."
REDACTED.99b52ce
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.