T09 · Insecure Skill Coding Practices
- Location
references/Coze-IMA协同尽调流程.md:126- Finding
Uncontrolled External Upload and Persistence of Confidential Due-Diligence Data
- Content
View full analysis
Vulnerability Details
File Location:
references/Coze-IMA协同尽调流程.md, lines 126–140 and 359–369
Vulnerability Type: Uncontrolled external disclosure and storage of sensitive data
Risk Level: MediumComplete Vulnerable Snippets
Lines 126–140 instruct the agent to upload customer documents:
markdown #### 1.4 New Material Import If the customer provides new documents, use the `import_doc` API: API: import_doc Parameters: - file: document file (PDF/DOCX/TXT) - title: document title (recommended format: project_name_material_type_date) Import priority: 1. Business plan 2. Technical white paper/product specification 3. Patent documents 4. Team introduction/resumes 5. Financial data/test reportsLines 359–369 instruct the agent to persist the completed report:
markdown #### 4.4 Write the Report Back to IMA Use the `append_doc` API to write the final report into the IMA knowledge base: API: append_doc Parameters: - doc_id: target document ID - content: report content (Markdown format) Recommended naming format: Due_Diligence_Report_ProjectName_YYYYMMDDThe original source is written in Chinese; the snippets above are faithful English translations so that all report text complies with the required language.
Technical Analysis
The workflow handles business plans, technical specifications, patent documents, resumes, financial information, and test reports. These materials may contain trade secrets, personal data, financial data, and other confidential information.
The instructions direct the agent to transmit those files to an external IMA service and later persist an aggregated due-diligence report. They do not require:
- Explicit and informed customer authorization before transmission.
- Data classification or sensitivity review.
- Redaction or minimization of personal, financial, or proprietary data.
- Verification of the destination tenant, account, knowledge base, or document.
- A local-only processing alter ...[truncated 1924 chars]
- Remediation
View remediation
Remediation Suggestions
-
Require explicit authorization
- Present a clear notice identifying the external service, destination tenant, categories of data, and purpose.
- Require affirmative customer approval before each upload or report write-back.
- Do not treat general use of the skill as consent to external storage.
-
Default to local-only processing
- Make external import and persistence opt-in.
- Provide a mode that analyzes supplied files without transferring or retaining them in a third-party repository.
-
Verify the destination
- Display and confirm the IMA account, tenant, knowledge-base ID, and target document ID.
- Use an allowlist of approved destinations.
- Reject unknown, personal, or cross-customer repositories.
-
Minimize and redact data
- Upload only files and excerpts necessary for the requested analysis.
- Detect and redact credentials, private keys, personal identifiers, bank information, confidential contact details, and unrelated records.
- Never upload
.envfiles, secret stores, credential files, or unrelated local files.
-
Apply retention controls
- Define a retention period before upload.
- Support immediate deletion after analysis.
- Record deletion status and provide the customer with destination and retention details.
-
Harden access control
- Use dedicated, least-privilege service credentials.
- Limit credentials to the approved knowledge base and required API operations.
- Avoid broad inspection of secret files or environment variables.
- Keep audit logs of uploads, write-back actions, destinations, and authorization decisions.
-
Add mandatory preflight checks
- Classify each document before transmission.
- Block uploads involving regulated or highly confidential data unless the destination is explicitly approved.
- Verify encryption in transit, encryption at rest, tenant isolation, and access policy.
-
**Prevent unintended p ...[truncated 179 chars]
-
