Back to skill

Security audit

varg-ai

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious with medium confidence because it reports an unscoped updater, persistent API-key storage, and limited disclosure about sending content to external services; the scan was also incomplete.

Consider the suspicious verdict before installing. Review the updater and its package/version, avoid saving API keys automatically, and confirm you are comfortable sending prompts or media to external services. The scan covered 84.6% of components, with two files partially inspected, so its evidence is incomplete.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (72)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Maintenance functionality is not inherently malicious, but this skill expands a media-generation request into execution of a separate skill-management CLI. The unscoped update command can change installed instructions beyond the requested task; this overlaps the updater findings rather than demonstrating a separate malicious payload.

Content

No source excerpt is available for this finding.

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 · SKILL.md (reported line 58)May include surrounding context.

bash
[ -n "${VARG_API_KEY:-}" ] || VARG_API_KEY=$(grep -o '"api_key"[^,}]*' ~/.varg/credentials 2>/dev/null | head -1 | cut -d'"' -f4)
[ -n "${VARG_API_KEY:-}" ] || VARG_API_KEY=$(grep -hE '^(export )?VARG_API_KEY=' .env .env.local 2>/dev/null | head -1 | cut -d= -f2- | tr -d "\"' \r")
export VARG_API_KEY
if [ -n "$VARG_API_KEY" ]; then
  curl -s -o /dev/null -w "key found -- HTTP %{http_code} (200 = valid, 401 = invalid)\n" -H "Authorization: Bearer $VARG_API_KEY" https://api.varg.ai/v2/billing/balance

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 · SKILL.md (reported line 58)May include surrounding context.

bash
[ -n "${VARG_API_KEY:-}" ] || VARG_API_KEY=$(grep -o '"api_key"[^,}]*' ~/.varg/credentials 2>/dev/null | head -1 | cut -d'"' -f4)
[ -n "${VARG_API_KEY:-}" ] || VARG_API_KEY=$(grep -hE '^(export )?VARG_API_KEY=' .env .env.local 2>/dev/null | head -1 | cut -d= -f2- | tr -d "\"' \r")
export VARG_API_KEY
if [ -n "$VARG_API_KEY" ]; then
  curl -s -o /dev/null -w "key found -- HTTP %{http_code} (200 = valid, 401 = invalid)\n" -H "Authorization: Bearer $VARG_API_KEY" https://api.varg.ai/v2/billing/balance

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

This command automatically copies the API key into an existing project file without checking its access permissions or obtaining consent to persist it there. Gitignore reduces accidental commits but does not protect against other local readers, backups, synchronization, or tools that ingest project files.

Content

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

For local render (bun auto-loads .env), also add it to the project .env -- only if that file exists, is gitignored, and has no key yet:

bash
[ -f .env ] && git check-ignore -q .env 2>/dev/null && ! grep -q '^VARG_API_KEY=' .env && echo "VARG_API_KEY=$VARG_API_KEY" >> .env

Check balance and add credits

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

This is a duplicate match for the automatic .env credential write. An ignored file can still be readable by other users or copied by unrelated tooling, so gitignore does not make replication of the secret safe.

Content

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

For local render (bun auto-loads .env), also add it to the project .env -- only if that file exists, is gitignored, and has no key yet:

bash
[ -f .env ] && git check-ignore -q .env 2>/dev/null && ! grep -q '^VARG_API_KEY=' .env && echo "VARG_API_KEY=$VARG_API_KEY" >> .env

Check balance and add credits

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

This finding identifies the same secret-replication operation as the other matches at line 103. The command expands credential exposure from its original storage location into a project file whose filesystem protections are not validated.

Content

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

For local render (bun auto-loads .env), also add it to the project .env -- only if that file exists, is gitignored, and has no key yet:

bash
[ -f .env ] && git check-ignore -q .env 2>/dev/null && ! grep -q '^VARG_API_KEY=' .env && echo "VARG_API_KEY=$VARG_API_KEY" >> .env

Check balance and add credits

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

