T09 · Insecure Skill Coding Practices
- Location
scripts/dep_graph.py:230- Finding
Unsanitized Manifest Data Permits Terminal Control-Sequence Injection
- Content
View full analysis
- Remediation
View remediation
= 0x20 and ord(ch) != 0x7F else f"\\x{ord(ch):02x}" for ch in text ) ``` Use it at the output boundary: ```python name = terminal_safe(dep.get("name", "")) version = terminal_safe(dep.get("version", "")) ver = f" @ {version}" if show_versions and version else "" lines.append(f"{prefix} {name}{ver}") ``` For stronger Unicode handling, also escape C1 controls (`U+0080`–`U+009F`) and consider replacing all characters whose Unicode category is `Cc`, except explicitly permitted formatting characters. ]]>
