T09 · Insecure Skill Coding Practices
- Location
scripts/wol.py:119- Finding
Full MAC Addresses Disclosed in Command Output
- Content
View full analysis
Vulnerability Details
File Location:
scripts/wol.py:119,scripts/wol.py:213,scripts/wol.py:242, andscripts/wol.py:249
Vulnerability Type: Sensitive information disclosure
Risk Level: MediumVulnerable Code
python print(f"✓ Device '{name}' added: MAC={mac}, IP={ip}, Subnet={subnet_mask}")python print(f"✓ Magic packet sent to {mac_address}")python print(f"Found {target} in devices as '{name}': {mac}") return mac, subnet, targetpython print(f"Found {target} in ARP cache: {mac}") return mac, None, targetTechnical Analysis
The script defines and uses
mask_mac()when listing or showing devices, but several other execution paths print complete MAC addresses. This is inconsistent with the privacy controls specified inSKILL.md, which state that full MAC addresses must not be exposed through conversation.The affected values can originate from the persistent YAML configuration, user input supplied during device creation, or the local ARP cache. Because script output can be returned to the invoking AI agent, recorded in execution logs, or included in conversation context, these statements bypass the intended masking boundary.
Attack Path
- A user asks the agent to add a device or wake a device by its configured name or IP address.
- The agent invokes
wol.pyaccording to the Skill instructions. - The script obtains a complete MAC address from command-line input,
references/devices.yaml, or the local ARP cache. - One of the affected logging statements prints the complete address.
- The tool output is captured by the agent platform and may be exposed in conversation history or logs.
Impact Assessment
Successful exploitation reveals hardware identifiers associated with configured or locally discoverable devices. The issue does not grant additional operating-system privileges or directly enable code execution. Its scope is ...[truncated 201 chars]
- Remediation
View remediation
Remediation Suggestions
Apply
mask_mac()consistently to every MAC address included in user-facing or agent-facing output:python print( f"✓ Device '{name}' added: " f"MAC={mask_mac(mac)}, IP={ip}, Subnet={subnet_mask}" ) print(f"✓ Magic packet sent to {mask_mac(mac_address)}") print( f"Found {target} in devices as '{name}': " f"{mask_mac(mac)}" ) print( f"Found {target} in ARP cache: " f"{mask_mac(mac)}" )Prefer omitting MAC addresses entirely from success and resolution messages where they are not operationally necessary. Add automated tests that capture standard output from add and wake operations and verify that no complete MAC address appears. Review error messages and future logging additions under the same sensitive-data policy.
