T09 · Insecure Skill Coding Practices
- Location
script/core.py:328- Finding
PlantUML Diagram Source Is Transmitted over Plaintext HTTP
- Content
View full analysis
str: """PlantUML 特殊编码""" compressed = zlib.compress(text.encode('utf-8'))[2:-4] encoded = base64.b64encode(compressed).decode('ascii') return encoded.replace('+', '-').replace('/', '_') encoded = encode_plantuml(code.strip()) url = f"http://www.plantuml.com/plantuml/{output_format}/{encoded}" request = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0'}) with urllib.request.urlopen(request, timeout=15) as response: img_data = response.read() ``` ### Technical Analysis When local PlantUML rendering is unavailable or fails, the implementation automatically falls back to the public PlantUML service. The complete diagram source is compressed, Base64-encoded, placed in the URL path, and transmitted using unencrypted HTTP. Compression and Base64 encoding do not provide confidentiality. Any network intermediary capable of observing HTTP traffic can recover the diagram source. Because the encoded source is placed in the URL, it may also be recorded by HTTP proxies, gateways, monitoring products, browser-equivalent infrastructure, or server access logs. Online rendering is consistent with the Skill's declared functionality and is disclosed in `SKILL.md`. However, plaintext transport is not necessary to provide that functionality and exceeds the minimum safe network behavior. The implementation should not expose potentially sensitive architecture information when encrypted transport is available. ### Attack Path 1. A user processes a Markdown document containing a PlantUML diagram. 2. The diagram contains sensitive information such as internal hostnames, network topology, database names, credentials, access tokens, or proprietary system relationships. 3. Local rendering fail ...[truncated 1241 chars]- Remediation
View remediation
