Back to skill

Security audit

seo-cluster

Security checks for vulnerabilities and agentic risk

Overview

This SEO skill appears legitimate, but it needs review because it can rewrite existing content and its generated browser map has a real injection risk.

Install only if you are comfortable reviewing file changes. Run it in a controlled content workspace, inspect diffs before publishing, and avoid opening or hosting generated cluster maps from untrusted imported plans until the template validates data and avoids unsafe script or innerHTML insertion.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
templates/cluster-map.html:320
Finding

Stored HTML and JavaScript Injection in Generated Cluster Maps

Content
View full analysis
` element: ```javascript // === CLUSTER DATA (replaced by skill at generation time) === const CLUSTER_DATA = { pillar: { title: "Sample Pillar Page", keyword: "sample keyword", volume: 5000, template: "ultimate-guide", wordCount: 3500, url: "/pillar" }, clusters: [ { name: "Sample Cluster", color: "#4E79A7", posts: [ { title: "Sample Post 1", keyword: "sample post 1", volume: 1200, template: "how-to", wordCount: 1500, url: "/post-1", status: "planned" }, { title: "Sample Post 2", keyword: "sample post 2", volume: 800, template: "listicle", wordCount: 1400, url: "/post-2", status: "planned" } ] } ], links: [ { from: "pillar", to: "cluster-0-post-0", type: "mandatory" }, { from: "cluster-0-post-0", to: "pillar", type: "mandatory" } ], meta: { totalPosts: 3, totalClusters: 1, totalLinks: 2, estimatedWords: 6400 } }; // = ...[truncated 5705 chars]
Remediation
View remediation
``` - Read the element through `textContent` and parse it with `JSON.parse()`. - When generating the HTML, use a script-safe serializer that escapes at least `<`, `>`, `&`, U+2028, and U+2029. For example, encode `<` as `\u003c` before insertion. 2. **Eliminate SVG string concatenation and `innerHTML`.** - Create SVG elements with `document.createElementNS("http://www.w3.org/2000/svg", ...)`. - Populate properties using `setAttribute()` only after validation. - Set labels with `textContent` rather than constructing markup strings. 3. **Validate the complete cluster-plan schema before rendering.** - Reject unknown properties and unexpected data types. - Restrict `link.type` to an allowlist such as `mandatory`, `recommended`, and `optional`. - Require `link.from` and `link.to` to match identifiers generated from the validated plan. - Restrict status values to `planned` and `written`. - Validate colors against a strict format such as `^#[0-9A-Fa-f]{6}$`. - Apply reasonable length limits to titles, keywords, URLs, cluster names, and anchors. 4. **Treat imported and existing files as untrusted input.** - Validate strategy imports and `cluster-plan.json` even when they are read from the current working directory. - Do not assume that locally stored plans were generated by a trusted process. 5. **Add defense-in-depth controls.** - Add a restrictive Content Security Policy that disallows inline scripts and event handlers. - Keep generated maps self-contained and avoid granting them access to privileged browser APIs. - If maps are hosted, serve them from an isolated origin rather than a sensitive application origin. 6. **Add security regression tests.** Test all rendered fie ...[truncated 376 chars]
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (13)

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/execution-workflow.md (reported line 44)May include surrounding context.

md
{ "url": "/pillar-url", "anchor": "main topic guide", "type": "mandatory" },
      { "url": "/sibling-post", "anchor": "related subtopic", "type": "recommended" }
    ],
    "incoming_link_placeholder": "<!-- cluster-link:cluster-0-post-1 -->",
    "differentiation_note": "This post should focus on X, while sibling post covers Y"
  }
}

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/execution-workflow.md (reported line 84)May include surrounding context.

md
{ "url": "/pillar-url", "anchor": "main topic guide", "type": "mandatory" },
      { "url": "/sibling-post", "anchor": "related subtopic", "type": "recommended" }
    ],
    "incoming_link_placeholder": "<!-- cluster-link:cluster-0-post-1 -->",
    "differentiation_note": "This post should focus on X, while sibling post covers Y"
  }
}

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/execution-workflow.md (reported line 76)May include surrounding context.

md
2. Identify all posts that should link TO the newly written post
3. For each of those posts (that is already written):
   a. Open the post file
   b. Search for the placeholder comment: `<!-- cluster-link:POST_ID -->`
   c. Replace the placeholder with an actual contextual link
   d. If no placeholder found, append a contextual link in the most relevant section
4. Log all backward links added

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

}

text
3. Replace the `CLUSTER_DATA` placeholder in the template with the actual JSON
4. Write the completed HTML file to the output directory
5. Inform user: "Open `cluster-map.html` in a browser to explore the interactive cluster map."

---

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

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

Check for claude-blog

text
Test: Does ~/.claude/skills/blog/SKILL.md exist?

If claude-blog IS installed:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The execution workflow not only creates briefs but may also scan and modify previously written posts by injecting URLs into placeholders, without an explicit warning that existing content can be altered. In a content repository, that behavior can unintentionally change user-managed files and create integrity or change-control issues.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill's Security section asserts that all fetched URLs go through seogeo render with SSRF protection, but the actual workflow relies on WebSearch and optional DataForSEO calls for SERP retrieval. This mismatch can mislead reviewers and users about the true trust boundary and protections in place, causing unsafe assumptions about network access and URL handling.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documented workflow materially expands the skill from analysis/planning into execution that generates and modifies website content. That broader capability increases risk because a user invoking a clustering skill may unexpectedly trigger file writes and content publication actions, creating opportunity for unintended changes, abuse of connected tooling, or unauthorized content operations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The workflow authorizes opening and altering previously written posts to inject links, which is a persistent modification capability beyond simple clustering. If the plan, link matrix, or target matching is wrong or manipulated, the skill can silently rewrite existing content, damage site integrity, or introduce unwanted links across many files.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/serp-overlap-methodology.md (reported line 59)May include surrounding context.

md
### Skip Rules

- If keywords A and B are both long-tail variants of the same head term AND share
  the same intent, assume overlap 4-6 (same cluster) without checking SERP
- If keywords are in different intent categories, assume overlap 0-2 unless they
  share a head term
- Verify assumptions with spot-check SERP comparisons (sample 20% of skipped pairs)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The document instructs users to use DataForSEO with location_code: 2840 (US) and language_code: "en", which imposes a specific locale and language. Under the policy, forcing a language or locale without user opt-in is a natural-language policy violation unless the constraint is explicitly justified as region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill is designed to write multiple files into the current working directory, but it does not require an explicit warning or confirmation before modifying the local filesystem. In an agent setting, silent file creation can surprise users, clutter repositories, or overwrite expected outputs if filenames collide.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The document declares lang="en", which hard-codes English as the page language. Under the policy for natural-language violations, a forced language/locale without user opt-in or clear justification should be flagged.

Content

No source excerpt is available for this finding.