Back to skill

Security audit

Giggle Generation Video

Security checks for vulnerabilities and agentic risk

Overview

The skill’s video-generation purpose is clear, but its API client may expose the Giggle API key if the service redirects requests off-site.

Review before installing. Use a dedicated Giggle API key with limited quota if possible, avoid submitting sensitive prompts or private images, and treat returned signed video links as temporary private access links. The publisher should disable redirects or validate same-origin redirects on authenticated requests and pin dependencies before this is considered routine-risk.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generation_api.py:101
Finding
API Key Disclosure Through Cross-Origin HTTP Redirects<![CDATA[ ## Vulnerability Details **File Location**: `scripts/generation_api.py:101-106, 166-182` **Vulnerability Type**: Sensitive authentication header forwarded through redirects **Risk Level**: Medium ### Vulnerable Code ```python def __init__(self, api_key: str): self.api_key = api_key self.headers = { "x-auth": api_key, "Content-Type": "application/json" } ``` ```python def _post(self, path: str, payload: Dict[str, Any]) -> Dict[str, Any]: url = f"{self.BASE_URL}{path}" try: resp = requests.post(url, headers=self.headers, json=payload, timeout=30) resp.raise_for_status() result = resp.json() if result.get("code") != 200: raise Exception(result.get("msg", result.get("message", "未知错误"))) return result except requests.exceptions.RequestException as e: raise Exception(f"请求失败: {str(e)}") def query_task(self, task_id: str) -> Dict[str, Any]: """查询任务状态""" url = f"{self.BASE_URL}{self.QUERY_TASK}" try: resp = requests.get( url, headers=self.headers, params={"task_id": task_id}, timeout=30 ) ``` ### Technical Analysis The Skill must transmit `GIGGLE_API_KEY` to `https://giggle.pro` to authenticate video-generation operations, so sending the credential to that declared service is necessary for the advertised functionality. However, the credential is placed in the custom `x-auth` header, and both Requests calls use the library's default redirect behavior. Redirects are followed automatically because `allow_redirects=False` is not specified. Requests has special handling for removing the standard `Authorization` header when redirecting across origins, but an application-defined authentication header such as `x-auth` does not receive equivalent protection automatically. Consequently, a cross-origin redirect may cause the API key to be sent to the redirected host. This exceeds minimum ...[truncated 1429 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Disable redirects on authenticated API requests: ```python resp = requests.post( url, headers=self.headers, json=payload, timeout=30, allow_redirects=False, ) ``` ```python resp = requests.get( url, headers=self.headers, params={"task_id": task_id}, timeout=30, allow_redirects=False, ) ``` 2. Treat any redirect as an error unless it is explicitly required by the API contract. 3. If redirects must be supported, process them manually and validate all of the following before issuing another request: - The scheme remains `https`. - The hostname exactly matches an approved allowlist. - The destination port is approved. - No user-information component is present in the URL. 4. Remove `x-auth` before following any cross-origin redirect, even when the new host is otherwise trusted. 5. Store the API key only in the environment and avoid including it in exceptions, logs, or command output. 6. Add an automated test that redirects an authenticated request to a local second origin and verifies that the second origin never receives `x-auth`. ]]>

T08 · Insecure Dependencies

Note
Location
requirements.txt:3
Finding
Unbounded Dependency Version Reduces Build Reproducibility<![CDATA[ ## Vulnerability Details **File Location**: `requirements.txt:3` **Vulnerability Type**: Unbounded third-party dependency version **Risk Level**: Low ### Vulnerable Code ```text requests>=2.31.0 ``` ### Technical Analysis The dependency declaration specifies only a minimum version and does not impose an upper bound or exact version. As a result, separate installations can resolve to different future releases that were not included in this audit. No evidence was found that the declared `requests` package is malicious, misspelled, or currently vulnerable. The concern is supply-chain hardening and reproducibility: a future compromised, incompatible, or behavior-changing release could be selected automatically without a corresponding change to the Skill package. ### Attack Path 1. A future release satisfying `requests>=2.31.0` becomes compromised or introduces a security regression. 2. A user installs the Skill in a fresh environment. 3. The package resolver selects that later release because the requirement has no upper bound or exact pin. 4. The affected package is installed and imported by `scripts/generation_api.py`. 5. Malicious or vulnerable dependency behavior executes with the privileges of the user running the Skill. This is a conditional supply-chain path. The audited files do not demonstrate that such a compromised release currently exists. ### Impact Assessment Potential impact depends on the behavior of a hypothetical affected dependency release. Because Python package installation and import occur with the invoking user's privileges, a malicious package release could theoretically access process-visible files, environment variables such as `GIGGLE_API_KEY`, and network resources available to that user. There is no evidence of current exploitation, local privilege escalation, or a malicious dependency in the reviewed project. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `requests` and its transitive dependencies to reviewed versions. 2. Generate and verify cryptographic hashes, for example through a lock file or a hash-enforced requirements file. 3. Install dependencies with hash verification enabled: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 4. Use an automated dependency-update process that performs vulnerability scanning and review before changing pinned versions. 5. Periodically refresh the lock file so security fixes can be adopted without allowing unreviewed releases to enter builds automatically. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (11)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
| Plain text with error | Forward to user as-is |
| JSON `{"status": "processing", "task_id": "..."}` | Tell user "Still in progress, please ask again in a moment" |

**Link return rule**: Video links in results must be **full signed URLs** (with Policy, Key-Pair-Id, Signature query params). Keep as-is when forwarding.

---
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill requires environment access and makes outbound network requests, but it does not declare an explicit tool scope such as permissions or allowed-tools. This weakens least-privilege controls and makes it harder for a host agent to constrain execution, increasing the blast radius if the skill is misused or modified.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill sends user prompts, reference-image URLs or base64 data, and generation requests to a third-party API, but it does not clearly warn the user about this disclosure. Users may unknowingly transmit sensitive text or images to an external service, creating privacy and data-governance risks.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill instructs the agent to forward full signed video URLs, including access-control query parameters, directly to the user without any warning or handling guidance. Signed URLs act as bearer tokens; exposing them broadly can enable unintended access, resharing, or leakage of generated content until they expire.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
L32 明示该文件内容为“简体中文”,且后续交互指引与示例消息全部要求以中文进行,没有说明可根据用户偏好切换语言。按照语言/locale 政策,若未提供用户选择或明确的地区性合理说明,强制单一语言属于自然语言策略违规。

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill instructs users to provide reference images via URL or base64 and submit them to an external video-generation API, but it does not clearly warn that the image content will be transmitted to a third-party service. This creates a privacy and data-handling risk, especially if users provide sensitive personal, proprietary, or internal images assuming processing is local.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
This code file contains natural-language descriptions and CLI output that force a specific language/locale for users, beginning with the module docstring and continuing throughout the interface. The policy specifically flags language/locale constraints when there is no user opt-in or documented justification for being region-specific.

External Transmission

Medium
Category
Data Exfiltration
Content
def _post(self, path: str, payload: Dict[str, Any]) -> Dict[str, Any]:
        url = f"{self.BASE_URL}{path}"
        try:
            resp = requests.post(url, headers=self.headers, json=payload, timeout=30)
            resp.raise_for_status()
            result = resp.json()
            if result.get("code") != 200:
Confidence
80% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Intent-Code Divergence

Low
Confidence
87% confidence
Finding
Lines L190-L193 state that the agent must introduce available models and wait for an explicit user choice before continuing. However, earlier documentation provides direct execution examples using a default model without requiring prior model selection, which is an active contradiction in the skill's own guidance.

Unpinned Dependencies

Low
Category
Supply Chain
Content
# giggle-generation-video 依赖包

requests>=2.31.0
Confidence
97% confidence
Finding
The dependency is specified as `requests>=2.31.0`, which allows any newer release to be installed and makes builds non-reproducible. This can unintentionally introduce vulnerable or breaking versions later, especially for a network-facing skill that is likely to make outbound HTTP requests.

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
93% confidence
Finding
The manifest references `requests` without pinning an exact version, so it is impossible to verify from this file whether the installed package includes fixes for known advisories. Because this skill likely performs remote network operations for video generation APIs, an affected `requests` version could expose credentials, weaken TLS/request handling, or otherwise increase attack surface.

Static analysis

No suspicious patterns detected.