This duplicates the .env persistence issue rather than representing a separate vulnerability. Automatically writing the credential creates another durable secret copy, and the gitignore check does not establish confidentiality.

Content

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

For local render (bun auto-loads .env), also add it to the project .env -- only if that file exists, is gitignored, and has no key yet:

bash
[ -f .env ] && git check-ignore -q .env 2>/dev/null && ! grep -q '^VARG_API_KEY=' .env && echo "VARG_API_KEY=$VARG_API_KEY" >> .env

Check balance and add credits

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 299)May include surrounding context.

md
| Full examples | [templates.md](references/templates.md) | Need complete copy-paste-ready templates |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% 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 · references/gateway-api.md (reported line 398)May include surrounding context.

md
| `job_id` field | `id` field |
| `output.url` (single) | `output.outputs[]` (array, each with `file_id`) |
| `GET /jobs/{id}/stream` (SSE) | Removed — poll or `options.webhook_url` |
| `DELETE /jobs/{id}` | `POST /jobs/{id}/cancel` |
| `GET /balance` | `GET /billing/balance` |
| `GET /usage` | `GET /billing/usage` |
| `POST /ffmpeg/trim` etc. | Single `POST /ffmpeg`, op selected by `model` |

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 · references/local-render.md (reported line 144)May include surrounding context.

md
bun scripts/setup.ts

# Or manually:
# 1. Ensure VARG_API_KEY is in .env
echo "VARG_API_KEY=varg_xxx" >> .env

# 2. Quick smoke test

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 · references/local-render.md (reported line 145)May include surrounding context.

md
# Or manually:
# 1. Ensure VARG_API_KEY is in .env
echo "VARG_API_KEY=varg_xxx" >> .env

# 2. Quick smoke test
bunx vargai@alpha hello

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 · scripts/setup.sh (reported line 119)May include surrounding context.

sh
echo ""
  echo "  Then set it:"
  echo "    $(cyan 'export VARG_API_KEY=varg_xxx')"
  echo "    $(dim 'echo VARG_API_KEY=varg_xxx >> .env')"
  echo ""
  echo "  Or save globally:"
  echo "    $(dim "mkdir -p ~/.varg && echo '{\"api_key\":\"varg_xxx\"}' > ~/.varg/credentials && chmod 600 ~/.varg/credentials")"

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/setup.sh (reported line 169)May include surrounding context.

sh
dim "    bunx vargai@alpha render video.tsx --verbose   (full render)"
  echo ""
  echo "  Cloud render (via API):"
  echo "  $(dim '  curl -X POST https://api.varg.ai/v2/render \')"
  echo "  $(dim '    -H "Authorization: Bearer $VARG_API_KEY" \')"
  echo "  $(dim '    -H "Content-Type: application/json" \')"
  echo "  $(dim '    -d '\''{"code": "..."}'\''')"

Code capability 'env' detected in scripts/setup.ts but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

Code capability 'network' detected in scripts/setup.ts but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'network' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

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 · scripts/setup.ts (reported line 160)May include surrounding context.

ts
const hasPackageJson = await Bun.file("package.json").exists()
const hasTsconfig = await Bun.file("tsconfig.json").exists()
const hasEnv = await Bun.file(".env").exists()

if (hasPackageJson) console.log(green("  ✓ package.json exists"))
else console.log(yellow(`  ○ No package.json`))

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 · scripts/setup.ts (reported line 168)May include surrounding context.

ts
if (hasTsconfig) console.log(green("  ✓ tsconfig.json exists"))
else console.log(dim("  ○ No tsconfig.json (optional for simple templates)"))

if (hasEnv) console.log(green("  ✓ .env exists"))
else console.log(yellow("  ○ No .env file -- create one with your API keys"))

// 5. Create example file if none exists

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 · scripts/setup.ts (reported line 169)May include surrounding context.

ts
else console.log(dim("  ○ No tsconfig.json (optional for simple templates)"))

