T09 · Insecure Skill Coding Practices
- Location
batch_id.py:48- Finding
Predictable Shared Temporary File Exposes Sensitive Identity Data
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill does what it claims, but it handles bulk government ID data in ways that need review before installation.
Install only if you are authorized to process the ID documents and are comfortable sending image URLs to Tencent Cloud OCR. Treat the returned text file as highly sensitive personal data. The publisher should add explicit consent and privacy disclosures, use unique secure temporary files or in-memory attachments, clean up outputs after delivery, and pin reviewed dependency versions.
batch_id.py:48Predictable Shared Temporary File Exposes Sensitive Identity Data
requirements.txt:1Unbounded Dependency Version Allows Unreviewed Future SDK Releases
The skill processes highly sensitive government ID data and explicitly returns extracted name, sex, and ID number in a downloadable text file, but the description does not clearly warn users about the sensitivity and redistribution risk of that output. This increases the chance of accidental exposure, insecure sharing, or retention of plaintext identity data by users or downstream systems.
The documentation says the skill uses Tencent Cloud OCR and requires network access to the Tencent OCR endpoint, but it does not clearly warn users that uploaded ID images will be transmitted to a third-party cloud service for external processing. For identity documents, failing to disclose third-party processing creates serious privacy, consent, and compliance risks.
The skill sends user-supplied ID-card image URLs to Tencent Cloud OCR and extracts highly sensitive personal data including name, sex, and ID number. In a skill context, transmitting government ID data to a third-party processor without clear disclosure, consent, minimization, or retention controls creates a significant privacy and compliance risk, especially because users may not realize their data leaves the local environment.
The code writes extracted ID-card details to a plaintext file in /tmp and returns that file for downstream delivery, exposing sensitive identity data at rest and in transit within the platform workflow. Even though /tmp is the writable directory in SCF, storing full identity records in an attachment increases the chance of unintended disclosure, cross-process access, or retention beyond user expectations.
The skill explicitly processes up to 50 ID-card images, extracts their contents, generates a .txt file, and sends that file back to the user, yet the description provides no warning that this involves highly sensitive personal data. Omitting this notice increases the risk of users unknowingly submitting regulated PII and of downstream insecure handling, storage, or transmission of bulk identity data.
All user-facing instructions and examples in the skill file are presented only in Chinese, which can amount to forcing a specific language without opt-in. The stated policy requires flagging language or locale constraints unless the skill offers a choice or clearly documents a justified region-specific limitation.
The dependency is specified with only a lower bound, which allows installation of any newer version, including future major releases that may introduce breaking changes or vulnerable transitive behavior. While this is a common packaging practice, it weakens build reproducibility and increases supply-chain risk because different environments may resolve to different versions over time.
tencentcloud-sdk-python>=3.0.0