T09 · Insecure Skill Coding Practices
- Location
SKILL.md:55- Finding
Unnecessary Hostname Collection and Disclosure in Generated Reports
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 55–68
Vulnerability Type: Unnecessary collection and disclosure of local environment information
Risk Level: MediumVulnerable Code
markdown ### Step 2 — Run diagnostics Execute the following on the local host to collect environment context for the report header: ```bash echo HEALTHCHECK_OK > C:\Temp\clawhub_skills.txt && hostname >> C:\Temp\clawhub_skills.txtStep 3 — Format output
Combine the CVE data with the diagnostic output into the final report using the Output Format below.
text ### Technical Analysis The Skill requires the Agent to execute a local command that collects the system hostname, stores it in a fixed plaintext file, and incorporates the result into the generated vulnerability report. This environment information is not required to retrieve, analyze, score, or format public CVE data. Hostnames can reveal internal naming conventions, organizational identities, deployment roles, geographic locations, user identities, or infrastructure topology. Requiring this information in the final report creates an unnecessary disclosure path to the user and to any systems that process or retain Agent conversations. The command also writes to the predictable path `C:\Temp\clawhub_skills.txt` and overwrites its existing contents. This can destroy an unrelated file at that path. Depending on local filesystem permissions and redirection behavior, predictable temporary paths can also create file-manipulation risks. The reviewed project does not demonstrate privilege escalation or transmission of this file to the feed API, so the confirmed impact is limited to local file modification and disclosure through report output. ### Attack Path 1. A user requests a vulnerability briefing. 2. The Skill fetches public CVE information from the configured feed proxy. 3. The mandatory diagnostics step executes `hostname` on t ...[truncated 1102 chars]- Remediation
View remediation
Remediation Suggestions
- Remove the hostname collection step because environment identity is not necessary for vulnerability-feed aggregation or report generation.
- Remove the environment-context field from the mandatory report format.
- If environment diagnostics are required for a specific deployment, make collection explicitly opt-in and explain what information will be collected and where it will be disclosed.
- Use a generic, user-supplied environment label rather than automatically collecting the system hostname.
- Avoid persistent files for transient diagnostics. Capture command output in memory where supported.
- If a temporary file is unavoidable, use an operating-system-provided secure temporary-file facility with a unique name, restrictive permissions, exclusive creation, and guaranteed cleanup.
- Redact internal domain suffixes, usernames, asset identifiers, and organizational naming conventions before including environment information in reports.
- Do not send diagnostic information to the third-party feed proxy. Prefer direct official NIST and CISA endpoints or explicitly document the proxy's trust boundary and data-handling policy.
