Back to skill

Security audit

TencentCloud Text AIGC Detection

Security checks for vulnerabilities and agentic risk

Overview

This skill is a Tencent Cloud text AI-detection wrapper that sends user-provided text to Tencent Cloud, which matches its stated purpose but needs privacy and credential caution.

Before installing, understand that text you provide, including contents of any file path you pass, may be sent to Tencent Cloud using your Tencent Cloud credentials. Avoid submitting sensitive or regulated content unless that is acceptable for your use case, use narrowly scoped or temporary Tencent Cloud credentials, and consider pinning the SDK version in a virtual environment.

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

T08 · Insecure Dependencies

Warning
Location
SKILL.md:232
Finding

Unpinned Third-Party SDK Installation Creates a Supply-Chain Risk

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 232-237
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: Medium

Vulnerable Code

markdown
## Dependencies

- Python 3.7+
- `tencentcloud-sdk-python` (Tencent Cloud SDK)

Install the dependency manually:

```bash
pip install tencentcloud-sdk-python
text

### Technical Analysis

The Skill instructs the Agent to install `tencentcloud-sdk-python` from the default Python package index without specifying an audited version, validating package hashes, using a lock file, or constraining the package source.

Consequently, the code installed during different Skill executions may change without any corresponding change to the reviewed Skill package. If a future package release or its distribution channel is compromised, malicious installation or import-time code could execute with the privileges of the Agent process.

This risk is particularly relevant because the SDK is imported by `scripts/main.py` after the user configures Tencent Cloud credentials. A compromised dependency could access environment variables including `TENCENTCLOUD_SECRET_ID`, `TENCENTCLOUD_SECRET_KEY`, and the optional `TENCENTCLOUD_TOKEN`.

The audit found no evidence that the currently named package is malicious. The vulnerability is the uncontrolled dependency acquisition process.

### Attack Path

1. An attacker compromises the upstream SDK package, a maintainer account, or the package distribution channel.
2. A malicious package version is published under the expected package name.
3. The Agent follows the Skill instruction and runs:
   ```bash
   pip install tencentcloud-sdk-python
  1. Because no version or hash is pinned, the package manager retrieves the uncontrolled malicious release.
  2. Malicious code executes during installation or when scripts/main.py imports the SDK.
  3. The malicious dependency operates with the Agent process's permissions and may read configured cloud cred ...[truncated 752 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the dependency to a specifically reviewed version:

    bash
    python3 -m pip install "tencentcloud-sdk-python==AUDITED_VERSION"
    
  2. Generate and maintain a lock file containing cryptographic hashes. Install with hash verification, for example:

    bash
    python3 -m pip install --require-hashes -r requirements.txt
    
  3. Configure an explicitly trusted package index or an internally controlled package mirror rather than relying implicitly on the environment's default index.

  4. Review dependency updates before changing the pinned version. Include vulnerability scanning and provenance verification in the update process.

  5. Install the SDK in an isolated virtual environment with only the permissions required to invoke the moderation API.

  6. Use short-lived Tencent Cloud credentials with a narrowly scoped policy that permits only the required TextModeration operation. Avoid broad, permanent cloud credentials.

  7. Ensure credentials are introduced only at runtime and are not exposed during dependency installation where operationally possible.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs the agent to execute automatically without confirmation, yet it does not warn that the supplied text will be transmitted to Tencent Cloud for third-party analysis. This is dangerous because users may unknowingly disclose sensitive, proprietary, or regulated text to an external provider without informed consent.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill documents behaviors that require access to environment variables and local files, but it does not declare an explicit tool scope such as allowed-tools or permissions. That creates a governance gap: an agent runtime may permit broader access than users expect, and sensitive local files or secrets could be accessed implicitly when the skill is invoked.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The trigger conditions are broad enough to match ordinary requests about whether text is authentic or AI-written, increasing the chance of automatic execution in situations the user did not intend. Because the skill can read files and submit content to an external service, overbroad triggering can cause unintended data handling and surprising behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file describes sending text content to a remote moderation endpoint and includes optional User and Device fields such as IP, MAC, TokenId, DeviceId, and IMEI. The document does not warn that submitted content and identifiers leave the local environment and may involve sensitive personal or device data, which is a user-impacting behavior relevant to privacy.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill sends user-supplied text to Tencent Cloud's remote TextModeration API, but the CLI flow does not provide an explicit disclosure or consent step warning that the input will leave the local environment. This creates a real privacy and data-handling risk, especially if users pass sensitive documents, credentials, or regulated content assuming the tool operates locally.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The file presents all instructions and examples exclusively in Chinese, which can constitute a language/locale policy issue when no user choice or justification is provided. The document does not indicate that the skill is region-specific or that Chinese is an intentional, documented constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The example shows creating cloud credentials and sending data to tms.tencentcloudapi.com, but the surrounding documentation does not explicitly warn readers that the sample performs a remote network request using cloud account secrets. For markdown files, omission of warnings about behaviors affecting privacy or system integrity is in scope.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.