Back to skill

Security audit

Podcast Video Publisher

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly matches its YouTube podcast publishing purpose, but it needs review because it stores broad YouTube credentials and can automatically remove or change public playlist/video state without confirmation.

Install only for a dedicated YouTube channel or playlist you are comfortable letting these scripts modify. Before running the publish pipeline, edit the playlist ID, keep .youtube.json out of version control, review upload-state.json, and avoid the playlist/retire phases unless you have backed up current playlist contents and confirmed which videos may be removed or unlisted.

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
scripts/podcast-upload-batch.js:123
Finding

Overbroad Playlist Cleanup Can Remove Legitimate YouTube Playlist Entries

Content
View full analysis
Remediation
View remediation
ep.oldVideoId).filter(Boolean) ); for (const it of r.body.items || []) { const videoId = it.snippet.resourceId.videoId; if (!removableVideoIds.has(videoId)) continue; const d = await api( "DELETE", `https://www.googleapis.com/youtube/v3/playlistItems?id=${encodeURIComponent(it.id)}`, access ); if (d.status !== 204) { console.error(`[playlist] remove failed: ${errDetail(d)}`); return false; } } ``` 2. **Separate broad cleanup from normal publication.** If stale-item cleanup is genuinely required, place it behind an explicit option such as `--remove-stale` rather than running it in the default pipeline. 3. **Require confirmation for destructive operations.** Print the playlist item ID, video ID, and title of every proposed removal. Require interactive confirmation unless a clearly named noninteractive approval flag is supplied. 4. **Validate state completeness.** Before any deletion, verify that all expected metadata episodes have corresponding upload records and that those video IDs exist on YouTube. Abort cleanup if state is incomplete or inconsistent. 5. **Preserve an audit and recovery record.** Save the removed playlist item ID, video ID, title, playlist ID, timestamp, and reason before issuing each deletion request. This assists reconstruction after an accidental removal. 6. **Add ownership and intent checks.** Confirm that the configured playlist is the expected playlist and that each removal candidate corresponds to a known replacement relationship. 7. **Improve naming and state semantics.** Replace the ambiguous `removedOldItem` Boolean with per-video records, such as `removedPlaylistItems[oldVideoId]`, ...[truncated 83 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The finding highlights that the skill may perform narrower but still privileged YouTube operations such as direct thumbnail replacement using local OAuth credentials despite empty declared permissions. Even if the broader workflow claims are overstated, undisclosed authenticated modification of external assets is security-relevant because it can alter public-facing content without sufficiently explicit authorization boundaries.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The finding highlights that the skill may perform narrower but still privileged YouTube operations such as direct thumbnail replacement using local OAuth credentials despite empty declared permissions. Even if the broader workflow claims are overstated, undisclosed authenticated modification of external assets is security-relevant because it can alter public-facing content without sufficiently explicit authorization boundaries.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The finding highlights that the skill may perform narrower but still privileged YouTube operations such as direct thumbnail replacement using local OAuth credentials despite empty declared permissions. Even if the broader workflow claims are overstated, undisclosed authenticated modification of external assets is security-relevant because it can alter public-facing content without sufficiently explicit authorization boundaries.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The finding highlights that the skill may perform narrower but still privileged YouTube operations such as direct thumbnail replacement using local OAuth credentials despite empty declared permissions. Even if the broader workflow claims are overstated, undisclosed authenticated modification of external assets is security-relevant because it can alter public-facing content without sufficiently explicit authorization boundaries.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. **Publish** — `scripts/podcast-upload-batch.js` runs resumable phases:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. **Publish** — `scripts/podcast-upload-batch.js` runs resumable phases:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. **Publish** — `scripts/podcast-upload-batch.js` runs resumable phases:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. **Publish** — `scripts/podcast-upload-batch.js` runs resumable phases:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
3. **Self-heal** — `scripts/podcast-finisher.js` is a long-running watcher

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
3. **Self-heal** — `scripts/podcast-finisher.js` is a long-running watcher

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
3. **Self-heal** — `scripts/podcast-finisher.js` is a long-running watcher

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill documents and requires sensitive capabilities including shell execution, file writes, environment/credential handling, and OAuth token storage, but declares no explicit tool scope or permissions boundaries. That mismatch can cause an agent or reviewer to underappreciate the skill's access needs, increasing the chance of over-broad execution with access to local files and secrets.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill describes destructive actions such as removing stale playlist items, reordering content, and unlisting replaced videos, but does not present a prominent warning about irreversible or user-visible consequences. In a publishing skill, these operations can unintentionally disrupt channel presentation, break discovery workflows, or retire the wrong assets if metadata is wrong or the state file is corrupted.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/podcast-slideshow.py (reported line 46)May include surrounding context.

python
def run(cmd):
    p = subprocess.run(cmd, capture_output=True, text=True)
    if p.returncode != 0:
        raise RuntimeError(f"cmd failed ({p.returncode}): {' '.join(cmd)}\n{p.stderr[-800:]}")
    return p.stdout

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file is documented as a one-shot OAuth grant for a YouTube uploader, but the comment says the resulting token is used by scripts/post-track-announce.js, which suggests a different music/announcement workflow rather than the podcast video publisher described by the skill. This is an active documentation-level contradiction because it states a concrete downstream use that does not match the apparent purpose of this script or the skill context.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
83% confidence
Finding

The script deliberately requests broad YouTube OAuth scope (full youtube read/write) and then persists a long-lived refresh token to disk, creating durable delegated access to the user's YouTube account. If the saved token file is exposed through local compromise, backup leakage, accidental inclusion, or overly broad repository sharing, an attacker could upload, modify playlists, and otherwise act on the channel until the grant is revoked.

Content

Scanner excerpt · scripts/youtube-grant.js (reported line 45)May include surrounding context.

js
// `youtube` (full read/write) instead of just `youtube.upload + readonly`
// because playlistItems.insert (used by the adapter to auto-add each
// upload to a playlist) requires playlist write permission, which only
// the full scope grants. .readonly + .upload are insufficient — Google
// returns "Request had insufficient authentication scopes" (403) on
// playlist mutations under those.