Back to skill

Security audit

FreeAds 随手拍广告

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its advertised ad-video purpose, but its included API-key setup script can unsafe modify shell startup files and the setup instructions include a referral promotion.

Review before installing. Avoid running scripts/setup-api-key.sh as-is; prefer a trusted secret manager or a manually set environment variable for the current session. Do not submit confidential product images, logos, or unreleased marketing assets unless you are comfortable sending them to Atlas Cloud and model providers. Be aware that the setup guidance uses a referral link.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (4)

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:65
Finding

Hard-Coded Affiliate Promotion in Agent Instructions

Content
View full analysis
API Keys 3. Create and copy an API key 4. Configure the environment variable: export ATLASCLOUD_API_KEY="your-api-key" ``` The excerpt is an English rendering of the fixed response template at the cited location. The referral identifier is `ref=LJNA3T`. ### Technical Analysis The Skill instructs the Agent to emit a fixed referral URL and promotional message whenever the required API key is absent. The referral parameter is not required to register with Atlas Cloud, create an API key, or perform the advertised video-generation workflow. Because this instruction is part of the loaded Skill rather than optional documentation, it changes the Agent's response for a commercially motivated purpose unrelated to the minimum technical requirements of the task. Users may reasonably interpret the recommendation as neutral setup guidance without realizing that the link contains referral tracking. ### Attack Path 1. A user loads the Skill without setting `ATLASCLOUD_API_KEY`. 2. The Agent reads and follows the missing-key response instructions. 3. The Agent presents the hard-coded `ref=LJNA3T` URL and promotional copy. 4. The user follows the link. 5. Registration traffic is attributed to the embedded referral identifier. ### Impact Assessment This issue does not grant operating-system privileges or expose credentials. Its scope is the Agent's current output and the user's provider-selection or registration decision. The primary impacts are: - Undisclosed commercial influence over Agent responses. - Referral tracking and tr ...[truncated 163 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/setup-api-key.sh:37
Finding

Persistent Shell Command Injection Through Unsafely Stored API Key

Content
View full analysis
/dev/null) HTTP_CODE=$(echo "$RESPONSE" | tail -n1) BODY=$(echo "$RESPONSE" | sed '$d') if [ "$HTTP_CODE" = "200" ]; then echo -e "${GREEN}API Key validation succeeded.${NC}" else echo -e "${RED}API Key validation failed (HTTP $HTTP_CODE)${NC}" echo -e "Response: $BODY" echo "" read -p "Continue configuration anyway? (y/N): " CONTINUE if [[ ! "$CONTINUE" =~ ^[Yy]$ ]]; then exit 1 fi fi if [ -n "$SHELL_RC" ]; then read -p "Add the API Key to this file? (Y/n): " ADD_TO_RC if [[ ! "$ADD_TO_RC" =~ ^[Nn]$ ]]; then if grep -q "ATLASCLOUD_API_KEY" "$SHELL_RC"; then if [[ "$OSTYPE" == "darwin"* ]]; then sed -i '' "s/^export ATLASCLOUD_API_KEY=.*/export ATLASCLOUD_API_KEY=\"$API_KEY\"/" "$SHELL_RC" else sed -i "s/^export ATLASCLOUD_API_KEY=.*/export ATLASCLOUD_API_KEY=\"$API_KEY\"/" "$SHELL_RC" fi else echo "" >> "$SHELL_RC" echo "# Atlas Cloud API Key (added by freeads-snap-ad skill)" >> "$SHELL_RC" echo "export ATLASCLOUD_API_KEY=\"$API_KEY\"" >> "$SHELL_RC" fi fi fi ``` The displayed messages have been rendered in English, while the shell operations and vulnerable interpolation are preserved. ### Technical Analysis The script accepts arbitrary input into `API_KEY`. A failed remote validation does not stop execution because the user can choose to continue. The untrusted v ...[truncated 2094 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/setup-api-key.sh:70
Finding

API Key Persisted in Plaintext Shell Configuration

