Back to skill

Security audit

Volcengine RDS Mysql

Security checks for vulnerabilities and agentic risk

Overview

This looks like a read-oriented Volcengine RDS helper, but it should be reviewed because it uses cloud credentials and allows an under-documented custom API endpoint that could redirect signed requests.

Install only if you intend to let an agent query Volcengine RDS/VPC metadata with your cloud credentials. Use least-privilege read-only credentials, avoid passing --endpoint unless you fully trust and validate the destination, and confirm cloud lookups before running the script in sensitive accounts.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/call_rds_mysql.py:70
Finding

Unrestricted API Endpoint Override Can Redirect Authenticated SDK Requests

Content
View full analysis

Vulnerability Details

File Location: scripts/call_rds_mysql.py:70-71, 440, 476
Vulnerability Type: Unrestricted authenticated API endpoint override
Risk Level: Medium

Complete Code Snippet:

python
if self.endpoint:
    configuration.host = self.endpoint
python
parser.add_argument("--endpoint", dest="endpoint", help="API 端点(可选)")
python
client = RDSMySQLClient(region=args.region, endpoint=args.endpoint)

Technical Analysis

The command-line --endpoint value is assigned directly to the RDS SDK's configuration.host without validating its scheme, hostname, resolved address, or destination network. The same client configuration contains the Volcengine access key and secret key used to sign API requests.

Consequently, anyone able to influence script arguments can redirect signed RDS API requests to an attacker-selected server or an unintended internal service. Depending on the SDK's transport and redirect behavior, the selected endpoint may receive the access-key identifier, signed authorization headers, timestamps, request parameters, and other authentication metadata. The code does not directly print or transmit the secret key in plaintext, so direct disclosure of the raw secret key is not established.

The endpoint override applies to the RDS client. The separately constructed VPC client does not use this custom endpoint.

Attack Path

  1. The attacker supplies, or causes an agent to supply, a malicious --endpoint argument when invoking the script.
  2. The script reads VOLCENGINE_ACCESS_KEY and VOLCENGINE_SECRET_KEY from its environment.
  3. It places those credentials into the SDK configuration.
  4. It assigns the untrusted endpoint to configuration.host.
  5. The user or agent selects an RDS action, such as list-instances.
  6. The SDK signs the request using the configured credentials and sends it to the attacker-selected destination.
  7. The destina ...[truncated 1068 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the public --endpoint option from production builds unless custom endpoints are an explicit operational requirement.
  2. If custom endpoints are necessary, permit only an explicit allowlist of official Volcengine API hostnames.
  3. Require HTTPS and reject URLs containing user information, fragments, unexpected ports, or ambiguous host syntax.
  4. Resolve the hostname and reject loopback, private, link-local, multicast, reserved, and unspecified IP ranges for both IPv4 and IPv6.
  5. Revalidate every redirect destination or disable redirects for authenticated API calls.
  6. Ensure hostname validation and TLS certificate verification remain enabled.
  7. Separate development endpoint overrides from production execution through configuration policy rather than caller-controlled arguments.
  8. Use narrowly scoped cloud credentials and rotate them if signed requests may have reached an untrusted endpoint.
  9. Add automated tests covering malicious endpoints, IP literals, DNS rebinding scenarios, redirects, and non-HTTPS schemes.
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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The skill description overstates its behavior by calling itself an MCP server and claiming broad instance/database/account management and ops capabilities, while the documented actions are mainly local script-based read/query operations plus pricing and VPC/subnet discovery. This mismatch can mislead users and orchestrators about trust boundaries, resource scope, and what remote systems will actually be contacted.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill requires sensitive cloud credentials via environment variables and instructs direct script execution, but it does not declare any tool scope or explicit permission boundaries. This increases the chance that an agent can access secrets or run code without clear user-approved constraints, especially in environments where skills are auto-invoked.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The document instructs direct use of cloud management scripts with access keys and secret keys but does not clearly warn users that credentials will be used to send requests to Volcengine APIs and retrieve account/resource metadata. This lack of transparency can lead to uninformed credential exposure or unintended remote operations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger language is broad enough to match many generic database or operations conversations, which can cause unnecessary activation of a credentialed cloud-query skill. In context, that is risky because the skill can initiate remote API calls using configured AK/SK and expose cloud metadata when the user may only want general advice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This file contains natural-language strings that force a specific language/locale for users, including the module description and later CLI help text, but does not provide opt-in or alternative language support. Under the policy, language constraints should either be user-selectable or clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest describes this skill as helping with RDS MySQL instance management, database operations, account management, and O&M tasks. However, the code also initializes a separate VPC client and exposes VPC/subnet listing operations, which reach into broader cloud networking resources rather than RDS-specific management.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
75% confidence
Finding

该文件对语言能力作了限定,只提到中文或英文,而没有说明是否支持用户选择输出语言或在不匹配时如何处理。按语言/locale 政策检查,这种硬编码语言范围在缺少明确 opt-in 时可能构成轻微的语言约束问题。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file contains only Chinese-language descriptive comments, which can indicate a fixed language expectation without offering any user choice or opt-in. Under the policy rules, language constraints should be optional or explicitly justified rather than implicitly enforced.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The manifest scope covers instance management, database operations, account management, and operational tasks, but does not mention pricing or cost estimation. The code adds a dedicated instance price lookup capability, which is adjacent to provisioning but not clearly claimed by the description.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.