Back to skill

Security audit

腾讯首发素材消耗查询

Security checks for vulnerabilities and agentic risk

Overview

The skill’s reporting purpose is coherent, but its setup asks users to share and persist an advertising API key through unsafe chat and command-line flows.

Review this skill before installing. Use it only if you are comfortable granting Tencent Ads reporting access, and avoid pasting API keys into chat. Prefer configuring credentials through a secure local prompt or official provider flow, pin any required npm package version, and verify external Tencent Ads skills and install instructions over HTTPS before running setup commands.

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

T08 · Insecure Dependencies

Warning
Location
SKILL.md:41
Finding

Unpinned Global Installation of a Mutable Dependency

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 41-48
Vulnerability Type: Unpinned global package installation and supply-chain exposure
Risk Level: Medium

Vulnerable Code

powershell
npm list tencentads-cli -g 2>$null

If the package is not installed, the Skill instructs the Agent to execute:

powershell
npm install tencentads-cli@latest -g

Technical Analysis

The setup procedure installs the mutable latest release of tencentads-cli without pinning an audited version or verifying package integrity or provenance. The -g option installs the dependency globally, extending its effects beyond the project directory.

npm packages may execute lifecycle scripts during installation. Consequently, a compromised publisher account, malicious replacement package, or unexpectedly unsafe future release could execute code with the permissions of the user running the Agent. Because latest can resolve to different code over time, the effective dependency is not fixed to the version reviewed with this Skill.

The dependency is relevant to the Skill's advertised functionality, but globally installing an unverified mutable release exceeds the minimum scope necessary. A local, pinned dependency would provide a narrower privilege and impact boundary.

Attack Path

  1. An attacker compromises the package publisher, registry entry, or release process for tencentads-cli.
  2. The attacker publishes a malicious version and assigns it the latest distribution tag.
  3. The Skill's first-use check determines that the CLI is not installed.
  4. The Agent executes npm install tencentads-cli@latest -g.
  5. Malicious package code or an npm lifecycle script executes with the Agent user's privileges.
  6. The installed global package can subsequently affect this Skill and other workflows that invoke the same command.

Impact Assessment