Content
View full analysis
> "$SHELL_RC" echo "# Atlas Cloud API Key (added by freeads-snap-ad skill)" >> "$SHELL_RC" echo "export ATLASCLOUD_API_KEY=\"$API_KEY\"" >> "$SHELL_RC" fi fi else echo -e "export ATLASCLOUD_API_KEY=\"$API_KEY\"" fi export ATLASCLOUD_API_KEY="$API_KEY" ``` ### Technical Analysis The script stores the Atlas Cloud credential directly in a general-purpose shell startup file. It does not inspect ownership, reject symbolic links, verify existing permissions, or enforce restrictive permissions after writing. Shell startup files are frequently included in workstation backups, diagnostic archives, dotfile repositories, support bundles, and accidental file sharing. The fallback branch also prints the complete key to the terminal, where it can be captured in terminal logs, screen recordings, or support transcripts. The script additionally displays a prefix and suffix of an existing key at lines 22–24. Although this is not the complete credential, unnecessary key fragments can still aid identification or correlation. ### Attack Path 1. The user runs the setup ...[truncated 1053 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/brand-protection-guide.md:112
Finding

Server-Side Request Forgery Risk Through Arbitrary Logo URL Validation

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (46)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

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

ABSOLUTE REQUIREMENT: The product's visual appearance must be IDENTICAL to the input image. No creative liberties with product design, color, shape, or branding."""

text
return prompt
text

---

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · references/atlas-cloud-api.md (reported line 679)May include surrounding context.

ABSOLUTE REQUIREMENT: The product's visual appearance must be IDENTICAL to the input image. No creative liberties with product design, color, shape, or branding."""

text
return prompt
text

---

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · references/brand-protection-guide.md (reported line 462)May include surrounding context.

ABSOLUTE REQUIREMENT: The product's visual appearance must be IDENTICAL to the input image. No creative liberties with product design, color, shape, or branding."""

text
return prompt
text

---

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README describes uploading product photos and generating videos through Atlas Cloud and third-party models, but it does not clearly warn users that their images, prompts, and generated outputs are transmitted to external AI providers. This creates a meaningful privacy and consent risk, especially if users submit proprietary product images, unreleased marketing assets, or other sensitive content without understanding where the data is sent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README suggests broad trigger phrases such as “生成广告视频” and similar natural-language requests, which can cause the skill to be invoked unintentionally during ordinary conversation. Because invocation can lead to paid API usage and transmission of user-supplied images to external providers, accidental activation has real cost and privacy consequences in this skill’s context.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill advertises behavior that depends on code execution and API use, but it does not declare any explicit tool scope or allowed tools. In agent platforms, missing scope declarations can cause overbroad tool access or make review and enforcement of least privilege impossible, increasing the chance of unintended shell or network-capable execution paths.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger phrases are broad everyday phrases like '生成广告视频' and '产品广告', which can match normal conversation and invoke the skill unintentionally. Accidental activation is risky here because the skill may process user-provided images and prompts and send them to external APIs, potentially causing privacy exposure or surprise billing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The description does not clearly warn users that uploaded product images and prompt content are transmitted to third-party cloud services, including Atlas Cloud and Veo. This creates a real data-handling and consent issue because users may share proprietary product imagery, branding, or unreleased marketing material without realizing it leaves the local environment.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · references/atlas-cloud-api.md (reported line 11)May include surrounding context.

md
| 用途 | Base URL |
|-----|----------|
| LLM / 对话补全 | `https://api.atlascloud.ai/v1` |
| 图像 / 视频生成 | `https://api.atlascloud.ai/api/v1` |

### 认证

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · references/atlas-cloud-api.md (reported line 12)May include surrounding context.

md
| 用途 | Base URL |
|-----|----------|
| LLM / 对话补全 | `https://api.atlascloud.ai/v1` |
| 图像 / 视频生成 | `https://api.atlascloud.ai/api/v1` |

### 认证

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · references/atlas-cloud-api.md (reported line 27)May include surrounding context.

md
| 用途 | Base URL |
|-----|----------|
| LLM / 对话补全 | `https://api.atlascloud.ai/v1` |
| 图像 / 视频生成 | `https://api.atlascloud.ai/api/v1` |

### 认证

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · references/atlas-cloud-api.md (reported line 84)May include surrounding context.

md
| 用途 | Base URL |
|-----|----------|
| LLM / 对话补全 | `https://api.atlascloud.ai/v1` |
| 图像 / 视频生成 | `https://api.atlascloud.ai/api/v1` |

### 认证

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · references/atlas-cloud-api.md (reported line 192)May include surrounding context.

md
| 用途 | Base URL |
|-----|----------|
| LLM / 对话补全 | `https://api.atlascloud.ai/v1` |
| 图像 / 视频生成 | `https://api.atlascloud.ai/api/v1` |

### 认证

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · references/atlas-cloud-api.md (reported line 303)May include surrounding context.

md
| 用途 | Base URL |
|-----|----------|
| LLM / 对话补全 | `https://api.atlascloud.ai/v1` |
| 图像 / 视频生成 | `https://api.atlascloud.ai/api/v1` |

### 认证

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · references/atlas-cloud-api.md (reported line 448)May include surrounding context.

