T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:40- Finding
Mandatory Access to Cross-Session Agent Memory Violates Least Privilege
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a legitimate architecture-review aid, but it asks for broad project memory access and opens a generated report that runs third-party browser scripts.
Install only if you are comfortable with the agent reading cross-session project memory and producing a browser-opened HTML report that fetches Tailwind and Mermaid from public CDNs. Prefer reviewing or modifying the skill to remove `.claude/MEMORY.md` access, use local or static report assets, set Mermaid to strict mode, sanitize repository-derived content, and ask before opening files or changing `.claude/CONTEXT.md` or `.specs/`.
SKILL.md:40Mandatory Access to Cross-Session Agent Memory Violates Least Privilege
references/HTML-REPORT.md:3Generated Reports Execute Mutable JavaScript from External CDNs
references/HTML-REPORT.md:61Untrusted Repository Data Is Rendered with Mermaid Loose Security
flowchart LR
A[OrderHandler] --> B[OrderValidator]
B --> C[OrderRepo]
C -.leak.-> D[PricingClient]
classDef leak stroke:#dc2626,stroke-width:2px;
class C,D leak
The skill directs the agent to write an HTML file to disk and open it with a platform launcher, but gives no prior warning or consent checkpoint. Silent filesystem writes plus automatic opening of a browser/application can surprise users, trigger unintended execution contexts, and expose them to locally rendered active content.
The skill explicitly requires loading Tailwind and Mermaid from external CDNs, which introduces unnecessary outbound network access during a local architecture review. This expands the trust boundary to third-party infrastructure, can leak metadata, and creates a supply-chain/script-injection risk if the CDN content changes or is compromised.
The instructions explicitly require asking the user in Portuguese after the report is written. This forces a specific language for user-facing output without opt-in, even though the skill is otherwise described for both English and Portuguese usage.
The skill instructs repository modifications to .claude/CONTEXT.md and creation of .specs/ files during the conversation without an upfront warning that the analysis may change tracked project files. In a code-assistance context, undisclosed writes to repo state can cause integrity, review, and workflow issues even if the content is well-intentioned.
The skill is described as an architecture-review aid, but later instructs the agent to modify project context files and create new SPEC documents. That scope expansion turns a read/analyze workflow into a write-capable workflow, increasing the chance of unintended repository changes and making the skill materially more dangerous than its headline purpose suggests.
The report format explicitly requires loading Tailwind and Mermaid from external CDNs even though the skill's purpose is to generate a local architecture review. That creates unnecessary outbound network access, leaks metadata about local usage, and introduces supply-chain risk if the CDN content changes or is compromised.
Mermaid is initialized with securityLevel: "loose", which weakens Mermaid's built-in HTML/script safety restrictions. In a reporting skill that may render repository-derived content into diagrams, this raises the risk of HTML injection or script-adjacent content being interpreted in the generated report.
The tone section requires 'Plain English' and further enforces exact wording and banned substitutes, effectively forcing a specific language/style without user opt-in. Under the policy, language constraints should either offer user choice or be clearly justified as region- or compliance-specific.
The document instructs the agent to load third-party CDN resources but provides no user-facing disclosure that generating the report will trigger network access. In this skill context, users would reasonably expect a local architecture review artifact, so silent network use can violate privacy and trust expectations.
This markdown file instructs users to 'Use these terms exactly' and forbids substitutes, which imposes a language policy on all suggestions generated by the skill. Under the policy-violation category, forcing a specific language or vocabulary without user opt-in is in scope.