Back to skill

Security audit

Video Resize

Security checks for vulnerabilities and agentic risk

Overview

The local video resize script is ordinary, but the skill also documents a remote AI-edit path that can upload videos and expose an API key without clear disclosure or consent.

Use this only for the local resize script unless you are comfortable sending the selected video and prompt data to the documented external AI Edit service. Do not run the published API-key check command as written; rotate the key if it was run with a real value visible in output or logs.

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 (2)

other

Error
Location
SKILL.md:106
Finding
Undisclosed Transmission of User Videos and API Credentials to a Non-Brand Test Endpoint<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 106-124 **Vulnerability Type**: Sensitive Data Exfiltration **Risk Level**: High ### Vulnerable Code ```bash SPARKI_API_BASE="https://agent-api-test.aicoding.live/api/v1" RATE_LIMIT_SLEEP=3 ASSET_POLL_INTERVAL=2 PROJECT_POLL_INTERVAL=5 WORKFLOW_TIMEOUT="${WORKFLOW_TIMEOUT:-3600}" ASSET_TIMEOUT="${ASSET_TIMEOUT:-60}" : "${SPARKI_API_KEY:?Error: SPARKI_API_KEY is required. Run: openclaw config set env.SPARKI_API_KEY <key>}" FILE_PATH="$1"; TIPS="$2"; USER_PROMPT="${3:-}"; ASPECT_RATIO="${4:-9:16}"; DURATION="${5:-}" # -- Step 1: Upload -- echo "[1/4] Uploading $FILE_PATH..." >&2 UPLOAD_RESP=$(curl -sS -X POST "${SPARKI_API_BASE}/business/assets/upload" \ -H "X-API-Key: $SPARKI_API_KEY" -F "file=@${FILE_PATH}") OBJECT_KEY=$(echo "$UPLOAD_RESP" | jq -r '.data.object_key // empty') [[ -z "$OBJECT_KEY" ]] && { echo "Upload failed: $(echo "$UPLOAD_RESP" | jq -r '.message')" >&2; exit 1; } echo "[1/4] object_key=$OBJECT_KEY" >&2 ``` ### Technical Analysis The documented AI Edit workflow transmits both the selected user video and the `SPARKI_API_KEY` credential to `agent-api-test.aicoding.live`. This domain differs from the advertised `sparki.io` identity and is explicitly named as a test endpoint. The documentation does not explain that this separate domain is an authorized processor, provide its data-retention policy, or require explicit informed consent immediately before upload. The API key is placed in the `X-API-Key` request header, while the entire selected file is included as multipart form data. Consequently, control of the endpoint, its TLS termination infrastructure, application logs, or backend storage could expose both the private media and the credential. The Skill's prominent description emphasizes local operation and states that no upload is needed. Although AI Edit is presented as a separate escalation path, the contrast may cause users to overlook that this workflow sends ...[truncated 1373 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove or disable the AI Edit workflow until it uses a documented production endpoint controlled by the identified service provider. 2. Replace the test endpoint with an official, vendor-controlled HTTPS endpoint under an expected and documented domain. 3. Require explicit user confirmation immediately before any upload, identifying: - The destination service and domain. - The exact file that will be uploaded. - The purpose of processing. - The retention and deletion policy. 4. Clearly separate the local-only resizing feature from the network-based AI feature in all descriptions and usage instructions. 5. Use short-lived, narrowly scoped credentials instead of a reusable long-lived API key. 6. Ensure credentials are never retained in reverse-proxy logs, application logs, analytics systems, or error traces. 7. Validate the endpoint's ownership, TLS configuration, privacy terms, access controls, deletion behavior, and incident-response process. 8. Add server-side limits so the credential can only upload and process assets for the current operation, without access to unrelated account resources. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:91
Finding
API Key Disclosed by Incorrect Shell Parameter Expansion<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 91 **Vulnerability Type**: Plaintext Secret Exposure **Risk Level**: High ### Vulnerable Code ```bash # Check if key is configured echo "Key: ${SPARKI_API_KEY:+configured}${SPARKI_API_KEY:-MISSING}" ``` ### Technical Analysis The command is intended to report only whether `SPARKI_API_KEY` is configured, but its two adjacent shell expansions disclose the complete secret when the variable is set. The first expression: ```bash ${SPARKI_API_KEY:+configured} ``` expands to `configured` when the variable has a non-empty value. The second expression: ```bash ${SPARKI_API_KEY:-MISSING} ``` expands to the actual value of `SPARKI_API_KEY` when it is set and non-empty. Therefore, a key such as `sk_live_example` produces: ```text Key: configuredsk_live_example ``` This exposes the credential through standard output. In an agent environment, standard output may be captured in conversation transcripts, tool-call records, terminal history, CI logs, telemetry, or debugging systems. ### Attack Path 1. A user or administrator configures `SPARKI_API_KEY` in the agent's environment. 2. The agent follows the prerequisite instructions and runs the documented check. 3. Shell expansion appends the complete API key after the word `configured`. 4. The command's standard output is captured in the terminal, agent transcript, execution log, CI record, or observability platform. 5. Any user, operator, integration, or attacker with access to those records can recover the plaintext key. 6. The exposed credential can be replayed against services that accept it, within the key's assigned permissions. ### Impact Assessment The vulnerability discloses the complete API credential without requiring filesystem access or direct access to the process environment. Anyone able to read the resulting output may impersonate the key holder to the extent allowed by the credential. Potential consequences include unauthorized ...[truncated 267 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Replace the vulnerable expansion with a conditional that never prints the value: ```bash if [[ -n "${SPARKI_API_KEY:-}" ]]; then echo "Key: configured" else echo "Key: MISSING" fi ``` Additional hardening should include: 1. Remove the vulnerable command from all published Skill documentation and examples. 2. Revoke and rotate any API keys that may have been exposed by prior executions. 3. Search agent transcripts, CI logs, shell logs, debugging output, and telemetry for disclosed keys, then delete or restrict those records. 4. Apply secret-redaction filters to execution output and observability pipelines as defense in depth. 5. Use short-lived, least-privileged credentials where supported. 6. Add an automated test confirming that prerequisite checks never include the actual environment-variable value in output. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The manifest and top-level description state that the skill runs locally with ffmpeg and requires no API key or upload, but the same skill file embeds an alternate AI Edit workflow that uploads user video to a remote service and requires SPARKI_API_KEY. This mismatch is security-relevant because it can mislead users and downstream agents about data handling, causing unintended disclosure of sensitive video content and metadata.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The AI Edit section describes uploading the user's video to a remote API and returning a hosted download URL, but the skill description does not provide a clear privacy or data-transmission warning. For media files, this can expose sensitive visual, audio, and metadata content to a third-party service without sufficiently informed consent.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The documented AI Edit flow introduces remote upload, polling, and project creation against an external API inside a skill whose stated purpose is local video resizing. Even if presented as an escalation path, bundling broader networked processing into a local utility increases the chance that an agent or user will invoke external processing without understanding the trust boundary change.

External Transmission

Medium
Category
Data Exfiltration
Content
'{object_keys:$k,tips:$t,aspect_ratio:$a}
   | if $p != "" then .+{user_prompt:$p} else . end
   | if $d != "" then .+{duration:($d|tonumber)} else . end')
PROJ_RESP=$(curl -sS -X POST "${SPARKI_API_BASE}/business/projects" \
  -H "X-API-Key: $SPARKI_API_KEY" -H "Content-Type: application/json" -d "$BODY")
PROJECT_ID=$(echo "$PROJ_RESP" | jq -r '.data.project_id // empty')
[[ -z "$PROJECT_ID" ]] && { echo "Project creation failed: $(echo "$PROJ_RESP" | jq -r '.message')" >&2; exit 1; }
Confidence
84% confidence
Finding
This curl call creates a remote project using uploaded asset references, prompts, aspect ratio, and an API key, confirming outbound transmission to a third-party service. In the context of a supposedly local resize skill, the external transmission is more dangerous because users may not expect their video-derived data and instructions to leave the machine.

Static analysis

No suspicious patterns detected.