security-and-hardening

Enforce typed parsing and fail-closed boundaries for untrusted local tooling inputs.

Updated Jun 4, 2026
One-click install
npx skills add https://github.com/zxyycom/docnav --skill security-and-hardening-zxyycom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-and-hardening
Source: https://github.com/zxyycom/docnav/tree/main/.codex/skills/security-and-hardening
Command: npx skills add https://github.com/zxyycom/docnav --skill security-and-hardening-zxyycom

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This security-and-hardening guidance focuses on hardening local tool trust boundaries when handling untrusted input, refs/identifiers, file paths, subprocesses, stdio/JSON, schema validation, generated output, external commands, dependencies, and secrets.

Core Features & Use Cases

  • Threat boundary mapping and threat modeling workflows to identify attack surfaces in local tooling.
  • Clear guardrails for input handling, parsing, path resolution, and subprocess execution to reduce risk.
  • Use Case: Apply these guidelines when integrating external tools into a larger automation pipeline to prevent data leakage and privilege escalation.

Quick Start

Review a target component to map untrusted data flows and apply the stated boundary controls.

Frequently Asked Questions about security-and-hardening

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

FAQPage Schema
How do I secure untrusted input boundaries in local tooling and subprocess interactions?

Securing untrusted input boundaries requires threat-modeling workflows and boundary enforcement. You mitigate risks by applying typed parsing, canonicalization, fixed argv usage, input size limits, and fail-closed error handling to prevent abuse across parsing and subprocess execution.

What is the best way to prevent privilege escalation when integrating external commands into an automation pipeline?

Preventing privilege escalation involves mapping threat boundaries and enforcing strict guardrails for subprocess execution. You apply fixed argv usage, typed parsing, and fail-closed error handling to isolate external commands and prevent data leakage within the automation pipeline.

How does path canonicalization prevent boundary attacks in software engineering projects?

Path canonicalization prevents boundary attacks by resolving file paths to their absolute, secure form. This process eliminates directory traversal vectors by ensuring that untrusted input cannot escape designated trust boundaries during local tool execution and path resolution.

Can I use threat modeling to identify attack surfaces in local CLI tooling?

Yes, you can use threat modeling to identify attack surfaces in local CLI tooling. Threat boundary mapping workflows expose untrusted data flows within subprocess interactions, allowing you to apply targeted boundary controls like input size limits and schema validation.

Why does fail-closed error handling matter for subprocess hardening?

Fail-closed error handling matters for subprocess hardening because it denies access by default when parsing or validation fails. This mechanism prevents abuse by ensuring that unexpected untrusted input or schema validation errors stop execution rather than defaulting to an insecure state.

When should I apply fixed argv usage for subprocess execution?

You should apply fixed argv usage for subprocess execution whenever handling untrusted input or external commands. This approach prevents shell injection by passing arguments as typed arrays directly to the subprocess, bypassing unsafe shell interpretation and enforcing strict boundary controls.