T09 · Insecure Skill Coding Practices
- Location
SKILL.md:1041- Finding
Fail-Open Approval for Unrecognized or Unparsable Commands
- Content
View full analysis
dict: """Fallback translation for unrecognized action types. Returns a conservative formula that includes the raw command for manual review. """ return { "type": "generic", "raw_command": action.raw_text, "assertions": [], "variables": {}, "requires_manual_review": True, "confidence": action.confidence, } ``` The pre-execution hook also explicitly approves actions when parsing produces no recognized actions: ```python actions = parser.parse_plan(plan_text) if not actions: return {"verdict": "approve", "reason": "No verifiable actions detected"} ``` ### Technical Analysis The Skill is intended to operate as a mandatory pre-execution safety gate, but its parser recognizes only a limited selection of filesystem and network commands. Commands outside those lists are converted into generic formulas containing no assertions or variables. Although such formulas are marked `requires_manual_review`, the pre-execution workflow does not enforce that requirement. If parsing produces no actions at all, the hook returns an approval directly. This contradicts the documented fail-closed policy and creates a fail-open path around the security invariants. The simplistic command parsing also does not comprehensively model shell syntax such as: - Command substitutions - Shell ...[truncated 1771 chars]- Remediation
View remediation
