Back to skill

Security audit

腾讯混元生图能力

Security checks for vulnerabilities and agentic risk

Overview

This image-generation skill is mostly coherent, but it needs review because it uses cloud credentials and includes guidance that appears to work around provider content filters.

Install only if you are comfortable sending prompts to Tencent Cloud and storing generated images plus info.json metadata locally. Use a dedicated, least-privileged Tencent Cloud key, run in an isolated Python environment, avoid sensitive prompts or proprietary reference material, and do not rely on the documented content-filter workaround guidance.

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

T08 · Insecure Dependencies

Warning
Location
SKILL.md:24
Finding

Unpinned Tencent Cloud SDK Installation in Skill Documentation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:24-26
Vulnerability Type: Unpinned third-party dependency
Risk Level: Medium

Vulnerable Code:

bash
pip install tencentcloud-sdk-python

Technical Analysis

The documented installation command retrieves the current version of tencentcloud-sdk-python without an exact version constraint or an integrity hash. Consequently, the code installed by users can change after the Skill has been reviewed.

Package installation and subsequent SDK imports can execute third-party code with the privileges of the user running the Skill. The script also gives the SDK access to TENCENT_SECRET_ID and TENCENT_SECRET_KEY, making dependency integrity especially important.

This is a supply-chain hardening issue. There is no evidence in the audited project that the currently published SDK is malicious, but the mutable installation instruction leaves users exposed to a compromised package release or publisher account.

Attack Path

  1. An attacker compromises the package publisher, distribution account, or upstream release process.
  2. The attacker publishes a malicious version under the legitimate package name.
  3. A user follows the documented unpinned installation command.
  4. Package installation or import-time code executes with the user's local privileges.
  5. The malicious dependency reads credentials or other process-accessible data and exfiltrates it, or performs arbitrary actions permitted to the user.

Impact Assessment

Successful exploitation could provide code execution with the privileges of the user installing or running the Skill. Potentially exposed assets include Tencent Cloud credentials, submitted prompts, generated image metadata, and any local files accessible to that user. The cloud impact would be bounded by the permissions assigned to the affected Tencent credentials.

Remediation
View remediation

Remediation Suggestions

  • Pin tencentcloud-sdk-python to a reviewed exact version.
  • Publish a requirements or lock file containing cryptographic hashes.
  • Install with hash verification, such as pip install --require-hashes -r requirements.txt.
  • Use an isolated virtual environment rather than the system Python environment.
  • Establish a dependency update process that includes release review and security scanning.
  • Assign the Tencent credentials only the API permissions required for Hunyuan image generation.

T08 · Insecure Dependencies

Warning
Location
package.yaml:9
Finding

Unpinned Tencent Cloud SDK Installation in Package Configuration

Content
View full analysis

Vulnerability Details

File Location: package.yaml:9-13, 19-21
Vulnerability Type: Unpinned third-party dependency
Risk Level: Medium

Vulnerable Code:

yaml
packages:
  - name: tencentcloud-sdk-python
    install: pip install tencentcloud-sdk-python

install:
  steps:
    - run: pip install tencentcloud-sdk-python

Technical Analysis

The package manifest declares and installs tencentcloud-sdk-python without an exact version or package hash. Automated installation therefore resolves a mutable package release that may differ from the dependency version originally reviewed with this Skill.

Because the SDK is imported by scripts/generate.py and receives Tencent Cloud credentials, a compromised dependency could execute code and access sensitive environment variables. No malicious dependency behavior is present in the audited source itself; the risk arises from the absence of dependency pinning and integrity verification.

Attack Path

  1. An attacker gains control of, or compromises, the legitimate dependency's release channel.
  2. A malicious latest release is uploaded to the package repository.
  3. The Skill installer executes the command from package.yaml.
  4. The package manager downloads and installs the attacker-controlled release.
  5. Malicious installation or import-time code executes as the installing user.
  6. The dependency may steal Tencent credentials, access local data, or perform other actions available to the process.

Impact Assessment

Exploitation could result in arbitrary code execution under the installing user's account. It could compromise TENCENT_SECRET_ID, TENCENT_SECRET_KEY, image prompts, generated output, and other user-readable resources. Any resulting Tencent Cloud access would be limited by the IAM privileges attached to the credentials, so narrowly scoped credentials reduce—but do not eliminate—the impact.

Remediation
View remediation

Remediation Suggestions

  • Replace the unbounded install command with installation from a version-pinned requirements or lock file.
  • Require cryptographic hashes for every downloaded distribution.
  • Ensure the package manifest and documentation reference the same reviewed SDK version.
  • Run dependency scanning whenever the pinned version is updated.
  • Perform installation and execution in an isolated, non-privileged environment.
  • Use a dedicated Tencent Cloud identity restricted to the minimum Hunyuan image-generation permissions.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill documents capabilities that require environment-variable access, network access to Tencent Cloud, and local file output, but it does not declare an explicit tool/permission scope. That weakens user awareness and policy enforcement, making it easier for an agent to invoke external services or write files without clear prior consent boundaries.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill requires cloud credentials and sends prompts to a third-party image-generation API, but the documentation does not clearly foreground the privacy and data-transmission implications. Users may unknowingly submit sensitive prompts or reference-image content to an external provider under their own cloud account.

Content

No source excerpt is available for this finding.

Ssd 2

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill advises users to rephrase blocked prompts using descriptive substitutes to obtain content that direct names would cause the provider to reject. This is guidance for evading provider safety controls, which can facilitate generation of disallowed or policy-sensitive content.

Content

No source excerpt is available for this finding.

Ssd 2

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The best-practices section generalizes the same paraphrasing technique, normalizing circumvention of content filters as a recommended workflow. Repetition in a prescriptive section increases the likelihood that downstream agents or users will treat moderation evasion as intended behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description and setup notes require Chinese comprehension, including the skill description and credential instructions. This enforces a specific language/locale for users without offering an alternative or opt-in, which matches the language policy violation criteria.

Content

No source excerpt is available for this finding.

Tainted flow: 'info_path' from os.environ.get (line 190, credential/environment) → open (file write)

Medium
Category
Data Flow
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.

Content

Scanner excerpt · scripts/generate.py (reported line 191)May include surrounding context.

python
# 保存任务信息
    info_path = output_dir / "info.json"
    with open(info_path, "w", encoding="utf-8") as f:
        json.dump(final_result, f, ensure_ascii=False, indent=2)
    
    # 下载图片

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The documentation says outputs are saved locally, including an info.json containing expanded prompt details, but it does not clearly warn that potentially sensitive prompt-derived metadata will persist on disk. This can create unintended local data exposure, especially on shared systems or synced folders.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.