Back to skill

Security audit

Alibabacloud Tair Devtoolset

Security checks for vulnerabilities and agentic risk

Overview

The skill is a real Alibaba Cloud Tair operations toolkit, but it includes under-scoped high-impact workflows and unsafe examples that users should review before installing.

Install only if you intend to let the agent assist with live Alibaba Cloud Tair administration. Use a sandbox or least-privilege RAM role, avoid entering real AccessKey secrets in chat or shell history, pin and verify downloaded tools, review public endpoint creation before running the script, require TLS with full certificate and hostname validation, and take/verify backups before any restore.

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

T09 · Insecure Skill Coding Practices

Error
Location
references/connection-management/connect-with-tls.md:470
Finding

TLS Certificate Validation Bypass

Content
View full analysis
{ if (errors == SslPolicyErrors.RemoteCertificateChainErrors || errors == SslPolicyErrors.RemoteCertificateNameMismatch) { return true; } ``` ### Technical Analysis The certificate-validation callback explicitly returns `true` when the certificate chain is invalid or when the certificate hostname does not match the requested Tair endpoint. These are critical TLS validation failures that must cause the connection to be rejected. Because the callback immediately accepts these error conditions, the subsequent custom CA validation does not protect those execution paths. An attacker can therefore present an untrusted certificate or a certificate issued for a different hostname and still have it accepted by clients based on this example. ### Attack Path 1. A user implements the documented C# TLS connection example. 2. An attacker gains a network interception position, such as through a compromised proxy, DNS response, gateway, or local network. 3. The attacker redirects the client to an attacker-controlled TLS endpoint. 4. The attacker supplies an invalid-chain certificate or one whose subject does not match the Tair hostname. 5. The callback receives `RemoteCertificateChainErrors` or `RemoteCertificateNameMismatch` and returns `true`. 6. The client establishes the connection and sends Tair authentication credentials and database commands to the attacker-controlled endpoint. 7. The attacker captures credentials and may proxy, inspect, alter, or replay database traffic. ### Impact Assessment Successful exploitation can compromise database credentials, confidentiality, and integrity. The attacker may obtain the permissions associated with the s ...[truncated 129 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/cli-installation-guide.md:103
Finding

Cloud Credentials Exposed Through Command-Line Arguments and Plaintext Configuration

Content
View full analysis
\ --access-key-secret \ --region cn-hangzhou ``` ```bash aliyun configure set \ --mode AK \ --access-key-id LTAI5tXXXXXXXX \ --access-key-secret 8dXXXXXXXXXXXXXXXXXXXXXXXX \ --region cn-hangzhou ``` ```json { "current": "default", "profiles": [ { "name": "default", "mode": "AK", "access_key_id": "LTAI5tXXXXXXXX", "access_key_secret": "8dXXXXXXXXXXXXXXXXXXXXXXXX", "region_id": "cn-hangzhou", "output_format": "json", "language": "en" } ] } ``` ```bash aliyun configure set \ --mode StsToken \ --access-key-id LTAI5tXXXXXXXX \ --access-key-secret 8dXXXXXXXXXXXXXXXXXXXXXXXX \ --sts-token v1.0:XXXXXXXXXXXXXXXX \ --region cn-hangzhou ``` ```bash aliyun configure set --access-key-id NEW_KEY --access-key-secret NEW_SECRET ``` ### Technical Analysis The guide recommends supplying AccessKey IDs, AccessKey secrets, and STS tokens directly as command-line arguments. Real values entered this way can be retained in shell history, terminal recordings, CI logs, agent transcripts, or process-monitoring output. The guide also documents that credentials are stored in `~/.aliyun/config.json`. Although this may reflect normal CLI behavior, plaintext credential storage increases the effect of local account compromise or overly permissive file permissions. This guidance conflicts with `SKILL.md:53-56`, which states that the Skill must never ask for AK/SK values or use `aliyun configure set` with literal credentials. ### Attack Path 1. A user follows the documented non-interactive credential configuration procedure. 2. The user substitutes re ...[truncated 959 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:37
Finding

Unpinned and Integrity-Unverified Executable Dependencies

Content
View full analysis
``` ```bash wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz tar -xzf aliyun-cli-linux-latest-amd64.tgz sudo mv aliyun /usr/local/bin/ ``` ```powershell Invoke-WebRequest -Uri "https://aliyuncli.alicdn.com/aliyun-cli-windows-latest-amd64.zip" -OutFile "aliyun-cli.zip" Expand-Archive -Path aliyun-cli.zip -DestinationPath C:\aliyun-cli $env:Path += ";C:\aliyun-cli" [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) ``` ### Technical Analysis The installation instructions retrieve mutable `latest` archives without checking a cryptographic digest or vendor signature. The resulting binary is installed into a privileged executable path. The Skill also enables automatic plugin installation, updates plugins to unspecified latest versions, and invokes `npx` to install another Skill without an immutable version or commit. HTTPS protects transport but does not establish that a mutable artifact is the expected reviewed version. A compromised distribution host, publishing account, package, repository, or release process could replace the downloaded executable after this Skill has been audited. ### Attack Path 1. An attacker compromises a dependency publisher, package account, repository, plugin distribut ...[truncated 1020 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/create-and-connect-test.sh:213
Finding

Predictable Temporary File Enables Symlink-Based File Overwrite

Content
View full analysis
/tmp/tair_instance_id.txt ``` ### Technical Analysis The script writes to a fixed filename in the shared `/tmp` directory. It does not atomically create the file, verify ownership, reject symbolic links, or set restrictive permissions. On a multi-user system, another local user can create `/tmp/tair_instance_id.txt` in advance as a symbolic link to a file writable by the victim. Shell redirection follows that link and truncates the target before writing the instance identifier. The predictable file also unnecessarily exposes a cloud resource identifier to other local users when default permissions permit it. ### Attack Path 1. An attacker with local access predicts the fixed path `/tmp/tair_instance_id.txt`. 2. The attacker creates that path as a symbolic link to a file writable by the future script user. 3. The victim runs `scripts/create-and-connect-test.sh`. 4. Instance creation succeeds and execution reaches line 213. 5. Shell redirection follows the attacker-created symbolic link. 6. The target file is truncated and replaced with the Tair instance ID. 7. Depending on the selected target file, this can corrupt application configuration or other user-owned data. ### Impact Assessment The attacker can overwrite or truncate files writable by the account running the script. If the script is run with elevated privileges, the potential overwrite scope expands to files writable by that privileged account. The fixed file may also disclose the newly created instance identifier. ]]>
Remediation
View remediation
"$INSTANCE_ID_FILE" ``` - Register a cleanup handler with `trap` if the file is not intended to persist. - Store the identifier in memory instead of writing it to disk when no later process needs the file. - Never run the script as root unless strictly required. - If persistent output is required, accept an explicit user-controlled path and create it with exclusive, no-follow semantics. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/create-and-connect-test.sh:188
Finding

Internet-Facing Database Endpoint Created Without Mandatory Authentication

Content
View full analysis
&1 || true) ``` ```bash if ! aliyun r-kvstore modify-security-ips \ --instance-id "$INSTANCE_ID" \ --security-ips "$MY_PUBLIC_IP" \ --security-ip-group-name "benchmark" \ --user-agent AlibabaCloud-Agent-Skills/alibabacloud-tair-devtoolset > /dev/null 2>&1; then ``` ```bash if ! aliyun r-kvstore allocate-instance-public-connection \ --instance-id "$INSTANCE_ID" \ --connection-string-prefix "$CONNECTION_PREFIX" \ --port "6379" \ --user-agent AlibabaCloud-Agent-Skills/alibabacloud-tair-devtoolset > /dev/null 2>&1; then ``` ### Technical Analysis The automated workflow does not pass a password when creating the instance, but subsequently allocates an Internet-facing endpoint on port 6379. Access control therefore depends primarily on the configured source-IP allowlist unless the platform independently enforces account authentication. The script validates `MY_PUBLIC_IP` only with a dotted-decimal regular expression. It does not verify octet ranges, reject unsuitable addresses, establish that the value is a public host address, or warn that the address may represent shared NAT egress. Multiple unrelated users can appear under the same public NAT address. Public endpoint allocation is performed ...[truncated 1085 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
Findings (36)

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/connection-management/connect-cluster.md (reported line 11)May include surrounding context.

Jedis (Java):

xml
<!-- Maven dependency -->
<dependency>
    <groupId>redis.clients</groupId>
    <artifactId>jedis</artifactId>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/connection-management/connect-standalone-or-proxy.md (reported line 11)May include surrounding context.

Jedis (Java):

xml
<!-- Maven dependency -->
<dependency>
    <groupId>redis.clients</groupId>
    <artifactId>jedis</artifactId>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/connection-management/connect-with-tls.md (reported line 13)May include surrounding context.

Jedis (Java):

xml
<!-- Maven dependency -->
<dependency>
    <groupId>redis.clients</groupId>
    <artifactId>jedis</artifactId>

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Several direct-connection TLS examples explicitly disable hostname or peer verification, such as InsecureSkipVerify: true, verify_peer => false, disablePeerVerification(), or certificate callbacks that accept name-mismatch/chain errors. Without a clear warning, users may adopt these snippets as secure defaults, enabling man-in-the-middle attacks despite using TLS.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list includes broad terms such as redis, backup, and tair instance, which are likely to match normal conversation and unintentionally invoke a skill that performs real cloud operations. In this skill’s context, accidental invocation is more dangerous than usual because the documented capabilities include instance creation, whitelist changes, public endpoint allocation, and destructive restore operations.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

The skill instructs users to execute npx skills add ... without pinning an exact package version. That allows whatever version is current at execution time to be fetched and run, creating a supply-chain risk if a malicious or compromised release is published or if behavior changes unexpectedly. In this skill’s context, that is more concerning because the skill also supports real cloud operations, so a compromised helper package could influence high-privilege workflows.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document provides precise instance-creation and script-execution commands for real Alibaba Cloud Tair operations but does not warn that these actions can provision billable resources and modify cloud infrastructure. In the context of an agent skill that executes real cloud operations, this omission increases the chance of unintended spending and environment changes by users or automated agents following the examples verbatim.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 71)May include surrounding context.