if (hasEnv) console.log(green("  ✓ .env exists"))
else console.log(yellow("  ○ No .env file -- create one with your API keys"))

// 5. Create example file if none exists
const examplePath = "hello.tsx"

The media-generation skill requires running an unscoped skill updater before performing the user's task.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

The updater is conditional on a newer remote version, not unconditional, but the skill still directs the agent to run it without user approval and then consume the changed instructions. A compromised update source or package could turn this maintenance step into local code execution or persistent instruction replacement.

Content

No source excerpt is available for this finding.

MCP server referenced without pinned version: 'npx -y skills'.

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding

Although this is an npm CLI rather than an MCP server, npx -y skills update executes an unpinned package with the agent's local privileges. A compromised package release or dependency could execute arbitrary code and access credentials or workspace files.

Content

No source excerpt is available for this finding.

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 86)May include surrounding context.

md
> 2. Generate an API key and copy it.
> 3. Run this in your terminal and paste the key when prompted -- it stays out of this chat and your shell history:
>    ```bash
>    mkdir -p ~/.varg && printf 'varg API key: ' && read -rs K && echo && (umask 077 && printf '{"api_key":"%s"}\n' "$K" > ~/.varg/credentials) && unset K
>    ```
> Tell me when it's done.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% 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 · SKILL.md (reported line 90)May include surrounding context.

md
>    ```
> Tell me when it's done.

When they reply, re-run the step 1 block. Do NOT ask the user to paste the raw key into the chat, and don't ask them to `export` it -- an `export` in their terminal doesn't reach your already-running shell, but the credentials file does.

### 1b. Save the key for next time

Session Persistence

Medium
Category
Rogue Agent
Confidence
92% confidence
Finding

The skill silently converts an environment- or project-scoped secret into a durable home-directory credential available to future sessions. The restrictive umask helps file confidentiality but does not authorize extending the credential's lifetime or copying it outside the user's original storage boundary.

Content

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

If the key came from the environment or .env, save it to ~/.varg/credentials so future sessions find it (skipped if the file already exists). Always reference $VARG_API_KEY -- never the raw value:

bash
[ -f ~/.varg/credentials ] || (mkdir -p ~/.varg && umask 077 && printf '{"api_key":"%s"}\n' "$VARG_API_KEY" > ~/.varg/credentials)

For local render (bun auto-loads .env), also add it to the project .env -- only if that file exists, is gitignored, and has no key yet:

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 146)May include surrounding context.

md
_v2_5: ONLY 5 or 10. Check [models.md](references/models.md).
6. **Native audio = `audio: "native"`** on `Video()`. Provider options must be **namespaced by provider**: `providerOptions: { varg: { fal: { ... } } }`. A flat `providerOptions: { varg: { generate_audio: true } }` is silently dropped by the API, and you get a silent video.
7. **Renders cost credits** -- a typical 3-clip video costs ~300-800 credits depending on the video model (wan_3 vs seedance_2_5). Iterate with `--preview` (local), cheap draft models (`minimax_h3_max_turbo`, `grok_imagine_1_5_lite`) and 720p. Render 1080p only for the final.
8. **API key hygiene** -- Never write a raw API key value into a bash command. Load keys into `$VARG_API_KEY` with the setup snippets (from env, `~/.varg/credentials`, or `.env`) and use `$VARG_API_KEY` in all subsequent commands -- never `echo` or `cat` the key itself. This prevents keys from leaking into conversation context and terminal history.

### Default Models (October 2026)

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 171)May include surrounding context.

bash
# Submit TSX code to the render service — returns a job: {"id": "job_xxx", "status": "queued", ...}
curl -s -X POST https://api.varg.ai/v2/render \
  -H "Authorization: Bearer $VARG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"code": "const img = Image({ model: varg.imageModel(\"nano_banana_2_1\"), prompt: \"a cabin in mountains at sunset\", aspectRatio: \"16:9\" });\nexport default (<Render width={1920} height={1080}><Clip duration={3}>{img}</Clip></Render>);"}'