T09 · Insecure Skill Coding Practices
- Location
scripts/duhui_doc_to_pdf.py:603- Finding
Local documents are uploaded to third-party storage without enforced prior consent
- Content
View full analysis
str: content_type = mimetypes.guess_type(str(input_path))[0] or "application/octet-stream" status, body = send_oss_request( "PUT", object_key, stage="upload", body_path=input_path, content_type=content_type, ) if status < 200 or status >= 300: raise SkillError( "upload", f"OSS upload failed with status {status}: {body or 'empty response'}", ) object_url = build_object_url(object_key) parsed_url = urllib.parse.urlparse(object_url) if not parsed_url.scheme or not parsed_url.netloc: raise SkillError("upload", "OSS object URL is invalid") return object_url ``` ### Technical Analysis Uploading the source document is functionally necessary for the declared cloud conversion service. However, the implementation does not enforce an explicit consent boundary before transferring the file. It only writes a privacy message to standard error and then immediately performs the upload. This is particularly significant because `SKILL.md` broadly recommends triggering the Skill for generic document-to-PDF and format-conversion requests, rather than limiting activation to users who explicitly request Duhui or third-party cloud processing. The metadata states that notice is required before upload, but the script ...[truncated 1800 chars]- Remediation
View remediation
