T02 · Agent Memory Poisoning
- Location
scripts/generate.ts:481- Finding
Persistent Agent Context Poisoning Through Untrusted Project Metadata
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is not overtly malicious, but it creates persistent agent-readable project context with weak safeguards against overwriting files or carrying untrusted repository text into future agent instructions.
Review before installing or running on a real repository. Use it only when you want an agent to inspect project files and create or regenerate .ai-context, back up or diff any existing .ai-context directory first, and manually review generated Markdown before letting future agents rely on it, especially for untrusted or externally contributed repositories.
scripts/generate.ts:481Persistent Agent Context Poisoning Through Untrusted Project Metadata
Referenced artifact was not completely inspected
- Project already has fresh `.ai-context` (check `SKILL.md` date)
Referenced artifact was not completely inspected
- Project already has fresh `.ai-context` (check `SKILL.md` date)
Referenced artifact was not completely inspected
| `generate.ts` | Interactive generation from templates |
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
- Need component relationships → \`references/ARCHITECTURE.md\`
**Do NOT activate when:**
- Simple code edits with clear context
- User requests are purely mechanical (rename, format, etc.)
- You already have sufficient context from recent conversation
Without declared permissions the skill's intent is opaque and cannot be validated.
The skill instructs the agent to generate a new .ai-context/ tree with multiple files, but it does not clearly warn that existing files may be created, modified, or overwritten. In an automated agent context, this can lead to unintentional project changes, loss of documentation, or clobbering of user-maintained files without informed consent.
The generator writes multiple files into a user-supplied project path and uses writeFileSync directly without checking whether target files already exist or asking for confirmation before overwriting. In the context of a project setup skill, this can destroy or silently replace existing documentation and skill files, especially if run against the wrong directory or an already-initialized repository.
The README explicitly instructs an agent to read project files and create a new .ai-context/ directory, but it does not clearly warn users that repository contents will be inspected and new files will be written. In an agent-skill setting, unclear disclosure can lead to unintended access to sensitive files or unexpected repository modifications, especially when users invoke the skill with a broad natural-language prompt.