Back to skill

Security audit

Ad-Ready

Security checks for vulnerabilities and agentic risk

Overview

This ad-generation skill is mostly coherent, but it needs review because it fetches arbitrary URLs, sends assets to ComfyDeploy, and strongly preserves human likeness and sensitive traits in generated ads.

Install only if you are comfortable sending product URLs, product images, logos, model/reference images, and generated outputs to ComfyDeploy and related logo services. Avoid using private/internal URLs with auto-fetch, and do not use real people's likenesses or reference ads unless you have the rights and consent to use them commercially.

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)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/generate.py:160
Finding
Unrestricted URL Fetching Enables Server-Side Request Forgery<![CDATA[ ## Vulnerability Details **File Location**: `scripts/generate.py:160-176, 193-239` **Vulnerability Type**: Server-Side Request Forgery (SSRF) through user-controlled URLs and redirects **Risk Level**: High ### Vulnerable Code ```python def download_to_file(client: httpx.Client, url: str, dest: Path) -> bool: """Download a URL to a local file. Returns True on success.""" try: headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", "Accept": "image/*,*/*;q=0.8", } response = client.get(url, headers=headers, follow_redirects=True, timeout=20.0) if response.status_code == 200 and len(response.content) > 1000: content_type = response.headers.get("content-type", "") if "image" in content_type or "octet" in content_type or len(response.content) > 5000: dest.parent.mkdir(parents=True, exist_ok=True) dest.write_bytes(response.content) size_kb = len(response.content) / 1024 print(f" ✓ Downloaded: {dest.name} ({size_kb:.0f}KB)", flush=True) return True except Exception as e: print(f" ✗ Download failed: {e}", flush=True) return False ``` ```python def fetch_product_image(client: httpx.Client, product_url: str, dest: Path) -> bool: """Try to find and download the main product image from a product page.""" try: from bs4 import BeautifulSoup except ImportError: print(" ⚠ beautifulsoup4 not available for product image extraction", flush=True) return False print(" Fetching product page for main image...", flush=True) try: headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", "Accept": "text/html,*/*", } response = client.get(product_url, headers=headers, follow_redirects=True, timeout=20.0) if response.status_cod ...[truncated 4559 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Permit only explicitly required URL schemes, preferably `https`. 2. Parse and validate every user-provided, extracted, and redirected URL before requesting it. 3. Resolve destination hostnames and reject: - IPv4 and IPv6 loopback addresses - Private address ranges - Link-local addresses - Multicast, reserved, and unspecified addresses - Cloud metadata destinations 4. Repeat validation after every redirect and DNS resolution to prevent redirect-based and DNS-rebinding bypasses. 5. Reject URLs containing embedded credentials. 6. Restrict nonstandard destination ports unless explicitly needed. 7. Consider an allowlist of supported commerce domains or require interactive approval before contacting a new domain. 8. Replace automatic redirect handling with a bounded manual redirect loop that validates each target. 9. Decode downloaded data with a trusted image library and reject content that is not a valid supported image. Do not treat response size as proof that content is an image. 10. Enforce strict response-size limits to prevent excessive memory or disk consumption. 11. Run the fetcher in a network-isolated environment with no access to local, private, or metadata networks. 12. Keep auto-fetch disabled in untrusted workflows and prefer user-provided product images. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate.py:252
Finding
Hardcoded Third-Party Service Token in Source Code<![CDATA[ ## Vulnerability Details **File Location**: `scripts/generate.py:252-255` **Vulnerability Type**: Hardcoded service token and credential exposure **Risk Level**: Medium ### Vulnerable Code ```python logo_attempts = [ f"https://logo.clearbit.com/{clean_name}.com", f"https://logo.clearbit.com/{clean_name}.com.ar", f"https://img.logo.dev/{clean_name}.com?token=pk_X-1ZO13GSgeOoUrIuJ6GMQ", ] ``` ### Technical Analysis A logo.dev service token is embedded directly in the distributed source code and placed in a URL query parameter. Anyone with access to the project can extract and reuse it independently of the Skill. Even if this token is intended to function as a publishable client identifier, embedding it in source prevents effective confidentiality and complicates rotation. Transmitting it as a query parameter also increases exposure because full URLs may be retained by application logs, HTTP proxies, monitoring systems, browser histories, and service-provider request logs. The token is unrelated to the user's ComfyDeploy credential and does not expose the `COMFY_DEPLOY_API_KEY`. Nevertheless, it represents a reusable third-party service credential whose privileges and restrictions are not documented in the project. ### Attack Path 1. An attacker obtains the distributed Skill package or repository contents. 2. The attacker reads `scripts/generate.py` and extracts the logo.dev token. 3. The attacker submits independent requests to logo.dev using the exposed token. 4. Requests consume the token owner's quota or are attributed to the token owner. 5. If the token has broader privileges than expected, the attacker can exercise those privileges until it is revoked or rotated. ### Impact Assessment Potential impact includes: - Unauthorized consumption of third-party service quota. - Requests and abusive activity being attributed to the token owner. - Unexpected service charges or rate limiting. - Operational disruption if legitimate Skill ...[truncated 335 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the token from source code and repository history. 2. Rotate or revoke the exposed token through the service provider. 3. Load the replacement token from a dedicated environment variable or secret manager. 4. Do not accept the token through a routine command-line option, because command-line arguments may be visible in process listings and shell history. 5. Send the credential in an authorization header if supported instead of a query parameter. 6. Apply provider-side restrictions such as minimal scopes, strict quotas, approved origins, and usage alerts. 7. If the token is intentionally public, document that fact and confirm that it cannot authorize sensitive operations or incur uncontrolled usage. 8. Add automated secret scanning to repository and release pipelines to prevent recurrence. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (26)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
The public description says the skill takes a product URL with optional brand/funnel inputs and outputs an ad image, but the body reveals materially broader behavior: third-party logo fetching, reference-style cloning, local catalog inspection, optional local image inputs, and additional prompt/language controls. This mismatch can mislead users and orchestrators about what data is collected, what remote services are contacted, and how much manual control exists, undermining informed consent and policy enforcement.

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
The prompt instructs exact replication of a real person's face, body traits, and pose from reference images, which materially enables impersonation or unauthorized likeness cloning. In this skill context, that capability is not necessary to transform a product URL into an ad image, so it meaningfully increases misuse potential for deceptive or non-consensual content.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
These fields instruct forensic extraction and preservation of detailed facial structure, body characteristics, skin tone, and other biometric-like identity attributes from a reference image. That creates a structured pipeline for reproducing a real person's likeness in generated ads, increasing privacy, consent, and impersonation risks and exceeding what is necessary for product advertising automation.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The prompt explicitly instructs the model to define age range and describe ethnicity and skin tone from the reference image, which is direct inference and use of sensitive personal attributes. In the context of an advertising-image generation skill, this is not justified by the stated inputs or purpose and can enable discriminatory targeting, privacy harms, or policy violations around protected-trait processing.

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill clearly instructs the agent to use network access, inspect local files, read environment variables for API keys, and write downloaded assets to /tmp, but it declares no explicit tool scope or permission boundaries. That creates an authorization gap where the runtime may grant broader capabilities than users expect, increasing the chance of unintended data access or exfiltration during normal operation.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill automates product-page scraping, image downloading, logo retrieval, and submission of images/metadata to a remote ComfyDeploy endpoint, yet the description does not prominently warn that user-provided URLs and downloaded assets may be transmitted to external services. In a skill that processes web content and brand assets, this omission creates privacy and compliance risk because users may unknowingly cause third-party data transfer.

Natural-Language Policy Violations

Medium
Confidence
98% confidence
Finding
The file states that `--language` should be omitted unless the user explicitly requests another language, and that the default is `es`. This imposes a specific language choice by default rather than offering a neutral default or asking the user, which conflicts with the locale-choice policy.

Natural-Language Policy Violations

Medium
Confidence
98% confidence
Finding
The API details explicitly say the `language` parameter should be omitted unless the user asks for a different language, causing the pipeline to default to Spanish. This is a natural-language locale policy violation because it forces a language choice without user opt-in.

Description-Behavior Mismatch

Medium
Confidence
91% confidence
Finding
The prompt explicitly requires ethnicity, facial landmarks, body type, and other identity traits from a provided talent image to be preserved and analyzed in detail. For an ad-generation skill whose declared inputs are a product URL and brand profile, this expands into sensitive identity processing and increases the risk of generating likeness-based content without clear necessity or consent.

Description-Behavior Mismatch

Medium
Confidence
88% confidence
Finding
The manifest says the output is a PNG advertising image with product and model. This file instead instructs generation of a production-ready JSON blueprint containing ad copy, layout architecture, typography system, CTA engineering, and brand asset placement, which is a materially different and broader output artifact.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The prompt explicitly instructs the system to preserve and analyze a subject's ethnicity from a reference image, which operationalizes a sensitive attribute without any user opt-in, necessity check, or policy guardrail. In an ad-generation skill, this creates a real risk of inferring, storing, or using protected characteristics in creative decisions, which can lead to discriminatory targeting, profiling, or privacy violations.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The output schema requires the model to describe ethnicity and skin tone exactly as shown in the reference, turning sensitive-attribute inference into a mandatory structured output. Because this is a production-oriented advertising blueprint, the data is more likely to be reused downstream in generation, review, or targeting workflows, increasing the chance of discriminatory or non-compliant use.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The prompt explicitly requires strict preservation of a supplied talent's facial features, ethnicity, body type, and identity, which creates a reference-driven human image replication capability beyond the advertised product-URL-to-ad workflow. In an ad-generation context, this increases the risk of unauthorized likeness cloning, demographic-sensitive targeting, and misuse of real-person images for synthetic endorsements or deceptive promotional content.

Description-Behavior Mismatch

Medium
Confidence
84% confidence
Finding
Requiring exact pose replication from a reference image introduces fine-grained control over reproducing a depicted person's likeness and presentation, which can facilitate imitation of copyrighted/editorial compositions or misleading recreation of a real person's stance in ads. While pose control alone is less severe than facial identity cloning, in combination with locked talent identity it materially increases impersonation and deceptive-advertising risk.

Description-Behavior Mismatch

Medium
Confidence
87% confidence
Finding
The output schema codifies precise extraction and replication of body position, limb placement, facial direction, and micro-gestures with 'EXACT' strictness, operationalizing the same risky behavior in a structured form. In a commercial ad-creation tool, this makes misuse easier and more reliable for generating synthetic ads that mimic a real model or reference shot without clear consent or disclosure.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The prompt explicitly treats attached talent images as canonical references and instructs the model not to swap faces, then requires exact pose replication from a pose reference. That moves the skill from generic ad creation into identity-preserving likeness reproduction of a specific person, which can enable non-consensual personalized ad generation or deceptive synthetic media beyond the declared product scope.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
Locking ethnicity to match a reference image without an explicit user choice or documented necessity hard-codes a protected attribute into generation behavior. This can produce biased or inappropriate outputs, limit safe substitution options, and compounds the risks of exact identity replication by preserving sensitive personal characteristics.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The output schema again requires ethnicity and skin tone to be reproduced exactly from the reference, operationalizing sensitive-attribute retention in the generated blueprint. Embedding this into structured output makes the behavior durable and repeatable across runs, increasing fairness and privacy risks in a commercial ad-generation context.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The prompt explicitly requires preserving a provided talent image's exact facial features, ethnicity, body type, and forbids face swapping, which enables identity-specific image generation beyond the declared product-URL-and-brand workflow. In an advertising pipeline, this creates a realistic risk of unauthorized likeness use, impersonation, or non-consensual commercial exploitation if users supply third-party images.

Description-Behavior Mismatch

Medium
Confidence
90% confidence
Finding
The prompt instructs exact replication of a pose reference image, which introduces concealed reference-copying behavior not disclosed by the skill manifest. While pose copying is less severe than face copying, exact reproduction can still facilitate derivative imitation of copyrighted or proprietary creative assets and mislead users about the system's degree of original creative generation.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The output schema operationalizes strict pose replication by requiring extracted body position, limb placement, facial direction, micro-gestures, and 'EXACT' replication strictness. This turns hidden copying behavior into a production requirement, increasing the chance of generating derivative ad creatives that closely mimic source imagery despite the product's advertised automated creative selection.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The prompt requires granular characterization and preservation of a depicted person's ethnicity, body type, beauty positioning, and facial anatomy far beyond what is necessary to generate a product ad from a product URL and brand profile. This creates unnecessary processing of sensitive and appearance-based attributes, increases profiling risk, and can lead the system to infer or reproduce protected or intrusive personal traits without a clear business justification.

Natural-Language Policy Violations

Medium
Confidence
98% confidence
Finding
Mandating that the model describe the talent's ethnicity without opt-in or documented necessity forces protected-attribute inference as part of normal operation. Because the skill is for automated ad creation rather than identity verification or accessibility support, the context makes this requirement less defensible and more likely to produce discriminatory or privacy-invasive outputs.

External Transmission

Medium
Category
Data Exfiltration
Content
sys.stderr.reconfigure(line_buffering=True)

DEPLOYMENT_ID = "e37318e6-ef21-4aab-bc90-8fb29624cd15"
API_BASE = "https://api.comfydeploy.com/api"

# Dynamic brand profiles from catalog
BRANDS_DIR = Path.home() / "clawd" / "ad-ready" / "configs" / "Brands"
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
sys.stderr.reconfigure(line_buffering=True)

DEPLOYMENT_ID = "e37318e6-ef21-4aab-bc90-8fb29624cd15"
API_BASE = "https://api.comfydeploy.com/api"

# Dynamic brand profiles from catalog
BRANDS_DIR = Path.home() / "clawd" / "ad-ready" / "configs" / "Brands"
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.