Back to skill

Security audit

腾讯云官网文档搜索 SKILL

Security checks for vulnerabilities and agentic risk

Overview

This Tencent Cloud documentation-search skill is coherent and disclosed, with some practical caution needed around installing packages and handling cloud login credentials.

Install this only if you are comfortable using Tencent Cloud's CLI locally. Prefer a virtual environment and pinned package versions, use OAuth rather than long-lived AK/SK when possible, avoid running the headless FIFO example on shared machines, and log out or remove ~/.tccli credentials when finished.

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

T08 · Insecure Dependencies

Warning
Location
references/install.md:6
Finding

Unpinned Third-Party Package Installation

Content
View full analysis
Remediation
View remediation
' \ 'tencentcloud-sdk-python==' ``` - Publish a locked requirements file containing cryptographic hashes and install it with `--require-hashes`. - Use an isolated virtual environment rather than modifying a system-wide Python installation. - Explicitly identify the trusted package index and document how users should verify its authenticity. - Establish a controlled dependency-update process that reviews release notes, integrity, provenance, and compatibility before updating pinned versions. - Avoid recommending `-U` unless an upgrade to a specifically reviewed version is required. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
references/auth.md:25
Finding

Predictable Shared Temporary Files in OAuth Authentication Workflow

Content
View full analysis
/tmp/tccli_fifo &) # Keep the write end open tccli auth login --browser no < /tmp/tccli_fifo > /tmp/tccli_out.log 2>&1 & # Read the login link from tccli_out.log, complete authorization, and obtain the verification code: printf '\n' > /tmp/tccli_fifo # Read tccli_out.log to confirm the result, then clean up: rm -f /tmp/tccli_fifo ``` ### Technical Analysis The workflow uses fixed, globally predictable paths in the shared `/tmp` directory: - `/tmp/tccli_fifo` - `/tmp/tccli_out.log` It does not create a private temporary directory, set restrictive permissions, verify ownership or object type, handle an existing path safely, or reliably clean up resources on interruption. If `/tmp/tccli_fifo` already exists, `mkfifo` fails, but the subsequent commands are not conditionally stopped. They may therefore interact with an attacker-created FIFO or another filesystem object. A local attacker capable of opening the FIFO may intercept the verification code, consume authentication input, or disrupt the login process. The shell redirection to `/tmp/tccli_out.log` follows symbolic links and truncates the target before launching the command. A local attacker could pre-create that path as a symbolic link to a file writable by the victim, causing file truncation and subsequent log writes. Depending on the user's `umask`, the log can also be created with permissions that expose the OAuth login URL, state information, errors, and other authentication metadata to other local users. Cleanup only removes the FIFO after the documented happy path. It does not remove the log and does not use a signal or exit trap. ### Attack Path 1. A local attacker predicts the documented `/tmp` pa ...[truncated 1389 chars]
Remediation
View remediation
"$fifo") & tccli auth login --browser no < "$fifo" > "$log" 2>&1 & ``` Additional hardening should include: - Verify that `mktemp -d` succeeds before continuing. - Keep the temporary directory accessible only to its owner. - Quote every generated path. - Avoid fixed filenames directly under a shared directory. - Terminate and wait for background processes during cleanup. - Remove both the FIFO and log on normal exit, errors, and signals. - Avoid printing or retaining authentication metadata longer than necessary. - Explicitly warn users not to run the workflow from a privileged account unless required. ]]>
Vulnerability Patterns
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/auth.md (reported line 28)May include surrounding context.

tccli auth login --browser no < /tmp/tccli_fifo > /tmp/tccli_out.log 2>&1 &

从 tccli_out.log 取链接 → 用户离线授权 → 拿到验证码后回填同一进程:

printf '<验证码>\n' > /tmp/tccli_fifo

读 tccli_out.log 确认结果,清理:rm -f /tmp/tccli_fifo

text

## AK/SK(仅用户主动提供时)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest description and the entire user-facing guidance are written to activate and operate specifically in Chinese context ('在用户需要使用腾讯云官网公共能力时加载', Chinese trigger examples) without offering a language choice or stating that the skill is limited to Chinese-language users. This can violate language/locale policy when the broader agent environment expects language neutrality or user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The entire skill file is written in Chinese and does not indicate that the user can choose another language or that the skill is intentionally limited to a Chinese-speaking or region-specific audience. Under the policy, forcing a specific language without opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file presents all user-facing instructions and examples exclusively in Chinese, which can amount to a language/locale policy issue when no user opt-in or documented locale constraint is provided. The content does not indicate that the skill is region-specific or that users may choose another language.

Content

No source excerpt is available for this finding.