Back to skill

Security audit

Project Context Generator For AI

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 · Agent Memory Poisoning

Warning
Location
scripts/generate.ts:481
Finding

Persistent Agent Context Poisoning Through Untrusted Project Metadata

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (8)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 22)May include surrounding context.

md
- Project already has fresh `.ai-context` (check `SKILL.md` date)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 105)May include surrounding context.

md
- Project already has fresh `.ai-context` (check `SKILL.md` date)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 177)May include surrounding context.

md
| `generate.ts` | Interactive generation from templates |

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · scripts/generate.ts (reported line 81)May include surrounding context.

ts
- 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

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

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.

Content

No source excerpt is available for this finding.