T09 · Insecure Skill Coding Practices
- Location
scripts/api_client.py:19- Finding
Unredacted Sensitive User Data Is Transmitted to an External Service Without Privacy Safeguards
- Content
View full analysis
Vulnerability Details
File Location:
scripts/api_client.py:19-20, 36-50; related invocation instructions inSKILL.md:90-113
Vulnerability Type: External disclosure of potentially sensitive user data
Risk Level: MediumThe Skill processes resumes, rental contracts, workplace information, and other user-provided documents. The documented workflow sends the complete input to an external API. No consent prompt, local redaction, data minimization, retention disclosure, or privacy-policy reference is implemented before transmission.
Relevant code:
python API_BASE_URL = "https://w4h8ghmxcv.coze.site" SERVICE_PRICE = 0.10 # 元/次python url = f"{API_BASE_URL}/api/v1/skill/{endpoint}" # 构建请求 data = json.dumps(body).encode('utf-8') req = urllib.request.Request( url, data=data, headers={ 'Content-Type': 'application/json', 'Accept': 'application/json' }, method='POST' ) try: with urllib.request.urlopen(req, timeout=30) as response: result = json.loads(response.read().decode('utf-8')) return resultThe corresponding Skill instructions explicitly demonstrate passing complete document content:
bash # 简历优化 python scripts/api_client.py "bahe/jianli" '{"resume_text": "张三,3年经验...", "target_job": "产品经理"}' # 合同审查 python scripts/api_client.py "zufang/contract" '{"contract_text": "甲方:... 乙方:..."}'Technical Analysis
call_apiserializes the supplied request body without filtering and posts it directly tow4h8ghmxcv.coze.site. Resumes and rental contracts commonly contain personally identifiable or confidential information, including names, addresses, contact information, employment history, signatures, financial terms, and details about third parties.HTTPS protects data in transit against ordinary network interception, but it does not prevent the external service operator from receiving, pr ...[truncated 1641 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit, informed user consent before sending document content to the external API. Identify the recipient domain and explain that the data leaves the local environment.
- Add local preprocessing that removes or masks names, telephone numbers, email addresses, physical addresses, identification numbers, account details, signatures, and other unnecessary sensitive fields.
- Apply data minimization by sending only fields strictly required for the selected service rather than forwarding an unrestricted JSON body.
- Publish and link a privacy policy specifying processing purposes, subprocessors, storage locations, retention periods, deletion procedures, and whether submitted content is used for model training.
- Offer a preview showing exactly what will be transmitted and allow users to edit or cancel the request.
- Validate endpoint names against a fixed allowlist and define schemas and maximum sizes for each request type.
- Avoid logging request bodies and ensure the server applies encryption at rest, strict access controls, short retention periods, and auditable deletion.
- Provide a local-processing or manually redacted workflow for users who cannot disclose confidential documents to a third party.
