Back to skill

Security audit

Group Director

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does the advertised video-generation job, but its configurable API endpoint can send the SenseAudio API key and video prompts to any URL set in the environment.

Install only if you trust the publisher and the runtime environment that sets variables. Keep SENSEAUDIO_BASE_URL unset or set only to the real HTTPS SenseAudio host, use a scoped/rotatable API key, and treat finalized video prompts as data that will be sent to the provider.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/video_api.py:29
Finding
Unrestricted API Base URL Override Can Disclose Credentials and Video Prompts<![CDATA[ ## Vulnerability Details **File Location**: `scripts/video_api.py`, lines 29–81 **Vulnerability Type**: Unvalidated authenticated endpoint configuration **Risk Level**: Medium ### Vulnerable Code ```python class SenseAudioVideoClient: def __init__(self) -> None: self.base_url = os.environ.get("SENSEAUDIO_BASE_URL", DEFAULT_BASE_URL).rstrip("/") self.api_key = os.environ.get("SENSEAUDIO_API_KEY", "").strip() self.model = DEFAULT_MODEL if not self.api_key: raise RuntimeError("Missing configuration: SENSEAUDIO_API_KEY") def _headers(self) -> Dict[str, str]: return { "Authorization": f"Bearer {self.api_key}", "Content-Type": "application/json", } def create_video(self, request: VideoRequest) -> str: prompt = (request.final_video_prompt or "").strip() if not prompt: raise RuntimeError("final_video_prompt must not be empty") payload = { "model": self.model, "content": [{"type": "text", "text": prompt}], "duration": DEFAULT_DURATION, "resolution": DEFAULT_RESOLUTION, "ratio": request.ratio, "provider_specific": {"generate_audio": True}, } resp = requests.post( f"{self.base_url}/v1/video/create", headers=self._headers(), json=payload, timeout=60, ) ``` The same unrestricted base URL is also used for status requests: ```python resp = requests.get( f"{self.base_url}/v1/video/status", headers=self._headers(), params={"id": clean_task_id}, timeout=30, ) ``` ### Technical Analysis The `SENSEAUDIO_BASE_URL` environment variable is accepted without validating its scheme, hostname, port, or destination. The client subsequently sends the `SENSEAUDIO_API_KEY` as a bearer token to that endpoint. Video-creation requests also transmit the complete finalized video prompt. Con ...[truncated 2053 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Enforce HTTPS for all provider endpoints: - Parse the configured URL with `urllib.parse.urlparse`. - Reject every scheme other than `https`. - Reject URLs containing user-information, fragments, or unexpected query parameters. 2. Allowlist trusted provider hostnames: - Permit `api.senseaudio.cn` by default. - If alternative provider hosts are required, maintain an explicit administrator-controlled allowlist. - Validate the normalized hostname rather than using suffix or substring matching. 3. Restrict destination ports to `443` unless a separately reviewed deployment explicitly requires another port. 4. Reject loopback, link-local, private, multicast, and reserved IP destinations where custom hosts are supported. Resolve hostnames and apply destination checks to reduce private-network request risks. 5. Do not send production credentials to arbitrary custom endpoints. Use separate scoped credentials for test or self-hosted environments. 6. Apply least privilege and credential rotation: - Scope the API key to only the video operations required by this skill. - Configure provider-side quota and usage limits. - Rotate the key immediately if an untrusted base URL may have been used. 7. Add automated tests confirming rejection of: - Plaintext HTTP URLs. - Unapproved external hosts. - Loopback and private-network destinations. - URLs containing embedded credentials or unexpected ports. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding
The specification claims tightly constrained behavior, but the file also describes outputs and capabilities that are broader or inconsistent, including raw CLI status/task output and a status-query flow not reflected in the declared purpose. Security-relevant mismatches between declared and actual behavior undermine trust controls, make policy enforcement harder, and can lead downstream agents to expose internal state or operate outside intended constraints.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
- failed -> prints a plain-text failure message
- timeout -> prints a plain-text timeout message

## Feishu return rule

When Claw sends the result back to Feishu/Lark:
- use a normal message
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
94% confidence
Finding
The skill invokes environment variables and external network access to a third-party API, but it declares no explicit tool scope or permission boundaries. That makes the capability surface opaque to the orchestrator and reviewers, increasing the risk of overbroad execution, secret exposure, or unintended network use if the skill is reused or modified.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- Assume Claw already has enough context from its own memory and recent reading.
- Do not ask extra questions in normal group-director use.
- Do not ask the user to repeat or recap the group chat.
- Do not read Feishu/Lark history inside this skill.
- Do not summarize group chat inside this skill.
- Treat `final_video_prompt` as already finalized by Claw.
Confidence
80% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The example command hard-codes a Chinese prompt placeholder, which indicates the skill is oriented toward Chinese-language use. Elsewhere the file also references Chinese integration rules and provides Chinese-only output examples, but it does not offer a user language choice or document a justified locale restriction.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The only 'Good style' response example is in Chinese, which suggests the skill expects responses in a fixed language. The file does not provide an opt-in, alternative locale handling, or a justification that this skill must always respond in Chinese.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The section '发回飞书的规则' and its example prescribe that the final message sent back should be in normal natural language, and the entire instruction is written as Chinese-only guidance with a Chinese example. There is no indication that users may choose another language or that the Chinese locale is required by a documented region-specific constraint.

Intent-Code Divergence

Medium
Confidence
94% confidence
Finding
The skill metadata requires the model be fixed to `seedance-pro-1.5`, but the code hardcodes `Seedance-Pro-1.5`. If the upstream API treats model identifiers as case-sensitive, the wrong model may be selected or the request may fail, breaking the documented safety/behavior contract of the skill.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
This Python code sends user-provided prompt content and task identifiers to an external API via `requests.post` and `requests.get`, but there is no confirmation prompt, user-facing log/print, or explanatory comment/docstring disclosing that data is being transmitted off-box. Because network transmission of user data is a safety-relevant operation for code files, the absence of any visible warning meets the missing-warning criterion.

Tainted flow: 'clean_task_id' from requests.post (line 74, network input) → requests.get (network output)

Medium
Category
Data Flow
Content
clean_task_id = (task_id or "").strip()
        if not clean_task_id:
            raise RuntimeError("task_id 不能为空")
        resp = requests.get(
            f"{self.base_url}/v1/video/status",
            headers=self._headers(),
            params={"id": clean_task_id},
Confidence
65% confidence
Finding
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Natural-Language Policy Violations

Low
Confidence
94% confidence
Finding
Multiple raised error messages and status strings are hard-coded in Chinese, which imposes a specific language on users without offering a choice or documenting that the skill is intended only for a Chinese-speaking context. This matches the language/locale policy violation category for natural-language content in code files.

Static analysis

No suspicious patterns detected.