md
| 用途 | Base URL |
|-----|----------|
| LLM / 对话补全 | `https://api.atlascloud.ai/v1` |
| 图像 / 视频生成 | `https://api.atlascloud.ai/api/v1` |

### 认证

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · references/brand-protection-guide.md (reported line 102)May include surrounding context.

md
| 用途 | Base URL |
|-----|----------|
| LLM / 对话补全 | `https://api.atlascloud.ai/v1` |
| 图像 / 视频生成 | `https://api.atlascloud.ai/api/v1` |

### 认证

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The document instructs uploading local files to a third-party cloud endpoint but does not provide a clear user-facing privacy warning that local images/files will leave the user's environment. In this skill context, users may assume a local photo transformation workflow, so the omission increases the risk of unintended disclosure of sensitive product images, metadata, or proprietary assets.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This code performs an outbound upload of a local file to a remote cloud API. In isolation that is expected behavior for the skill, but it is still security-relevant because it transfers potentially sensitive user content off-device; without strong disclosure and consent controls, this becomes an unintended data-exposure risk.

Content

Scanner excerpt · references/atlas-cloud-api.md (reported line 48)May include surrounding context.

md
Returns:
        临时文件 URL
    """
    response = requests.post(
        "https://api.atlascloud.ai/api/v1/model/uploadMedia",
        headers={"Authorization": f"Bearer {api_key}"},
        files={"file": open(file_path, "rb")}

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This line is the concrete remote upload URL used for sending local files externally. In context, that can expose confidential images or metadata if users are not clearly informed and have not consented.

Content

Scanner excerpt · references/atlas-cloud-api.md (reported line 49)May include surrounding context.

md
临时文件 URL
    """
    response = requests.post(
        "https://api.atlascloud.ai/api/v1/model/uploadMedia",
        headers={"Authorization": f"Bearer {api_key}"},
        files={"file": open(file_path, "rb")}
    )

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This duplicate finding points to the same external image-generation transmission at line 126. The security issue is not the API call itself but the unmitigated export of user-controlled media and prompts to a third-party processor.

Content

Scanner excerpt · references/atlas-cloud-api.md (reported line 126)May include surrounding context.

md
处理后的图片 URL
    """
    # 提交生成任务
    response = requests.post(
        "https://api.atlascloud.ai/api/v1/model/generateImage",
        headers={
            "Authorization": f"Bearer {api_key}",

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This duplicate finding points to the same external image-generation transmission at line 126. The security issue is not the API call itself but the unmitigated export of user-controlled media and prompts to a third-party processor.

Content

Scanner excerpt · references/atlas-cloud-api.md (reported line 126)May include surrounding context.

md
处理后的图片 URL
    """
    # 提交生成任务
    response = requests.post(
        "https://api.atlascloud.ai/api/v1/model/generateImage",
        headers={
            "Authorization": f"Bearer {api_key}",

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This is the specific remote URL used by the image-generation request. The risk is third-party transmission of user images and prompts, which is materially relevant in a skill that processes user photos into ad assets.

Content

Scanner excerpt · references/atlas-cloud-api.md (reported line 127)May include surrounding context.

md
"""
    # 提交生成任务
    response = requests.post(
        "https://api.atlascloud.ai/api/v1/model/generateImage",
        headers={
            "Authorization": f"Bearer {api_key}",
            "Content-Type": "application/json"

External Transmission

Medium
Category
Data Exfiltration
Confidence
86% confidence
Finding

Polling the external result endpoint is expected asynchronous API behavior. It is lower risk than media upload, but it still communicates identifiers to a third-party service and should be covered by the same external-processing disclosure.

Content

Scanner excerpt · references/atlas-cloud-api.md (reported line 169)May include surrounding context.

md
while time.time() - start_time < timeout:
        response = requests.get(
            f"https://api.atlascloud.ai/api/v1/model/getResult?predictionId={prediction_id}",
            headers={"Authorization": f"Bearer {api_key}"}
        )

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

Configuring the SDK with a third-party base URL means prompts and image references will be sent to an external LLM provider. In this skill, that may include commercially sensitive product analysis inputs and generated marketing copy.

Content

Scanner excerpt · references/atlas-cloud-api.md (reported line 228)May include surrounding context.

md
"""
    client = OpenAI(
        api_key=api_key,
        base_url="https://api.atlascloud.ai/v1"
    )
    
    system_prompt = f"""你是一位顶级广告创意总监,拥有20年的高端品牌广告经验。

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The video-generation workflow sends user-provided images and prompts to an external service but only warns about time and cost, not data transmission. Because this skill centers on turning user photos into ads, the omission can mislead users into sharing proprietary product, branding, or personal image content without informed consent.

Content

No source excerpt is available for this finding.