Back to skill

Security audit

twitch-clip

Security checks for vulnerabilities and agentic risk

Overview

The skill creates Twitch clips as disclosed, with confirmation handled by the invoking agent.

Use a Twitch token limited to the documented clips:edit scope and keep it private. Ensure your agent confirms each request before invoking the script, because invocation immediately attempts public clip creation. All bundled files were reviewed; live API behavior was not tested.

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
scripts/create_clip.sh
Finding

Public clip creation does not enforce the documented confirmation gate

Content
View full analysis

Impact

A clip can be publicly created before the required approval, potentially publishing a broadcast moment the owner would have declined to clip.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

To find your broadcaster ID:

bash
curl -s -H "Authorization: Bearer $TWITCH_ACCESS_TOKEN" \
  -H "Client-Id: $TWITCH_CLIENT_ID" \
  https://api.twitch.tv/helix/users | python3 -c "import json,sys; print(json.load(sys.stdin)['data'][0]['id'])"

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/create_clip.sh (reported line 96)May include surrounding context.

sh
# slot is still spent, which is the safe direction to err.
( umask 077; date +%s > "${LOCKFILE}.tmp.$$" ) && mv -f "${LOCKFILE}.tmp.$$" "$LOCKFILE"

RESPONSE=$(curl -s -X POST \
  "https://api.twitch.tv/helix/clips?broadcaster_id=%24%7BBROADCASTER_ID%7D&has_delay=false&duration=%24%7BDURATION}" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Client-Id: ${CLIENT_ID}")

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: shell.

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.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

bash
curl -s -H "Authorization: Bearer $TWITCH_ACCESS_TOKEN" \
  -H "Client-Id: $TWITCH_CLIENT_ID" \
  https://api.twitch.tv/helix/users | python3 -c "import json,sys; print(json.load(sys.stdin)['data'][0]['id'])"

Usage

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/create_clip.sh (reported line 97)May include surrounding context.

sh
( umask 077; date +%s > "${LOCKFILE}.tmp.$$" ) && mv -f "${LOCKFILE}.tmp.$$" "$LOCKFILE"

RESPONSE=$(curl -s -X POST \
  "https://api.twitch.tv/helix/clips?broadcaster_id=%24%7BBROADCASTER_ID%7D&has_delay=false&duration=%24%7BDURATION}" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Client-Id: ${CLIENT_ID}")