Back to skill

Security audit

电商广告合规预检|AI-HIVE

Security checks for vulnerabilities and agentic risk

Overview

The skill is not clearly malicious, but it mixes compliance-review branding with broad, potentially billable AI-HIVE media generation and risky API-key handling.

Review this skill before installing if you expect a narrow compliance checker. Only use it with ad materials you are authorized to upload, avoid custom AI_HIVE_BASE_URL values unless you fully trust the endpoint, prefer environment-based short-lived API keys over the init command's plaintext config file, and confirm cost-bearing generation parameters before running image or video commands.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/imagegen.py:92
Finding

Bearer API Credential Can Be Redirected to an Arbitrary Server

Content
View full analysis
Remediation
View remediation
str: value = value.rstrip("/") parsed = urlparse(value) origin = f"{parsed.scheme}://{parsed.netloc}" if parsed.scheme != "https": raise SystemExit("Authenticated API requests require HTTPS.") if origin not in ALLOWED_API_ORIGINS and not allow_unsafe_dev_endpoint: raise SystemExit("Unapproved API origin.") return value ``` ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/imagegen.py:638
Finding

Long-Lived API Key Is Persisted in a Plaintext Configuration File

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/imagegen.py:665
Finding

Generic API Entry Point Exposes Capabilities Beyond the Restricted Skill Interface

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (22)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The Chinese-language description promises receipt of compliance inputs and production of risk findings, evidence gaps, and review checklists, but the documented commands instead center on generate/task/upload workflows and even mention user/account information retrieval. That discrepancy can mislead operators into exposing credentials, files, and network access under the assumption of narrow compliance review, when the real behavior is much broader and potentially billable.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The Chinese-language description promises receipt of compliance inputs and production of risk findings, evidence gaps, and review checklists, but the documented commands instead center on generate/task/upload workflows and even mention user/account information retrieval. That discrepancy can mislead operators into exposing credentials, files, and network access under the assumption of narrow compliance review, when the real behavior is much broader and potentially billable.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The Chinese-language description promises receipt of compliance inputs and production of risk findings, evidence gaps, and review checklists, but the documented commands instead center on generate/task/upload workflows and even mention user/account information retrieval. That discrepancy can mislead operators into exposing credentials, files, and network access under the assumption of narrow compliance review, when the real behavior is much broader and potentially billable.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill is presented as an ecommerce ad-compliance precheck tool, but the implementation is a general-purpose AI Hive client for chat, media upload, and image/video generation. This capability mismatch is dangerous because users or orchestrators may grant the skill trust, permissions, or workflow placement appropriate for compliance review while it actually performs unrelated content generation and external data transfer.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The embedded skill configuration brands the command as '电商广告合规预检', but the operational path in skill_generate simply forwards user prompts and optional images to an image-generation model. In context, this is especially risky because a supposedly safety/compliance-oriented skill can instead be used to create marketing assets, potentially bypassing governance or misleading reviewers about what the tool actually does.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file is presented as an ecommerce ad-compliance precheck skill, but its actual behavior is a generic AI-Hive client that can chat, upload media, generate images/videos, poll jobs, and download outputs. This capability mismatch is dangerous because callers, reviewers, or policy layers may grant the skill broader trust or data access under the assumption it only performs compliance analysis, enabling unauthorized content generation and external data transfer.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The embedded SKILL_CONFIG advertises '电商广告合规预检' and related compliance-checking keywords, but the code path selected by build_skill_parser()/skill_generate() forwards user input into video generation models. This is dangerous because orchestrators may invoke the skill for safety/compliance work while the implementation instead performs content creation and media handling, undermining least-privilege and trust boundaries.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill documents executable capabilities involving environment variables, filesystem access, networking, and shell-driven media processing, but does not declare any explicit tool scope or permission boundaries. That omission weakens governance and increases the chance that an agent invokes broad capabilities without user-visible constraints, especially because the skill also handles uploads, downloads, and local media processing.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The markdown file explicitly lists '平台规则' as a standalone activation phrase. On its own, this phrase can refer to many generic platform-policy questions unrelated to ecommerce ad compliance precheck, making unintended invocation more likely.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest centers the skill on compliance review: checking ad copy/materials, identifying risky claims, evidence gaps, and review items before publication. However, the documentation expands scope to turning reference cases into original content and delivering scripts, prompts, code, task plans, and stable content production for marketing/social media scenarios, which is a materially broader content-production function than compliance precheck.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This condition describes a very wide range of business contexts rather than a specific trigger for this skill. Because it lacks clear constraints tying invocation to compliance precheck tasks, it could match many ordinary content-production requests that should not activate this skill.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Including image and video generation workflows inside a skill framed as compliance precheck increases the chance of unintended or over-broad invocation, especially where generation is billable and involves network uploads/downloads. In context, this is more dangerous because compliance tools are usually granted higher trust as advisory/safety functions, so bundling generation into the same surface can bypass user expectations.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest says the skill should receive ad materials and rules, then return high-risk expressions, evidence gaps, platform risks, replacement suggestions, and a manual review checklist. The output format here additionally promises scripts, prompts, shot lists, image lists, code commands, and full task records, which are broader production artifacts than a compliance precheck would ordinarily need to provide.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The default prompt hard-codes Chinese output and a specific production-ready workflow style without reflecting user language preference or opt-in. This can mis-handle user expectations, reduce transparency, and increase the chance that users unknowingly receive operational commands or compliance guidance in a format they did not request.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest allows implicit invocation without defining narrow trigger constraints, which can cause the skill to activate in situations the user did not clearly intend. In a compliance-related skill that may generate workflow steps and runnable commands, this increases the risk of unreviewed invocation, unintended data handling, or users being steered into a specialized workflow without explicit consent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file introduces a general-purpose ffmpeg editing utility inside a skill whose declared purpose is ad-compliance precheck, materially expanding the skill's capabilities beyond its stated scope. This scope mismatch can enable unauthorized media transformation workflows and increases operational risk because users or downstream agents may invoke editing behavior that was never justified, reviewed, or constrained by the compliance-focused skill design.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/edit_video.py (reported line 20)May include surrounding context.

python
def run(args: list[str]) -> None:
    print(" ".join(args))
    subprocess.run(args, check=True)


def main() -> None:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring and user-facing CLI guidance are written entirely in Chinese, and the script's prompts, errors, and help text continue this language requirement throughout the file. This imposes a specific language/locale on users without any visible opt-in or alternative, which matches the policy's language-choice concern.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file exposes generic chat and video-generation capabilities unrelated to the advertised ad-compliance precheck purpose. Extra capabilities increase attack surface and create a confused-deputy risk: an agent invoking a narrowly scoped compliance skill may unintentionally gain access to broad external-generation and upload functionality.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This code file contains natural-language descriptions that present the skill entirely in Chinese, including the top-level docstring and CLI-facing help text. Under the policy, forcing a specific language without offering a user choice or documenting a justified locale constraint is a language/locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file includes user-visible strings such as error messages, prompts, and status updates exclusively in Chinese throughout the CLI workflow. Because the skill does not offer language selection or an explicit locale-specific justification, this is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The standalone skill entrypoint exposes direct media generation, task inspection, and upload operations that are not justified by a compliance-precheck use case. In this context, the extra capabilities expand the attack surface and can be abused to create or move advertising assets through an approved compliance workflow, rather than merely assess them.

Content

No source excerpt is available for this finding.