Extract and install

tar -xzf aliyun-cli-linux-latest-arm64.tgz sudo mv aliyun /usr/local/bin/

text

### Windows

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/connection-management/connect-with-tls.md (reported line 304)May include surrounding context.

Extract and install

tar -xzf aliyun-cli-linux-latest-arm64.tgz sudo mv aliyun /usr/local/bin/

text

### Windows

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/connection-management/connect-with-tls.md (reported line 796)May include surrounding context.

Extract and install

tar -xzf aliyun-cli-linux-latest-arm64.tgz sudo mv aliyun /usr/local/bin/

text

### Windows

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The guide shows aliyun configure set with secrets passed directly as command-line arguments but does not warn that these values may be captured in shell history, process listings, CI logs, or persisted in ~/.aliyun/config.json. In a skill that enables real cloud operations, exposed access keys could let an attacker create, modify, back up, restore, or delete cloud resources.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 118)May include surrounding context.

md
1. Log in to Aliyun Console: https://ram.console.aliyun.com/
2. Navigate to: AccessKey Management
3. Create a new AccessKey pair
4. Save the secret immediately — it's only shown once

### Configuration Modes

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The environment-variable examples encourage exporting cloud credentials without warning that environment variables can leak through shell history, debug output, child processes, crash reports, CI job logs, or shared session inspection. Because this toolkit performs real Alibaba Cloud operations, leaked credentials could enable unauthorized access to sensitive infrastructure and data.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 404)May include surrounding context.

