T09 · Insecure Skill Coding Practices
- Location
scripts/pipeline.py:119- Finding
Complete PDF Documents Are Uploaded to a Third-Party OCR Service Without Explicit Disclosure or Consent
- Content
View full analysis
str: """Submit a PDF chunk to the OCR API. Returns job ID.""" headers = {"Authorization": f"bearer {TOKEN}"} data = {"model": MODEL, "optionalPayload": json.dumps(OPTIONAL_PAYLOAD)} with open(chunk_path, "rb") as f: resp = requests.post(API_URL, headers=headers, data=data, files={"file": f}, timeout=120) if resp.status_code != 200: raise RuntimeError(f"API error {resp.status_code}: {resp.text[:300]}") job_id = resp.json()["data"]["jobId"] print(f" Submitted → job {job_id}") return job_id ``` The Skill documentation describes an “OCR API” but does not explicitly explain that all pages and document contents are transmitted to `paddleocr.aistudio-app.com`: ```markdown Automated pipeline: **Split → OCR API → Layout PDF → Merge** ``` ### Technical Analysis The implementation splits the source PDF into chunks and uploads each chunk in full to a third-party cloud OCR endpoint. This transmission is functionally necessary for the selected cloud-based OCR implementation, but the Skill does not clearly identify the third-party recipient, request informed confirmation, explain potential service-side retention, or warn users not to submit confidential documents. PDFs processed by an OCR Skill may contain personal data, credentials, legal records, financial data, health information, or proprietary business material. Uploading such data crosses a significant trust boundary. The local work directory also retains complete PDF chunk ...[truncated 1526 chars]- Remediation
View remediation
