T09 · Insecure Skill Coding Practices
- Location
SKILL.md:186- Finding
Order Records Persist Sensitive Location and Purchase Data Without Defined Protections
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:186-196
Vulnerability Type: Plaintext persistence of sensitive personal and transactional data
Risk Level: MediumVulnerable Code Snippet:
markdown ## Order Logging After successful order, append to `memory/swiggy-orders.json`: ```json { "timestamp": "2026-01-28T21:16:00+05:30", "type": "food", "items": [...], "total": "₹560", "address": "HSR Layout", "orderId": "..." }text The skill additionally directs the agent to map location aliases to addresses stored in `USER.md` at `SKILL.md:107-109`: ```markdown ### Address Handling - User may say "home", "office", etc. - map to actual addresses from USER.md or ask - Always confirm delivery location in previewTechnical Analysis
The mandatory logging workflow stores order contents, monetary totals, delivery locations, timestamps, and order identifiers in a persistent JSON file. The skill does not specify:
- User consent for persistent logging
- Data minimization or address redaction
- Restrictive filesystem permissions
- Encryption at rest
- Retention or automatic deletion policies
- Protection against access by unrelated agents, tools, or local users
Purchase history combined with timestamps and delivery locations is sensitive personal data. It may reveal dietary preferences, habitual locations, occupancy patterns, and financial activity. Although this is not agent-memory poisoning because the records are operational data rather than attacker-controlled future instructions, it is an insecure data-handling practice.
Attack Path
- A user completes a food or grocery order.
- Following the skill instructions, the agent appends the order details to
memory/swiggy-orders.json. - The record includes item details, total cost, delivery location, timestamp, and order identifier.
- Another local process, user, plugin, or agent session with acc ...[truncated 618 chars]
- Remediation
View remediation
Remediation Suggestions
- Make persistent order logging explicitly opt-in rather than mandatory.
- Store only the minimum information required for the stated use case.
- Exclude full addresses, detailed item lists, and order identifiers unless specifically required.
- Replace exact addresses with user-controlled labels where possible.
- Create the file with owner-only permissions, such as mode
0600. - Define a short retention period and provide a command to inspect and delete stored records.
- Encrypt records at rest when sensitive details must be retained.
- Avoid reading addresses from shared profile files unless the user has approved that data source for the current transaction.
- Document which components and agent sessions can access the stored records.
