Back to skill

Security audit

mar-content-draft-generator

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a content-writing workflow, but it routes X/Twitter URLs through a third-party API and reuses fetched web content in generated prompts without clear safety boundaries.

Install only if you are comfortable with the skill fetching supplied URLs, saving generated markdown files locally, and routing X/Twitter links through FxTwitter. Avoid sensitive or private reference material, review generated meta-prompts before using them, and prefer pasted content or direct non-X/Twitter URLs when privacy matters.

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

Warning
Location
SKILL.md:65
Finding

Untrusted Remote Content Enters an Executable Prompt Pipeline Without Isolation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:65-70, SKILL.md:76-102, and references/content-deconstructor.md:117-119
Vulnerability Type: Indirect prompt injection through untrusted fetched content
Risk Level: Medium

Vulnerable Code Snippets:

SKILL.md:65-70

markdown
### Step 2: Content Deconstruction

1. Fetch content from all reference URLs (use web_fetch tool)
2. For Twitter/X URLs, transform to FxTwitter API: `https://api.fxtwitter.com/username/status/123456`
3. Analyze each piece following the `references/content-deconstructor.md` guide
4. Save the combined breakdown to `content-breakdown/breakdown-{timestamp}.md`
5. Report: "✓ Content breakdown saved"

SKILL.md:76-102

markdown
### Step 4: Content Context Generation

1. Analyze the anatomy guide following `references/content-context-generator.md`
2. Generate context questions covering:
   - Topic & subject matter
   - Target audience
   - Goals & outcomes
   - Voice & positioning
3. Save to `content-context/context-{timestamp}.md`
4. Report: "✓ Context requirements saved"

### Step 5: Meta Prompt Generation

1. Following `references/meta-prompt-generator.md`, create a two-phase prompt:

**Phase 1 - Context Gathering:**
- Interview user for ideas they want to write about
- Use context questions from Step 4
- Ask up to 10 questions if needed

**Phase 2 - Content Writing:**
- Write 3 variations of each content type
- Follow structural patterns from the anatomy guide

2. Save to `content-meta-prompt/meta-prompt-{timestamp}.md`
3. Report: "✓ Meta prompt saved"

references/content-deconstructor.md:117-119

markdown
2. **Be Actionable:** Every insight should help someone recreate the effect
3. **Be Thorough:** Cover all five analysis areas
4. **Quote Examples:** When useful, quote specific phrases that demonstrate techniques

Technical Analysis

The skill fetches arbitrary ...[truncated 3037 chars]

Remediation
View remediation

Remediation Suggestions

  1. Add an explicit trust-boundary rule stating that all fetched content is untrusted data and that instructions, requests, tool commands, role declarations, or policy text found within it must never be followed.
  2. Place fetched text inside clearly marked data delimiters and keep it separate from operational prompts.
  3. Detect and remove or neutralize instruction-like passages before transferring remote text into breakdowns, anatomy guides, context documents, or meta-prompts.
  4. Do not copy remote text verbatim into executable prompts. When examples are necessary, quote only narrowly selected content and encode or label it as non-executable source material.
  5. Require a review checkpoint before executing any generated meta-prompt, showing the prompt to the user or applying a security validation pass that detects unexpected tool-use instructions and unrelated objectives.
  6. Ensure generated prompts have an explicit scope, an allowlist of permitted operations, and a prohibition against tool calls derived from reference content.
  7. Define URL validation precisely: allow only HTTP(S), reject embedded credentials and malformed hosts, resolve hostnames before access, and block loopback, private, link-local, multicast, reserved, and cloud metadata addresses.
  8. Revalidate every redirect target and apply limits for redirects, response size, content type, and fetch duration.
  9. Record source provenance through every generated artifact so remote content can be distinguished from trusted workflow instructions.
  10. Add adversarial tests using pages that contain prompt injections, fake system messages, tool-call requests, and encoded instructions to verify that none affect downstream execution.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (4)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly instructs the agent to write multiple generated artifacts to local storage across several directories, but it does not tell the user that their provided URLs, derived analysis, and generated drafts will persist on disk. This creates a privacy and data-retention risk because user inputs and possibly sensitive strategy/content information may be stored without informed consent or clear lifecycle controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill fetches user-supplied URLs and, for Twitter/X content, rewrites requests to a third-party service (FxTwitter) without clearly warning the user that their requested content will be sent to another domain. This can expose user interests, tracking metadata, and referenced content to an external party, making the workflow materially riskier than ordinary local processing.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

Hardcoding transformation of Twitter/X URLs to api.fxtwitter.com causes user-requested content retrieval to be routed through an unaffiliated third-party endpoint. Even if the referenced posts are public, this external transmission can leak usage patterns and request metadata and introduces supply-chain and content-integrity risk because the skill trusts a non-original source.

Content

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

md
### Step 2: Content Deconstruction

1. Fetch content from all reference URLs (use web_fetch tool)
2. For Twitter/X URLs, transform to FxTwitter API: `https://api.fxtwitter.com/username/status/123456`
3. Analyze each piece following the `references/content-deconstructor.md` guide
4. Save the combined breakdown to `content-breakdown/breakdown-{timestamp}.md`
5. Report: "✓ Content breakdown saved"

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

The repeated instruction documenting conversion of X URLs to api.fxtwitter.com reinforces that the skill is designed to transmit requests to a third-party service as part of normal operation. This increases privacy exposure and dependency on an external endpoint whose logging, retention, and response integrity are outside the user's control.

Content

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

md
**Transform:**
- Input: `https://x.com/username/status/123456`
- API URL: `https://api.fxtwitter.com/username/status/123456`

## Error Handling

Static analysis

No suspicious patterns detected.