T02 · Agent Memory Poisoning
- Location
SKILL.md:67- Finding
Untrusted Incident Data Can Be Converted into Persistent Agent Configuration
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 39-41 and 67-89
Vulnerability Type: Persistent agent memory and configuration poisoning
Risk Level: HighVulnerable Code
markdown - Read every entry in `../../trainer/logs/incidents.md` timestamped after the value in `../../trainer/logs/.last-review` (create with far-past date if missing) - Skim `HEARTBEAT.md` and `MEMORY.md` for relevant activity not formally loggedmarkdown ### Step 4 — Apply or hold - Read `../../trainer/config.md` - If AUTO_APPLY: false (default) — stop here. Present the proposal to the agent operator in chat and wait for explicit approval before touching any live file. - If AUTO_APPLY: true — for each approved-category edit: 1. Copy the current file to `../../trainer/backups/<filename>.<timestamp>.bak` 2. Apply the edit exactly as drafted — no improvising beyond what was proposed 3. Log what changed to `../../trainer/logs/applied.md` - Regardless of AUTO_APPLY, SOUL.md and USER.md always require manual approval — never auto-edit identity or user-context files. ### Step 5 — Close out - Update `../../trainer/logs/.last-review` to the current timestamp - Summarize in plain language what was found and what changed (or is pending approval) ## Configuration The `../../trainer/config.md` file controls behavior:AUTO_APPLY: false
text Set to `true` to enable automatic application of safe edits (excludes SOUL.md and USER.md which always require manual approval).Technical Analysis
The skill treats incident logs,
HEARTBEAT.md, andMEMORY.mdas evidence for proposed changes to persistent agent configuration. WhenAUTO_APPLYis enabled, those proposals may be applied to live files without per-change operator approval. OnlySOUL.mdandUSER.mdare categorically excluded from automatic modification.No trust-boundary validation, instruction sanitization, source authentication, protected-section policy, or semantic saf ...[truncated 2451 chars]
- Remediation
View remediation
Remediation Suggestions
- Keep
AUTO_APPLYdisabled by default and remove the option to apply live-file edits without explicit approval. - Require operator approval for every individual change to every persistent file, not only
SOUL.mdandUSER.md. - Present an exact unified diff, source evidence, destination file, and affected section before requesting approval.
- Treat incident logs, memory files, and activity records as untrusted data. Explicitly prohibit following instructions embedded within those sources.
- Authenticate or integrity-protect incident records and record who or what created each entry.
- Use an allowlist of files and sections that the skill may propose modifying. Permanently deny changes to safety constraints, tool permissions, approval requirements, and trust policies.
- Add semantic validation that rejects proposals which expand permissions, disable safeguards, introduce external instructions, request secrets, or alter review controls.
- Separate proposal generation from application using an independent approval process that does not rely on the same model interpretation.
- Apply edits through constrained, schema-validated operations rather than unrestricted natural-language modifications.
- Preserve immutable audit records containing the original input, generated proposal, exact approved diff, approving identity, timestamp, and resulting file hash.
- Restrict filesystem permissions so the skill can write only to its proposal directory until a trusted approval component applies an accepted patch.
- Validate
../../trainer/config.mdagainst a strict schema and prevent untrusted processes or reviewed content from changingAUTO_APPLY.
- Keep
