T09 · Insecure Skill Coding Practices
- Location
scripts/upload_video_file.sh:63- Finding
API Credentials Exposed Through Process Command-Line Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill matches its AIOZ Stream purpose, but its scripts handle secret API keys and user-provided text in ways that deserve review before use.
Install only if you are comfortable giving the skill access to an AIOZ Stream API key that can read account/media data and create or upload resources. Use a narrowly scoped or temporary key if available, inject credentials through a protected environment, avoid running these scripts on shared machines, and be cautious with untrusted video titles, stream names, or search strings until the JSON construction and credential handling are hardened.
scripts/upload_video_file.sh:63API Credentials Exposed Through Process Command-Line Arguments
scripts/upload_video_file.sh:63Video Title Is Interpolated into JSON Without Escaping
scripts/create_livestream_key.sh:14Livestream Key Name Is Interpolated into JSON Without Escaping
scripts/get_total_media.sh:20Media Search Value Is Interpolated into JSON Without Escaping
The skill declares shell-capable behavior and instructs execution of local scripts and curl commands, but it does not define an explicit tool scope such as permissions or allowed-tools. That omission weakens least-privilege controls and can let an agent invoke broader shell capabilities than are necessary for simple API interactions, increasing the blast radius if the skill is misused or later modified.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
description: AIOZ Stream secret API key
required: true
bins:
- curl
- jq
- md5sum
- file
The documentation instructs users to supply both public and secret API keys for every request but provides no guidance on secure handling. In a skill context, this increases the chance that users paste secrets into chat, logs, or insecure script invocations, leading to credential disclosure and unauthorized access to media and analytics resources.
Passing secret credentials as positional shell arguments can expose them through shell history, process listings, terminal logging, and audit trails. Because this skill is intended to guide API operations, normalizing this pattern makes accidental secret leakage substantially more likely in real deployments.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
exit 1
fi
curl -s -X POST 'https://api.aiozstream.network/api/live_streams' \
-H "stream-public-key: $PUBLIC_KEY" \
-H "stream-secret-key: $SECRET_KEY" \
-H 'Content-Type: application/json' \
This shell script sends sensitive authentication values from environment variables as HTTP headers in a network request. While the usage line shows that keys are required, there is no explicit warning, confirmation, or user-facing disclosure that the script will transmit those credentials to a remote API.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
fi
# Send request to get watch time sum metric
WATCH_TIME_RESPONSE=$(curl -s -X POST "https://api.aiozstream.network/api/analytics/metrics/data/watch_time/sum" \
-H "stream-public-key: $PUBLIC_KEY" \
-H "stream-secret-key: $SECRET_KEY" \
-H 'Content-Type: application/json' \
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
fi
# Send request to get watch time sum metric
WATCH_TIME_RESPONSE=$(curl -s -X POST "https://api.aiozstream.network/api/analytics/metrics/data/watch_time/sum" \
-H "stream-public-key: $PUBLIC_KEY" \
-H "stream-secret-key: $SECRET_KEY" \
-H 'Content-Type: application/json' \
This code file reads sensitive environment variables and sends them as authentication headers to a remote API. While the usage comment shows how to provide the variables, it does not warn that credentials will be transmitted to an external service, and there is no runtime disclosure, confirmation, or explicit cautionary comment.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# {"status":"success","data":{"context":{"metric":"view","time_frame":{"from":"2024-12-31T17:00:00Z","to":"2026-03-24T17:00:00Z"},"breakdown":"device_type","filter":{"media_type":"video"}},"total":2,"data":[{"metric_value":229,"dimension_value":"computer","emitted_at":"0001-01-01T00:00:00Z"},{"metric_value":41,"dimension_value":"phone","emitted_at":"0001-01-01T00:00:00Z"}]}}{"status":"success","data":{"context":{"metric":"view","time_frame":{"from":"2024-12-31T17:00:00Z","to":"2026-03-24T17:00:00Z"},"breakdown":"device_type","filter":{"media_type":"video"}},"total":2,"data":[{"metric_value":229,"dimension_value":"computer","emitted_at":"0001-01-01T00:00:00Z"},{"metric_value":41,"dimension_value":"phone","emitted_at":"0001-01-01T00:00:00Z"}]}}
# Send request to get device type breakdown
DEVICE_TYPE_RESPONSE=$(curl -s -X POST "https://api.aiozstream.network/api/analytics/metrics/bucket/view/device-type" \
-H "stream-public-key: $PUBLIC_KEY" \
-H "stream-secret-key: $SECRET_KEY" \
-H 'Content-Type: application/json' \
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# {"status":"success","data":{"context":{"metric":"view","time_frame":{"from":"2024-12-31T17:00:00Z","to":"2026-03-24T17:00:00Z"},"breakdown":"device_type","filter":{"media_type":"video"}},"total":2,"data":[{"metric_value":229,"dimension_value":"computer","emitted_at":"0001-01-01T00:00:00Z"},{"metric_value":41,"dimension_value":"phone","emitted_at":"0001-01-01T00:00:00Z"}]}}{"status":"success","data":{"context":{"metric":"view","time_frame":{"from":"2024-12-31T17:00:00Z","to":"2026-03-24T17:00:00Z"},"breakdown":"device_type","filter":{"media_type":"video"}},"total":2,"data":[{"metric_value":229,"dimension_value":"computer","emitted_at":"0001-01-01T00:00:00Z"},{"metric_value":41,"dimension_value":"phone","emitted_at":"0001-01-01T00:00:00Z"}]}}
# Send request to get device type breakdown
DEVICE_TYPE_RESPONSE=$(curl -s -X POST "https://api.aiozstream.network/api/analytics/metrics/bucket/view/device-type" \
-H "stream-public-key: $PUBLIC_KEY" \
-H "stream-secret-key: $SECRET_KEY" \
-H 'Content-Type: application/json' \
This shell script sends both STREAM_PUBLIC_KEY and STREAM_SECRET_KEY to a remote API via curl headers. Although the usage comment indicates that keys are required, it does not clearly warn the user that credentials will be transmitted over the network, which is a safety-relevant operation under the code-file warning criteria.
This shell script performs an HTTP POST and sends both a public key and secret key as request headers. While the file comments show how to supply the credentials, there is no explicit warning or disclosure that the script will transmit sensitive credentials to a remote API endpoint.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
exit 1
fi
curl -s -X POST 'https://api.aiozstream.network/api/media' \
-H "stream-public-key: $PUBLIC_KEY" \
-H "stream-secret-key: $SECRET_KEY" \
-H 'Content-Type: application/json' \
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
exit 1
fi
curl -s -X POST 'https://api.aiozstream.network/api/media' \
-H "stream-public-key: $PUBLIC_KEY" \
-H "stream-secret-key: $SECRET_KEY" \
-H 'Content-Type: application/json' \
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
exit 1
fi
curl -s -X POST 'https://api.aiozstream.network/api/media' \
-H "stream-public-key: $PUBLIC_KEY" \
-H "stream-secret-key: $SECRET_KEY" \
-H 'Content-Type: application/json' \
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
exit 1
fi
curl -s -X POST 'https://api.aiozstream.network/api/media' \
-H "stream-public-key: $PUBLIC_KEY" \
-H "stream-secret-key: $SECRET_KEY" \
-H 'Content-Type: application/json' \
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
exit 1
fi
curl -s -X POST 'https://api.aiozstream.network/api/media' \
-H "stream-public-key: $PUBLIC_KEY" \
-H "stream-secret-key: $SECRET_KEY" \
-H 'Content-Type: application/json' \
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
exit 1
fi
curl -s -X POST 'https://api.aiozstream.network/api/media' \
-H "stream-public-key: $PUBLIC_KEY" \
-H "stream-secret-key: $SECRET_KEY" \
-H 'Content-Type: application/json' \
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
exit 1
fi
curl -s -X POST 'https://api.aiozstream.network/api/media' \
-H "stream-public-key: $PUBLIC_KEY" \
-H "stream-secret-key: $SECRET_KEY" \
-H 'Content-Type: application/json' \
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
exit 1
fi
curl -s -X POST 'https://api.aiozstream.network/api/media' \
-H "stream-public-key: $PUBLIC_KEY" \
-H "stream-secret-key: $SECRET_KEY" \
-H 'Content-Type: application/json' \
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
exit 1
fi
curl -s -X POST 'https://api.aiozstream.network/api/media' \
-H "stream-public-key: $PUBLIC_KEY" \
-H "stream-secret-key: $SECRET_KEY" \
-H 'Content-Type: application/json' \
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
exit 1
fi
curl -s -X POST 'https://api.aiozstream.network/api/media' \
-H "stream-public-key: $PUBLIC_KEY" \
-H "stream-secret-key: $SECRET_KEY" \
-H 'Content-Type: application/json' \
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
exit 1
fi
curl -s -X POST 'https://api.aiozstream.network/api/media' \
-H "stream-public-key: $PUBLIC_KEY" \
-H "stream-secret-key: $SECRET_KEY" \
-H 'Content-Type: application/json' \
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
exit 1
fi
curl -s -X POST 'https://api.aiozstream.network/api/media' \
-H "stream-public-key: $PUBLIC_KEY" \
-H "stream-secret-key: $SECRET_KEY" \
-H 'Content-Type: application/json' \