security-review-owasp-os-command-injection-defense

Review OS command injection defense weaknesses across code, configuration, and architecture.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/sjinks/ai-owasp-skillset --skill security-review-owasp-os-command-injection-defense
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-review-owasp-os-command-injection-defense
Source: https://github.com/sjinks/ai-owasp-skillset/tree/main/.github/skills/security-review-owasp-os-command-injection-defense
Command: npx skills add https://github.com/sjinks/ai-owasp-skillset --skill security-review-owasp-os-command-injection-defense

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps reviewers identify when untrusted input can reach commands, interpreters, redirect targets, or sensitive state changes in unsafe ways.

Core Features & Use Cases

  • Boundary Analysis: Traces how attacker-controlled data moves through validation, normalization, binding, and execution paths.
  • Exploit Prioritization: Distinguishes direct command execution risks from weaker formatting, routing, or configuration issues.
  • Review Evidence: Anchors findings in visible code, tests, documentation, or behavior instead of speculation.
  • Use Case: Apply it when reviewing an authentication flow, webhook handler, admin tool, or deployment script that may pass user input into shell commands or other privileged sinks.

Quick Start

Use the security-review-owasp-os-command-injection-defense skill to review the target files for unsafe input-to-execution paths and report any confirmed command injection weaknesses.

Frequently Asked Questions about security-review-owasp-os-command-injection-defense

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

FAQPage Schema
How do I review code for OS command injection vulnerabilities?

OS command injection defense review works by tracing attacker-controlled data across trust boundaries through validation, normalization, and binding paths to execution sinks. It distinguishes direct command execution risks from weaker formatting or routing issues by anchoring findings in visible code evidence.

What is the best way to check if user input reaches shell commands safely?

Checking if user input reaches shell commands safely requires verifying parameterization and allowlists at trust boundaries. This blocks untrusted data from reaching shells, interpreters, or redirectors while confirming exploit paths are mitigated by visible code evidence.

How do I identify second-order command injection paths in code?

To identify second-order command injection paths, trace how attacker-controlled data moves through normalization and binding phases before reaching execution sinks. This reveals bypassed validation where untrusted input indirectly triggers privileged state mutations or interpreter commands.

Does this command injection review apply to webhook handlers and deployment scripts?

This command injection review applies to webhook handlers, deployment scripts, authentication flows, and admin tools. It assesses input handling, boundary crossings, and execution paths where untrusted data may reach shells, interpreters, redirectors, or privileged state mutations.

When do I need a trust boundary analysis for command injection risks?

A trust boundary analysis for command injection risks is needed when reviewing code that passes user input into shell commands or privileged sinks. It traces attacker-controlled data through validation, normalization, and binding paths to confirm blocked or bypassed exploit paths.

Why distinguish direct command execution from formatting or routing issues in security reviews?

Distinguishing direct command execution from formatting or routing issues prioritizes exploit risks accurately in security reviews. It separates critical boundary crossings where untrusted data reaches shells from weaker configuration or redirect target vulnerabilities requiring different remediation.