T09 · Insecure Skill Coding Practices
- Location
SKILL.md:57- Finding
Customer PII Is Persisted in a Plaintext JSON File
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 33–40 and 57–63
Vulnerability Type: Plaintext storage of sensitive customer data
Risk Level: MediumVulnerable Code
markdown | Column | Content | Example | |--------|---------|---------| | A | Date added | 2025-10-19 | | B | Latest message | 2025-11-06 | | C | LINE registered name | Customer name | | D | System display name | Display name | | E | Email address | example@email.com | | F | Step-delivery status | Paused | | G onward | Category columns | User-defined |bash gws sheets spreadsheets values get \ --params '{"spreadsheetId":"SPREADSHEET_ID","range":"シート1!A:K"}' \ --format json > customers.jsonTechnical Analysis
The documented command exports columns
A:Kfrom the customer spreadsheet directly tocustomers.json. Based on the documented schema, this export includes names, email addresses, messaging activity, delivery status, and customer-interest categories.Shell redirection creates a persistent, unencrypted file using the process's current file-creation permissions. The Skill does not require owner-only permissions, a protected destination, data minimization, encryption, a retention period, or cleanup after processing. Consequently, sensitive customer information can remain on disk beyond the messaging operation.
This is an insecure data-handling practice rather than evidence of intentional exfiltration. The audited file does not instruct the Agent to send this data to an unrelated destination.
Attack Path
- An operator follows the documented command while processing customer messages.
- Google Sheets returns customer records from columns
A:K. - Shell redirection writes the response as plaintext to
customers.jsonin the current working directory. - The file remains after processing because no cleanup procedure is specified.
- A local user, unrelated process, backup system, o ...[truncated 825 chars]
- Remediation
View remediation
Remediation Suggestions
- Avoid persistent files by piping the JSON response directly into the authorized processing component or retaining it only in memory.
- Export only fields required for message generation rather than the entire
A:Krange. Exclude email addresses and unrelated metadata when they are unnecessary. - If temporary storage is unavoidable, create a private temporary directory and enforce owner-only permissions, for example with
umask 077. - Use an unpredictable temporary filename instead of a fixed file in the working directory.
- Register cleanup so the temporary file is removed on successful completion, interruption, or error.
- Encrypt stored exports when processing requirements make retention necessary, and document the permitted retention period and deletion procedure.
- Prevent customer exports from entering source control, cloud-synchronized folders, logs, or broad backup sets.
- Validate that the runtime account and all downstream tools operate with least-privilege access to both the spreadsheet and temporary data.
