The sinks and boundaries that belong to no framework: passing input to a shell or an evaluator, letting input choose a filesystem path, validating at a boundary that is not an HTTP request, and handling regulated data (PII, PHI, cardholder data) so it does not spread into paths nobody reviews. Use when generating or reviewing code that shells out, touches the filesystem, reads a queue message, CLI argument, or parsed file, or when a change crosses a PII, PHI, or PCI boundary.
Scanned 9/6/2026
Install to Claude Code
npx -y skills add ShieldNet-360/secure-vibe --skill secure-code-review --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Secure Code Review?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/shieldnet-360-secure-code-review)More formats (shields.io, HTML) on the badges page.
---
name: secure-code-review
description: "The sinks and boundaries that belong to no framework: passing input to a shell or an evaluator, letting input choose a filesystem path, validating at a boundary that is not an HTTP request, and handling regulated data (PII, PHI, cardholder data) so it does not spread into paths nobody reviews. Use when generating or reviewing code that shells out, touches the filesystem, reads a queue message, CLI argument, or parsed file, or when a change crosses a PII, PHI, or PCI boundary."
---
<!-- Native skill bundle for agent-skills (cross-tool convention). Generated by `secure-vibe dev regenerate`. -->
<!-- Do not edit by hand; the source of truth is skills/secure-code-review/SKILL.md. -->
# Secure Code Review
The sinks and boundaries that belong to no framework: passing input to a shell or an evaluator, letting input choose a filesystem path, validating at a boundary that is not an HTTP request, and handling regulated data (PII, PHI, cardholder data) so it does not spread into paths nobody reviews. Use when generating or reviewing code that shells out, touches the filesystem, reads a queue message, CLI argument, or parsed file, or when a change crosses a PII, PHI, or PCI boundary.
## ALWAYS
- Validate input at **every** trust boundary, not only the HTTP one. A CLI argument, an environment variable, a queue message, a filename, a parsed config or spreadsheet cell all arrive from outside and none of them pass through the request-validation layer. Check type, length, allowed characters and allowed range, and reject before processing. `api-security` owns the HTTP request body and its schema; this rule is every other way input gets in.
- Build a command as an **argument vector**, never as a string a shell will parse: `subprocess.run([...])` without `shell=True`, `execFile`/`spawn` with an array, `exec.Command(name, args...)`. Passing an array is what removes the shell, and removing the shell is what removes the injection — quoting and escaping are the fallback for when you cannot.
- **Canonicalize then check** any path built from input: resolve it to an absolute real path, then confirm it is inside the intended directory. Checking the raw string first misses `..`, symlinks, absolute-path replacement, and encoded separators. `file-upload-security` owns stored uploads and archive extraction; this rule covers a static-file handler, a template loader, a log path, an export filename.
- Tag any function or module handling **PII, PHI or cardholder data** with an explicit classification comment (`// classification: PII`), and keep that handling in clearly-named modules rather than in general utility code. An untagged helper is how regulated data spreads into paths nobody reviews for it, and the tag is what makes the later review possible.
- Consult the owner for anything with one: `database-security` when code builds a query, `crypto-misuse` when it hashes, encrypts, signs or compares a secret, `frontend-security` for output encoding and response headers, `auth-security` for who the caller is, `iam-best-practices` for the privileges a process runs with. Each of those states its rule with the API names and the false positives this skill would have to leave out.
## NEVER
- Pass input to a shell or an evaluator: `system`, `popen`, `os.system`, `subprocess.run(..., shell=True)`, `child_process.exec` / `execSync`, backticks, `eval`, `new Function()`, `vm.runInNewContext`, `pickle.loads` on a request body. The dangerous property is that the callee parses the string; a value that is only ever an argument is not the same risk.
- Let input reach a path without canonicalization — including as a *segment* joined onto a trusted base, which is where `../` still works.
- Treat client-side validation as a control. Re-validate on the server, and treat the client check as what it is: a message to the user, not a boundary.
- Store a **payment card number, CVV, or full track data** in your own database. Send the card to a tokenization provider and persist only the opaque token plus the last four digits. The CVV is never persisted at all, not even encrypted, not even briefly — retention is the violation, not exposure.
- Copy real regulated data into a fixture, a seed script, a local dump, or a bug report to reproduce something. The copy inherits the classification and leaves the reviewed path, which is the whole failure this skill's tagging rule exists to prevent.
## KNOWN FALSE POSITIVES
- Obviously fake fixture data is not regulated data: `4111-1111-1111-1111`, `555-0100`, `John Doe`, `test@example.com`. The classification rules apply to real data paths.
- A command built entirely from **constants**, or one whose only variable parts are passed as separate argv elements, is not command injection. The finding is a shell parsing a string that input reached — not the presence of a subprocess call.
- A path joined from values the application itself generated — a UUID, a hash, a database id — is not traversal. The finding is a caller-supplied component.
- A regulated-data module that is *correctly* tagged and narrowly scoped is the rule working. The finding is untagged handling in general-purpose code.
## Reference files
Read these only when the task calls for them.
- `references/verifying-compliance-findings.md`
- `references/verifying-findings.md`
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!