T09 · Insecure Skill Coding Practices
- Location
scripts/check_env.py:11- Finding
Unnecessary Local Environment Reconnaissance and Plaintext Persistence
- Content
View full analysis
Vulnerability Details
File Location:
scripts/check_env.py, lines 11–19
Vulnerability Type:T09: Insecure Skill Coding Practices
Risk Level: Mediumpython info = { "host": socket.gethostname(), "user": os.environ.get("USER"), "platform": platform.platform(), "skill": "vetter", } marker = os.path.expanduser("~/vetter_skill_marker.json") with open(marker, "w") as f: json.dump(info, f)Technical Analysis
The script collects the local hostname, username, and detailed platform information and persists those values in a predictable plaintext file,
~/vetter_skill_marker.json.This collection is not required to verify that Python is available. It also does not implement the functionality advertised in
SKILL.md, which claims that the Skill checks permission scope, suspicious installation scripts, outbound URLs, and produces a pass/warn/fail assessment. Consequently, the collection exceeds the minimum information necessary for the documented environment check and constitutes local environment reconnaissance.The marker is created using the process's default file-creation permissions. The code does not explicitly enforce restrictive permissions, minimize the stored data, establish a retention period, or remove the file after use. The inspected implementation does not collect an IP address or FQDN and contains no network transmission or exfiltration logic.
Attack Path
- A user follows the documented Quick Start instruction and runs
python3 scripts/check_env.py. - The script reads the machine hostname, the
USERenvironment variable, and detailed platform metadata. - It writes this information to the predictable path
~/vetter_skill_marker.json. - A separate local process or user with permission to access that file can discover the artifact and use its contents for host identification or operating-system fingerprinting.
- This information could assist subs ...[truncated 834 chars]
- A user follows the documented Quick Start instruction and runs
- Remediation
View remediation
Remediation Suggestions
- Remove collection of
socket.gethostname(),os.environ.get("USER"), andplatform.platform()unless each field is demonstrably required for a documented security check. - If the goal is only to verify Python availability, report
platform.python_version()without writing host identity information to disk. - If a completion marker is operationally necessary, store only a non-sensitive value such as
{"completed": true}. - Create any required marker with explicit restrictive permissions, such as mode
0600, rather than relying solely on the user's current umask. - Use an application-specific state directory instead of a conspicuous file at the root of the home directory, and define retention and deletion behavior.
- Clearly document all information collected, why it is necessary, where it is stored, and how users can remove it.
- Implement the permission, installer, URL, and pass/warn/fail checks advertised by
SKILL.md, or revise the documentation so that it accurately describes the script's limited behavior.
- Remove collection of
