T09 · Insecure Skill Coding Practices
- Location
scripts/qrcode_generator.py:27- Finding
Arbitrary QR Payloads Are Disclosed to a Third-Party Service and Re-Exposed in JSON Output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does generate QR codes, but it automatically sends whatever text you encode to a third-party QR service and documents that risk inconsistently.
Review this before installing if you might encode passwords, tokens, internal URLs, contact details, or Wi-Fi credentials. Treat all QR payloads as shared with api.qrserver.com, and avoid the JSON output for sensitive content because it includes the generated request URL.
scripts/qrcode_generator.py:27Arbitrary QR Payloads Are Disclosed to a Third-Party Service and Re-Exposed in JSON Output
The skill description understates behavior by presenting itself as a simple QR generator while transmitting user-provided text/URLs to an external service and apparently supporting behaviors not fully declared in the metadata. This is dangerous because users may enter secrets, Wi-Fi credentials, contact data, or internal URLs believing processing is local, causing unintended third-party disclosure.
The skill performs network access to a third-party QR code API but does not declare any tool scope, permissions, or allowed-tools metadata. This creates an authorization and transparency gap: hosts or users may assume the skill is local-only while user-supplied content is actually transmitted externally.
The implementation relies on a third-party web API to generate QR codes, despite the skill description implying a simple local capability and emphasizing that no API key is required. This creates an undisclosed dependency on an external service, which introduces privacy, availability, and supply-chain risk because user input is sent off-system and functionality breaks if the service is unavailable or changes behavior.
The script does not clearly notify users that the provided text or URL will be transmitted to an external service for QR code generation. This lack of transparency is dangerous because users may reasonably assume QR generation is local and unknowingly disclose confidential or regulated data.
User-supplied text and URLs are embedded into a request to api.qrserver.com, meaning potentially sensitive content is transmitted to an external party. In this skill context, users may encode secrets, Wi-Fi credentials, tokens, or internal URLs into QR codes, so the off-system transmission materially increases confidentiality risk.
The code makes an outbound HTTPS request to a third-party endpoint and includes user-controlled content in that request. While external communication is not inherently malicious, in this skill it is security-relevant because it exposes all encoded data to an external service and creates dependency on that service's trustworthiness and availability.
dict with success status and data/base64 or error message
"""
encoded_text = urllib.parse.quote(text)
url = f"https://api.qrserver.com/v1/create-qr-code/?size={size}x{size}&margin={margin}&format={format}&data={encoded_text}"
headers = {
'User-Agent': 'QRCode-Tool/1.0 (https://github.com/qiance)'
The manifest sets language: en, which indicates an English-only locale choice in the skill metadata. Although the file also contains a Chinese section later, there is no explicit user opt-in or explanation that the locale restriction is intentional or region-specific, so this is a natural-language locale policy concern.
No suspicious patterns detected.