T09 · Insecure Skill Coding Practices
- Location
scripts/reverse_prompt_file.py:25- Finding
API Key Exposure Through Command-Line Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill coherently uploads user-selected videos or video URLs to NanoPhoto.AI for reverse-prompt analysis, with some privacy and credential-handling cautions but no hidden or destructive behavior found.
Use this skill only for videos or URLs you are allowed to send to NanoPhoto.AI. Configure NANOPHOTO_API_KEY through the platform or environment, avoid the --api-key command-line option, and do not submit confidential media unless you accept the third-party processing and credit cost.
scripts/reverse_prompt_file.py:25API Key Exposure Through Command-Line Arguments
scripts/reverse_prompt_file.py:37Extension-Only Validation Allows Arbitrary Local File Upload
The code generally aligns with the NanoPhoto reverse-prompt purpose and uses the stated API key mechanism, but it materially underimplements the declared input support. The description says the skill supports YouTube links, direct MP4 URLs, and local MP4 upload; this script only validates and uploads a local .mp4 file. It also does not itself implement shot-by-shot breakdown or storyboard extraction logic beyond relaying the API response. That makes the description broader than the actual behavior in this code chunk, so this should be flagged as a mismatch.
The skill documents behaviors that require network access and local file reading, but it does not declare any explicit tool scope such as allowed-tools or permissions. That weakens containment and reviewability, because consumers cannot easily tell what capabilities the skill is expected to use before execution.
Skill contains patterns that could indirectly extract system prompts through rephrasing, translation, summarization, or side-channel techniques.
---
name: video-reverse-prompt
description: "Analyze videos to extract reverse prompts, shot-by-shot breakdowns, and AI-ready visual descriptions via the NanoPhoto.AI Video Reverse Prompt API. Use when: (1) User wants reverse prompt, prompt extraction, or video-to-prompt analysis, (2) User provides a YouTube link, direct MP4 URL, or local MP4 file and wants a shot list / storyboard-style breakdown, (3) User mentions video analysis, shot breakdown, extract prompt from video, NanoPhoto, or reverse engineer a video prompt. Supports YouTube links, direct .mp4 URLs, and local file upload. Prerequisite: Obtain an API key at https://nanophoto.ai/settings/apikeys and configure env.NANOPHOTO_API_KEY."
homepage: https://nanophoto.ai
metadata: {"openclaw":{"homepage":"https://nanophoto.ai","requires":{"env":["NANOPHOTO_API_KEY"]},"primaryEnv":"NANOPHOTO_API_KEY"}}
---
The skill description does not prominently warn users that provided video URLs or local video files are transmitted to a third-party service for processing. This can cause users to disclose sensitive or copyrighted content without informed consent, especially because local file upload is a core workflow.
This skill sends user-supplied video content or URLs, along with an API credential, to an external third-party endpoint. External transmission is expected for the feature, but it is still security-relevant because sensitive media may leave the local environment and be processed off-platform.
curl -X POST "https://nanophoto.ai/api/sora-2/reverse-prompt" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $NANOPHOTO_API_KEY" \
--data-raw '{
Skill contains patterns that could indirectly extract system prompts through rephrasing, translation, summarization, or side-channel techniques.
# Video Reverse Prompt API Reference
## Endpoint
Skill contains patterns that could indirectly extract system prompts through rephrasing, translation, summarization, or side-channel techniques.
# Video Reverse Prompt API Reference
## Endpoint
Skill contains patterns that could indirectly extract system prompts through rephrasing, translation, summarization, or side-channel techniques.
# Video Reverse Prompt API Reference
## Endpoint
Skill contains patterns that could indirectly extract system prompts through rephrasing, translation, summarization, or side-channel techniques.
# Video Reverse Prompt API Reference
## Endpoint
The reference documents uploading local videos and remote URLs to a third-party API but does not explicitly warn users that their video content will be transmitted off-platform for processing. This creates a real privacy and data-handling risk because users may submit sensitive or proprietary media without informed consent, especially in an agent skill context where the transfer may feel implicit.
The example performs an authenticated POST request containing video data to an external service, which is expected functionality for this skill but still represents real external data exfiltration from the local environment to a third party. In this skill context, the danger is moderated because the transfer is aligned with the advertised purpose, but it remains security-relevant when local files or confidential media are involved.
const videoBuffer = await readFile("your-video.mp4");
const videoBase64 = videoBuffer.toString("base64");
const response = await fetch("https://nanophoto.ai/api/sora-2/reverse-prompt", {
method: "POST",
headers: {
"Content-Type": "application/json",
Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.
parser.add_argument("--retry-delay", type=float, default=3.0, help="Initial retry delay in seconds; doubles after each attempt (default: 3.0)")
args = parser.parse_args()
api_key = args.api_key or __import__("os").environ.get("NANOPHOTO_API_KEY")
if not api_key:
fail("Missing API key. Set NANOPHOTO_API_KEY or pass --api-key.")
The script base64-encodes the entire local MP4 and sends it, along with the original filename, to a third-party remote API. In a skill context, this creates a real data-exfiltration/privacy risk because users may provide sensitive local media, and the code does not present a clear, explicit transmission warning, consent gate, or filename minimization before upload.
The script lets the user choose an output locale, but the HTTP header still forces 'zh-CN,zh;q=0.9,en;q=0.8' for every request. This is a natural-language/locale policy issue because it silently applies a specific language preference that the user did not select.
No suspicious patterns detected.