T09 · Insecure Skill Coding Practices
- Location
scripts/_common.sh:7- Finding
Executable Configuration File Allows Arbitrary Shell Code Execution
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a coherent Pexo video-ad wrapper, but it needs Review because its shell scripts handle credentials and local files in unsafe, under-scoped ways.
Review this before installing. Use it only for briefs and media you are comfortable sending to Pexo, protect the Pexo API key with restrictive file permissions or a secrets manager, do not set PEXO_BASE_URL to anything except a trusted HTTPS Pexo endpoint, and inspect ~/.pexo/config because these scripts execute it as shell code.
scripts/_common.sh:7Executable Configuration File Allows Arbitrary Shell Code Execution
scripts/_common.sh:228Bearer Credential Can Be Sent to an Arbitrary or Plaintext API Endpoint
scripts/pexo-upload.sh:74Server-Supplied Upload and Download URLs Are Used Without Destination Validation
scripts/pexo-asset-get.sh:55Unsanitized Asset Identifier Can Escape the Asset Cache Directory
scripts/pexo-upload.sh:70Filename Is Interpolated Directly Into an API JSON Document
README.md:9Installation Instructions Use Unpinned Remote Dependencies
This finding points to a real security-relevant issue: the skill uploads local files to remote storage/endpoints and accesses the local filesystem, yet those capabilities are not declared in permissions or clearly disclosed. In this context, the instruction to send the user's request verbatim and upload provided files to a third-party backend increases the risk of unintended data exfiltration or overbroad file access if the operator is not fully aware of the skill's transfer behavior.
This finding points to a real security-relevant issue: the skill uploads local files to remote storage/endpoints and accesses the local filesystem, yet those capabilities are not declared in permissions or clearly disclosed. In this context, the instruction to send the user's request verbatim and upload provided files to a third-party backend increases the risk of unintended data exfiltration or overbroad file access if the operator is not fully aware of the skill's transfer behavior.
This finding points to a real security-relevant issue: the skill uploads local files to remote storage/endpoints and accesses the local filesystem, yet those capabilities are not declared in permissions or clearly disclosed. In this context, the instruction to send the user's request verbatim and upload provided files to a third-party backend increases the risk of unintended data exfiltration or overbroad file access if the operator is not fully aware of the skill's transfer behavior.
This finding points to a real security-relevant issue: the skill uploads local files to remote storage/endpoints and accesses the local filesystem, yet those capabilities are not declared in permissions or clearly disclosed. In this context, the instruction to send the user's request verbatim and upload provided files to a third-party backend increases the risk of unintended data exfiltration or overbroad file access if the operator is not fully aware of the skill's transfer behavior.
This finding points to a real security-relevant issue: the skill uploads local files to remote storage/endpoints and accesses the local filesystem, yet those capabilities are not declared in permissions or clearly disclosed. In this context, the instruction to send the user's request verbatim and upload provided files to a third-party backend increases the risk of unintended data exfiltration or overbroad file access if the operator is not fully aware of the skill's transfer behavior.
This finding points to a real security-relevant issue: the skill uploads local files to remote storage/endpoints and accesses the local filesystem, yet those capabilities are not declared in permissions or clearly disclosed. In this context, the instruction to send the user's request verbatim and upload provided files to a third-party backend increases the risk of unintended data exfiltration or overbroad file access if the operator is not fully aware of the skill's transfer behavior.
This finding points to a real security-relevant issue: the skill uploads local files to remote storage/endpoints and accesses the local filesystem, yet those capabilities are not declared in permissions or clearly disclosed. In this context, the instruction to send the user's request verbatim and upload provided files to a third-party backend increases the risk of unintended data exfiltration or overbroad file access if the operator is not fully aware of the skill's transfer behavior.
This finding points to a real security-relevant issue: the skill uploads local files to remote storage/endpoints and accesses the local filesystem, yet those capabilities are not declared in permissions or clearly disclosed. In this context, the instruction to send the user's request verbatim and upload provided files to a third-party backend increases the risk of unintended data exfiltration or overbroad file access if the operator is not fully aware of the skill's transfer behavior.
Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.
- `400`: the file was rejected — possible reasons: file exceeds the size limit, file format is not supported, or the file content does not match its extension. Convert or compress the file and re-upload from scratch using `pexo-upload.sh`.
- `401`: auth failure — see Auth and Proxy Errors above.
- `404`: the file record was not found. The upload session may have been cleaned up. Re-upload from scratch using `pexo-upload.sh`.
- `412`: the upload session has already expired or been completed. Re-upload from scratch using `pexo-upload.sh`.
- `500`: an unexpected server error occurred. Retry in a moment; if the problem persists, contact support at pexo.ai.
Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.
- `400`: the file was rejected — possible reasons: file exceeds the size limit, file format is not supported, or the file content does not match its extension. Convert or compress the file and re-upload from scratch using `pexo-upload.sh`.
- `401`: auth failure — see Auth and Proxy Errors above.
- `404`: the file record was not found. The upload session may have been cleaned up. Re-upload from scratch using `pexo-upload.sh`.
- `412`: the upload session has already expired or been completed. Re-upload from scratch using `pexo-upload.sh`.
- `500`: an unexpected server error occurred. Retry in a moment; if the problem persists, contact support at pexo.ai.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
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.
Create ~/.pexo/config:
PEXO_BASE_URL="https://pexo.ai"
The README states that all creative work happens server-side and that the skill delegates to a hosted backend, but it does not clearly warn users that their prompts, product data, and possibly sensitive marketing content will be transmitted off-box to a third-party service. This creates a real privacy and data-governance risk because users may unknowingly send confidential business information to an external processor.
The skill explicitly relies on shell execution (curl, jq, file, and multiple .sh scripts) but does not declare tool scope or permissions. That creates an authorization and review gap: users and hosting platforms cannot easily tell that the skill performs command execution, filesystem access, and network operations against a third-party API.
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.
---
name: tiktok-video-ad
description: >
Create native TikTok video ads with Pexo — vertical 9:16, sound-on, hook-first. Give it your
product and Pexo writes the script in TikTok's voice, sequences fast-paced shots, picks the
models, and delivers a ready-to-post ad with trending-style music. Use for TikTok ads: "tiktok
ad", "tiktok video ad", "ad for tiktok", "vertical video ad". NOT for landscape or long-form ads
This documentation encourages persistent storage of an API credential on disk in a reusable config file, which increases the exposure window compared with ephemeral credential handling. Persistent secrets are more likely to be recovered from the filesystem, backups, shell-support archives, or other local compromise paths, and this file's setup context does not include compensating controls.
mkdir -p ~/.pexo
The setup instructions tell users to place a long-lived API key in a plaintext file under their home directory without any warning about credential sensitivity, file permissions, or safer storage options. If that file is readable by other local users, captured in backups, or exposed through logs/support bundles, the key could be reused to access the user's Pexo account and API resources.
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.
- `403`: the download link has expired. Re-run `pexo-asset-get.sh` to get a fresh link.
- `000`: network request failed before receiving a response. Check network connectivity and retry.
- local filesystem write failure: the temp directory (`~/.pexo/tmp/`) is not writable or the disk is full. Free up space or set `PEXO_TMP_DIR` to a writable path.
Notes:
This shell code automatically loads ~/.pexo/config and later requires PEXO_API_KEY, which means the skill accesses sensitive credentials implicitly. The only disclosure is in comments for developers, not a user-facing prompt, warning, or runtime message explaining that credentials will be read from local configuration.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
err_file=$(mktemp)
if [[ -n "$body" ]]; then
http_code=$(curl -sS \
--connect-timeout "$_PEXO_CONNECT_TIMEOUT" \
--max-time "$_PEXO_REQUEST_TIMEOUT" \
-X "$method" \
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
err_file=$(mktemp)
if [[ -n "$body" ]]; then
http_code=$(curl -sS \
--connect-timeout "$_PEXO_CONNECT_TIMEOUT" \
--max-time "$_PEXO_REQUEST_TIMEOUT" \
-X "$method" \
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
set +o pipefail
if [[ -n "$body" ]]; then
curl -sS -N \
--connect-timeout "$_PEXO_CONNECT_TIMEOUT" \
--max-time "$timeout" \
-X POST \
The script executes source "$config_path" on a user-controlled file in the home directory, which runs arbitrary shell code rather than just reading configuration values. If that file is modified by malware, another local user, or a malicious setup step, running this diagnostic script will execute attacker commands with the user's privileges.
Sourcing a config file without warning or confirmation causes hidden code execution in a script that appears to be a harmless diagnostic utility. Users may reasonably expect checks and network tests, not execution of arbitrary shell statements embedded in ~/.pexo/config, which increases the chance of accidental compromise.
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.
source "$config_path"
else
echo "$FAIL Config file not found: $config_path"
echo " Create it with:"
echo ' mkdir -p ~/.pexo && cat > ~/.pexo/config << EOF'
echo ' PEXO_BASE_URL="https://pexo.ai"'
echo ' PEXO_API_KEY="sk-<your-api-key>"'
No suspicious patterns detected.