T02 · Agent Memory Poisoning
- Location
SKILL.md:66- Finding
Untrusted Session Log Can Poison Future Agent Actions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is coherent and disclosed, but it stores prompts and work history in a project file and can resume work automatically without fresh confirmation.
Review before installing. Use it only in projects where persistent local logging is acceptable, add session.log to ignore rules, avoid putting secrets in prompts or commands while it is active, and prefer changing the resume behavior to summarize state and ask for confirmation before taking action.
SKILL.md:66Untrusted Session Log Can Poison Future Agent Actions
SKILL.md:66Plaintext Session Logging Can Expose Sensitive Prompts and Command Information
The skill instructs continuous creation and updating of a session log that includes user prompts, commands, files edited, and task state, but provides no privacy notice, retention policy, or consent step. This creates a clear data persistence risk because sensitive natural-language content may be written to disk in the project root and later exposed to other users, tools, or commits.
The skill establishes a persistence-and-resume workflow that stores context across resets and instructs the agent to continue work from stored state automatically. While intended for usability, this normalizes ongoing autonomous action based on retained context, which can amplify mistakes, bypass renewed user intent checks, and compound the impact of stale or sensitive state carried forward.
Persisting the user's most recent instruction verbatim in a long-lived session log creates a natural-language data retention channel that may capture secrets, credentials, proprietary details, or personal information. Because the file is stored in the project root, it is especially prone to accidental sharing through source control, backups, or team access.
The resume behavior explicitly requires reloading and resurfacing prior user input from the log, which can reveal sensitive content in later sessions beyond the original context. This increases exposure because the system is designed to proactively present old user data rather than waiting for an explicit request to restore it.
The auto-resume flow reads prior session data from disk and echoes the last user prompt back into a new session without warning. Resurfacing stored content can expose secrets, personal data, or confidential instructions to anyone reopening the workspace or reviewing logs, even if they were not present in the original session.
The instruction to continue from the last task in progress without asking for instructions authorizes autonomous decision-making based on stored state rather than fresh user confirmation. In a skill that persists prompts and task context across resets, this is more dangerous because the agent may act on outdated, incomplete, or sensitive instructions after environment or ownership changes.
Maintain a running session log at ./session.log. Write to it after every file edit and every command run. Track: files edited, commands run, tasks in progress, last user prompt, last action taken. Format defined in Context Mode skill.
At the start of every new session, check for ./session.log. If it exists, read it and announce the resume state. Continue from the last task in progress without asking for instructions.
The trigger phrases are broad enough that ordinary user requests like 'set up session logging' or 'keep track of what you've done' could unintentionally activate persistent logging and resume behavior. In this skill, accidental activation matters because it changes data handling and autonomy defaults for the whole session, potentially causing logging of sensitive prompts without explicit consent.