T09 · Insecure Skill Coding Practices
- Location
scripts/email_validate.py:206- Finding
Terminal Escape-Sequence Injection Through Unsanitized Email Output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a straightforward local email validator with disclosed DNS checks and file input, with minor terminal-output and permission-scoping caveats but no evidence of malicious behavior.
Install only if you are comfortable running a local Python script that may perform DNS lookups and read email addresses from a file you choose. Avoid displaying results from untrusted email-list files directly in a terminal unless the tool sanitizes control characters, or use JSON output for safer review.
scripts/email_validate.py:206Terminal Escape-Sequence Injection Through Unsanitized Email Output
The skill documentation instructs the agent to invoke a local Python script and to read batch input from a user-supplied file, which implies shell execution and file access capabilities. Because the skill omits any explicit tool scope or permission declaration, an integrating agent may grant broader-than-necessary access by default, increasing the chance of unintended command execution or unauthorized file reads if the skill is used in a permissive environment.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# Try MX lookup via low-level DNS
try:
import subprocess
result = subprocess.run(
["dig", "+short", "MX", domain],
capture_output=True, text=True, timeout=timeout
)
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# Fallback: try nslookup
try:
result = subprocess.run(
["nslookup", "-type=MX", domain],
capture_output=True, text=True, timeout=timeout
)