bash
# Restrict permissions
chmod 600 ~/.aliyun/config.json

Troubleshooting

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document includes example code with explicit usernames and passwords embedded directly in source snippets. Even if these are illustrative, readers often copy patterns verbatim into production code, which encourages hard-coded secrets, plaintext credential storage, and accidental disclosure through repositories, logs, screenshots, or shared documentation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The redis-cli example demonstrates authentication using a plaintext password without warning about exposure risks. Users may paste credentials directly into commands or terminals, leading to disclosure via shell history, terminal logging, process inspection, recorded sessions, or copied transcripts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The examples embed plaintext passwords and account identifiers directly in source snippets across multiple languages, which normalizes hardcoding secrets and creates a high risk that users will copy the pattern into production code or accidentally commit real credentials. In a cloud database connection guide, this is especially risky because the same credentials enable direct access to a remote Tair/Redis instance and could lead to unauthorized data access or modification if exposed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The examples embed realistic-looking passwords, usernames, hosts, and certificate paths without a prominent warning to replace them before use. This increases the risk that operators copy the snippets directly into code, source control, or production workflows, leading to hardcoded secrets, broken deployments, and unsafe credential-handling practices.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document recommends SHUTDOWN NOSAVE as a troubleshooting action for busy Lua script scenarios, and while it adds phrases like 'with caution' and 'with extreme caution', it does not clearly explain that this can immediately discard in-memory writes and cause irreversible data loss or service interruption. In this skill's context, that is especially risky because the toolkit explicitly supports real cloud operations and restoration/administrative actions, so users may treat the guidance as operationally endorsed and execute it in production.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 30)May include surrounding context.

