T09 · Insecure Skill Coding Practices
- Location
scripts/track_foreshadowing_llm.py:61- Finding
Undisclosed transmission of complete manuscript content to a third-party LLM service
- Content
View full analysis
Vulnerability Details
File Location:
scripts/track_foreshadowing_llm.py, lines 61–99
Vulnerability Type: Sensitive-data transmission without adequate disclosure, consent, or data minimization
Risk Level: MediumEvidence
python url = "https://coding.dashscope.aliyuncs.com/v1/chat/completions" payload = { "model": model, "messages": [ { "role": "system", "content": "You are a fiction analysis expert. You must return standard JSON.", }, {"role": "user", "content": prompt}, ], "temperature": 0.3, } try: response = requests.post(url, headers=headers, json=payload, timeout=60) response.raise_for_status() result = response.json() content = result["choices"][0]["message"]["content"] return json.loads(content)The
promptinserted into the user message includes the complete contents of the file selected through--input.Technical Analysis
The script reads the entire input file and embeds it, without filtering or truncation, in a request sent to the fixed DashScope endpoint. Although HTTPS protects the content in transit, the remote service receives the complete manuscript and associated chapter information.
This network behavior is not documented in
SKILL.md, which describes a local keyword-based tracker and lists only the localtrack_foreshadowing.pyCLI. The documentation does not identify the LLM script, the DashScope recipient, the categories of data transmitted, or applicable third-party retention and processing considerations. There is also no confirmation prompt, explicit opt-in flag, redaction facility, size limit, or local-only mode in the LLM script.Transmission of text is necessary for the selected remote-LLM implementation, but sending the entire file exceeds minimum data access where analysis could be performed in chunks, on selected passages, or through the documented l ...[truncated 1650 chars]
- Remediation
View remediation
Remediation Suggestions
- Document the LLM script and clearly state that the complete selected text is sent to DashScope, including the destination hostname and relevant privacy and retention considerations.
- Require explicit consent before transmission, such as a
--allow-remote-processingflag. In interactive use, display the destination, file path, and byte count before sending. - Preserve the documented local analyzer as the default. Remote processing should be an explicit alternative rather than an implicit extension of local functionality.
- Minimize transmitted data by supporting selected passages, bounded chunks, or pre-extracted candidate sentences instead of uploading the complete manuscript.
- Add configurable content redaction for personal information, secrets, credentials, and other user-defined sensitive patterns.
- Enforce an input-size limit and report exactly how much data will be transmitted.
- Allow an administrator-approved endpoint configuration while validating an HTTPS allowlist. Do not permit arbitrary endpoints without an explicit unsafe override.
- Document provider data-processing terms and advise users not to submit confidential material unless their deployment and provider agreement permit it.
- Avoid printing raw model responses on parsing failures where model output may reproduce sensitive manuscript content.