Successful exploitation could permit arbitrary code e ...[truncated 372 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin tencentads-cli to an exact, reviewed version rather than using @latest.
  • Record and verify package integrity metadata or a trusted checksum.
  • Install the package locally in an isolated Skill directory instead of globally.
  • Use a lockfile and a trusted, explicitly configured npm registry.
  • Review package lifecycle scripts and use --ignore-scripts when installation scripts are unnecessary.
  • Require explicit user approval before installing or upgrading executable dependencies.
  • Establish a controlled update process in which new versions are audited before changing the pinned version.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:55
Finding

API Key Collected Through Chat and Exposed in Process Arguments

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 55-70
Vulnerability Type: Insecure secret collection and command-line secret exposure
Risk Level: High

Vulnerable Code

The Skill instructs the user to send the API key to the Agent and then invokes the credential-saving script as follows:

powershell
$authDir = "$env:USERPROFILE\.openclaw\workspace\skills\tencentads-auth"
Set-Location $authDir
node scripts/auth-save-apikey.mjs --api-key <USER_PROVIDED_KEY>

Technical Analysis

The workflow requests that a sensitive API credential be submitted through the conversation and then places the credential directly in a process command-line argument.

Secrets supplied in chat may be retained in conversation history, Agent telemetry, debugging records, or service-side logs. Secrets in command-line arguments may also become visible through process inspection, command logging, terminal history, crash diagnostics, or monitoring tools. This creates multiple unnecessary copies of the credential outside the intended credential file.

Authentication is necessary for the declared reporting functionality, but collecting the key through chat and transporting it in process arguments is not the least-exposure method. The audit could not inspect the separately referenced tencentads-auth Skill, so its storage permissions and redaction behavior are outside the reviewed scope.

Attack Path

  1. The user follows the setup instructions and submits a valid Tencent Ads API key in the conversation.
  2. The Agent constructs a command containing the key in the --api-key argument.
  3. The secret is retained in one or more locations, such as conversation records, Agent execution logs, shell records, or the operating system's process metadata.
  4. A party with access to those records or local process information obtains the key.
  5. The party uses the key to make unauthorized Tencent Ads API requests within the pe ...[truncated 508 chars]
Remediation
View remediation

Remediation Suggestions

  • Do not ask users to submit API keys through ordinary chat messages.
  • Collect the key through a trusted interactive secret prompt with input echo disabled, or through protected standard input.
  • Never include credentials in command-line arguments.
  • Ensure the Agent, shell, and authentication helper redact secrets from logs, errors, telemetry, and command previews.
  • Store the credential using an operating-system secret manager where available.
  • If file-based storage is required, create the file with permissions restricted to the owning user and avoid intermediate plaintext files.
  • Document key rotation and immediate revocation procedures for potentially exposed credentials.
  • Request a minimally scoped, read-only reporting credential where the Tencent Ads authorization model supports it.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:29
Finding

Installation Delegated to Mutable Instructions over Plaintext HTTP

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 29-37
Vulnerability Type: Unsafe external installation source
Risk Level: Medium

Vulnerable Code

The Skill directs the user or Agent to obtain installation instructions from the following address:

text
http://skills.ad.qq.com/install/tencentads.md

It also offers the following website as a manual installation source:

text
https://skills.ad.qq.com/

Technical Analysis

The primary installation instruction references a remotely mutable document using plaintext HTTP. HTTP does not provide transport confidentiality or server authentication, allowing a network-positioned attacker to alter the returned instructions.

Even if the server redirects to HTTPS, relying on an initial plaintext request leaves room for interception before a secure connection is established unless the client independently enforces HTTPS. In addition, the remote document is not version-pinned, signed, or accompanied by an integrity hash. Its commands can therefore change after this Skill has been audited.

The project does not automatically fetch or execute this URL in its included script, so this is not direct embedded remote execution. However, the instructions encourage an Agent or user to retrieve and follow external installation directions, creating a supply-chain path to unreviewed executable components.

Attack Path

  1. The required tencentads-management Skill is absent.
  2. The user follows the documented setup procedure or asks the Agent to follow it.
  3. The installation document is requested over HTTP.
  4. A network-positioned attacker intercepts the response, or the remote document is modified at its origin.
  5. The response supplies altered installation instructions or references a malicious package.
  6. The user or Agent executes those instructions, allowing attacker-controlled code to run with the invoking user's privileges.

Impact A

...[truncated 486 chars]

Remediation
View remediation

Remediation Suggestions

  • Replace every installation URL with an HTTPS URL.
  • Bundle reviewed installation instructions with the Skill instead of delegating setup to mutable remote text.
  • Pin referenced Skills and packages to explicit versions or immutable release identifiers.
  • Verify downloaded artifacts using cryptographic hashes or trusted digital signatures.
  • Require explicit user confirmation before executing commands obtained from an external source.
  • Restrict downloads to an allowlisted domain and reject redirects to unexpected origins.
  • Periodically audit the referenced installation artifacts and document their trusted provenance.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Credential Access

High
Category
Privilege Escalation
Confidence
84% confidence
Finding

Checking for the existence of a local credentials file is itself not inherently malicious, but it is a credential-access pattern that reveals dependency on locally stored secrets and forms part of the unsafe credential acquisition workflow in this skill. In context, it becomes security-relevant because the file check is immediately followed by instructions to obtain the missing secret from the user via chat and save it on disk.

Content

Scanner excerpt · SKILL.md (reported line 53)May include surrounding context.

Step 3:检查 API Key 是否已配置

powershell
Test-Path "$env:USERPROFILE\.tencent-ads\credentials.json"
  • ✅ 存在 → 环境就绪,开始查询

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This section creates a chat-based path for requesting, receiving, and storing a sensitive API credential, which is unsafe because chat channels are not appropriate secret-entry interfaces. In skill context, this is more dangerous because the instructions operationalize the full collection flow: detect missing credentials, prompt the user for the secret, then invoke a save script automatically.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly instructs the agent to ask the user to send a Tencent Ads API Key in chat and then automatically save it locally via a script. Collecting credentials through natural-language conversation and persisting them without strong safeguards, consent boundaries, or secure secret-entry mechanisms creates a direct credential-handling vulnerability and increases the chance of leakage via logs, transcripts, prompt history, or misuse by downstream tools.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 110)May include surrounding context.

md
node scripts/query-first-pub.mjs '{"account_ids":["31079027"],"start_date":"2026-04-01","end_date":"2026-04-30"}'

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This code invokes a child process via execSync to run another script, which is a safety-relevant operation for code files. While the file has a usage header and some progress logging, it does not clearly disclose to the user that running this script will execute a separate subprocess in another skill directory.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The script blindly trusts a file_path returned by the subprocess and reads it from the local filesystem without validating that the path is within an expected output directory or is actually a regular result file. If the downstream script is compromised, buggy, or influenced by untrusted input, this can cause unintended local file reads and leak sensitive data into the skill output or processing pipeline.

Content

No source excerpt is available for this finding.