md
# Linux (x64)
curl --connect-timeout 10 --max-time 60 -O https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz
tar xzf aliyun-cli-linux-latest-amd64.tgz
sudo mv aliyun /usr/local/bin/

# Linux (arm64)
curl --connect-timeout 10 --max-time 60 -O https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-arm64.tgz

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 45)May include surrounding context.

md
# Linux (x64)
curl --connect-timeout 10 --max-time 60 -O https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz
tar xzf aliyun-cli-linux-latest-amd64.tgz
sudo mv aliyun /usr/local/bin/

# Linux (arm64)
curl --connect-timeout 10 --max-time 60 -O https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-arm64.tgz

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 58)May include surrounding context.

md
# Linux (x64)
curl --connect-timeout 10 --max-time 60 -O https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz
tar xzf aliyun-cli-linux-latest-amd64.tgz
sudo mv aliyun /usr/local/bin/

# Linux (arm64)
curl --connect-timeout 10 --max-time 60 -O https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-arm64.tgz

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/instance-creation/connect-create-instance.md (reported line 19)May include surrounding context.

md
# Linux (x64)
curl --connect-timeout 10 --max-time 60 -O https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz
tar xzf aliyun-cli-linux-latest-amd64.tgz
sudo mv aliyun /usr/local/bin/

# Linux (arm64)
curl --connect-timeout 10 --max-time 60 -O https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-arm64.tgz

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/instance-creation/connect-create-instance.md (reported line 24)May include surrounding context.

md
# Linux (x64)
curl --connect-timeout 10 --max-time 60 -O https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz
tar xzf aliyun-cli-linux-latest-amd64.tgz
sudo mv aliyun /usr/local/bin/

# Linux (arm64)
curl --connect-timeout 10 --max-time 60 -O https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-arm64.tgz

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/instance-creation/connect-create-instance.md (reported line 46)May include surrounding context.

md
# Linux (x64)
curl --connect-timeout 10 --max-time 60 -O https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz
tar xzf aliyun-cli-linux-latest-amd64.tgz
sudo mv aliyun /usr/local/bin/

# Linux (arm64)
curl --connect-timeout 10 --max-time 60 -O https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-arm64.tgz

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
references/connection-management/connect-standalone-or-proxy.md:37