Back to skill

Security audit

media-use

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because it reports a serious Node.js startup-option injection risk, undeclared cloud services and analytics, and many unpinned CLI commands; the scan was partial, so the evidence is incomplete.

Consider holding off on installing until the Node.js startup-option issue is reviewed and the Google services, analytics, and data transfers are clearly disclosed. The unpinned CLI commands add a separate conditional download risk. Treat this as a suspicious review result, not a finding that the author acted maliciously; analysis covered only part of the artifact, so it cannot establish that unreported behavior is safe.

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
audio/scripts/lib/heygen.mjs
Finding

Project .env values can inject executable Node.js startup options

Content
View full analysis

Impact

Attacker-controlled JavaScript can execute with the audio process user's permissions, allowing access to that user's files and inherited credentials. Shell-free argument arrays do not prevent interpreter startup-option injection.

Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (178)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

Background-music generation matches the declared media purpose, and writing a WAV file is an expected supporting operation. However, the description specifies HeyGen or free local tools, while this code requires Google credentials and contacts Google's Lyria service. That introduces an undeclared external service and prompt transmission. The supplied code does not show unrelated data collection or malicious behavior.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
86% confidence
Finding

Voiceover generation is declared, but creating a cloned voice and managing stored voice identities are distinct capabilities not explicitly disclosed. In particular, the clone command creates a reusable voice identity rather than simply producing voiceover media.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
didates` and judge the fit yourself; reuse, ingest (`--from`) and adopt are in `references/resolve.md`.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| Resolve, reuse, adopt, ingest, flags | `references/resolve.md` |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
ry tool in the free column needs no account; local models are opt-in installs (`references/setup-providers.md`). Without `heygen`, `resolve` for music, images a

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| Install, sign-in, providers, RAM ladders | `references/setup-providers.md` |

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · audio/references/tts.md (reported line 74)May include surrounding context.

bash
# Only needed if you haven't run `npx hyperframes auth login`:
export HEYGEN_API_KEY=...   # or put it in a project .env

# Synthesize + capture word timestamps in one call (skips a Whisper pass)
node skills/media-use/audio/scripts/heygen-tts.mjs \

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · audio/scripts/gemini-pipeline.test.mjs (reported line 67)May include surrounding context.

js
{ mode: 0o755 },
      );
      writeFileSync(join(bin, "ffprobe"), "#!/bin/sh\necho 1.25\n", { mode: 0o755 });
      writeFileSync(join(dir, ".env"), "");
      writeFileSync(
        join(dir, "audio_request.json"),
        JSON.stringify({

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · audio/scripts/lib/heygen.test.mjs (reported line 141)May include surrounding context.

js
test("loadEnvFromDir skips a .env folder and loads the .env file above it", () => {
  const root = mkdtempSync(join(tmpdir(), "heygen-env-"));
  const project = join(root, "project");
  mkdirSync(join(project, ".env"), { recursive: true });
  writeFileSync(join(root, ".env"), "MEDIA_USE_ENV_DIR_TEST=from-parent\n");
  try {
    loadEnvFromDir(project);

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · audio/scripts/lib/heygen.test.mjs (reported line 142)May include surrounding context.

js
const root = mkdtempSync(join(tmpdir(), "heygen-env-"));
  const project = join(root, "project");
  mkdirSync(join(project, ".env"), { recursive: true });
  writeFileSync(join(root, ".env"), "MEDIA_USE_ENV_DIR_TEST=from-parent\n");
  try {
    loadEnvFromDir(project);
    assert.equal(process.env.MEDIA_USE_ENV_DIR_TEST, "from-parent");

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · audio/scripts/lib/heygen.test.mjs (reported line 156)May include surrounding context.

js
withCleanHeygenEnv(() => {
    const project = mkdtempSync(join(tmpdir(), "heygen-env-"));
    writeFileSync(
      join(project, ".env"),
      "HEYGEN_API_BASE=https://proxy.example.com\nheygen_allow_http=1\nmedia_use_env_base_test=loaded\n",
    );
    try {

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · audio/scripts/heygen-voice.test.mjs (reported line 141)May include surrounding context.

js
assert.equal(calls.length, 0);
});

test("delete calls DELETE /voices/<id> and exits 0", async () => {
  mockFetch({ "DELETE /voices/vc1": [[200, { data: {} }]] });
  const r = await run(["delete", "vc1"]);
  assert.deepEqual(r, { code: 0, out: "", err: "" });

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · audio/scripts/heygen-voice.test.mjs (reported line 142)May include surrounding context.

js
});

test("delete calls DELETE /voices/<id> and exits 0", async () => {
  mockFetch({ "DELETE /voices/vc1": [[200, { data: {} }]] });
  const r = await run(["delete", "vc1"]);
  assert.deepEqual(r, { code: 0, out: "", err: "" });
});

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · audio/scripts/heygen-voice.test.mjs (reported line 229)May include surrounding context.

js
test("a host-injected HEYGEN_ACCESS_TOKEN is sent as Bearer", async () => {
  process.env.HEYGEN_ACCESS_TOKEN = "at_host";
  mockFetch({ "DELETE /voices/vc1": [[200, { data: {} }]] });
  await run(["delete", "vc1"]);
  assert.equal(calls[0].opts.headers.Authorization, "Bearer at_host");
  assert.equal(calls[0].opts.headers["X-Api-Key"], undefined);

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · audio/scripts/heygen-voice.test.mjs (reported line 148)May include surrounding context.

js
});

test("delete exits 0 on a 204 with no body, and escapes the id in the path", async () => {
  mockFetch({ "DELETE /voices/a%2Fb": [[204]] });
  const r = await run(["delete", "a/b"]);
  assert.deepEqual(r, { code: 0, out: "", err: "" });
});

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · audio/scripts/heygen-voice.test.mjs (reported line 181)May include surrounding context.

js
test("delete prints HeyGen's 404 message verbatim and exits 1", async () => {
  mockFetch({
    "DELETE /voices/gone": [
      [404, { error: { code: "voice_not_found", message: "Voice not found: gone" } }],
    ],
  });

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · audio/scripts/lib/heygen.mjs (reported line 6)May include surrounding context.

js
// pipeline. The credential resolver matches the hyperframes CLI auth: first
// usable source wins — a host gateway ($HEYGEN_API_BASE with its own
// $HEYGEN_API_KEY) → a host-injected OAuth $HEYGEN_ACCESS_TOKEN (Bearer) →
// $HEYGEN_API_KEY / $HYPERFRAMES_API_KEY → a nearby .env → ~/.heygen/
// credentials (oauth → Bearer, else api_key → X-Api-Key; $HEYGEN_CONFIG_DIR
// overrides the dir). $HEYGEN_API_BASE moves every request to that host, as it
// does for the heygen CLI; plain HTTP needs $HEYGEN_ALLOW_HTTP=1, as there.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · audio/scripts/lib/heygen.mjs (reported line 67)May include surrounding context.

js
}
}

// A host app sets these in the environment it spawns, never in a project file: a project's .env naming its own base
// would send the person's shell HEYGEN_API_KEY to that host.
const HOST_ONLY = new Set(["HEYGEN_API_BASE", "HEYGEN_ALLOW_HTTP"]);

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · audio/scripts/lib/heygen.mjs (reported line 71)May include surrounding context.

js
// would send the person's shell HEYGEN_API_KEY to that host.
const HOST_ONLY = new Set(["HEYGEN_API_BASE", "HEYGEN_ALLOW_HTTP"]);

// Walk up ≤5 dirs from startDir; load the first .env (shell env always wins).
export function loadEnvFromDir(startDir) {
  let dir = resolve(startDir);
  for (let i = 0; i < 5; i++) {

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · audio/scripts/lib/heygen.mjs (reported line 75)May include surrounding context.

js
export function loadEnvFromDir(startDir) {
  let dir = resolve(startDir);
  for (let i = 0; i < 5; i++) {
    const text = envFileText(join(dir, ".env"));
    if (text != null) {
      for (const raw of text.split("\n")) {
        let line = raw.trim();

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · audio/scripts/lib/heygen.test.mjs (reported line 138)May include surrounding context.

js
});
});

test("loadEnvFromDir skips a .env folder and loads the .env file above it", () => {
  const root = mkdtempSync(join(tmpdir(), "heygen-env-"));
  const project = join(root, "project");
  mkdirSync(join(project, ".env"), { recursive: true });

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · audio/scripts/lib/heygen.test.mjs (reported line 138)May include surrounding context.

js
});
});

test("loadEnvFromDir skips a .env folder and loads the .env file above it", () => {
  const root = mkdtempSync(join(tmpdir(), "heygen-env-"));
  const project = join(root, "project");
  mkdirSync(join(project, ".env"), { recursive: true });

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · audio/scripts/lib/heygen.test.mjs (reported line 152)May include surrounding context.

js
}
});

test("a project's .env cannot name the HeyGen base, so a shell key never leaves for its host", () => {
  withCleanHeygenEnv(() => {
    const project = mkdtempSync(join(tmpdir(), "heygen-env-"));
    writeFileSync(

Account-linked usage analytics are unrelated to obtaining, generating, or editing media.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

Telemetry reads the HeyGen credentials file for email and username, sends those traits to PostHog, and links the existing anonymous identity to the account by default. Coarse event fields, an informational notice, and opt-outs reduce exposure, but do not obtain affirmative permission for this unnecessary identity linkage; the shown code does not transmit API keys or OAuth tokens.

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_write, network, 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.