Back to skill

Security audit

Dolphindb

Security checks for vulnerabilities and agentic risk

Overview

This is a documentation-only DolphinDB skill, but some included examples use default admin passwords and destructive shell commands that could be unsafe if copied into real systems.

Install only if you want a large DolphinDB documentation corpus available to your agent, and treat its examples as reference material rather than production-ready code. Replace all sample credentials, avoid default administrator accounts, keep shell execution disabled unless strictly needed, and manually review any generated deployment, replication, or filesystem-changing commands before running them.

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

T09 · Insecure Skill Coding Practices

Error
Location
references/doc_2337.md:1164
Finding
Predictable Administrative Credentials in Cluster Replication Configuration## Vulnerability Details **File Location**: `references/doc_2337.md:1164-1171` **Vulnerability Type**: Hard-coded predictable administrative credentials **Risk Level**: High **Vulnerable Code**: ```text clusterReplicationExecutionUsername=admin Used to execute inter-cluster asynchronous replication. The default is admin. clusterReplicationExecutionPassword=123456 Used as the password for inter-cluster asynchronous replication. The default is 123456. ``` ### Technical Analysis The documentation presents a privileged replication account with the predictable username `admin` and password `123456`. The replication identity requires transaction-related permissions and can therefore perform security-sensitive operations against replicated databases. Although this content is documentation rather than automatically executed code, users or AI agents may reproduce the configuration verbatim. A publicly known default password provides no meaningful protection against credential guessing. The documentation notes that newer releases use RSA authentication, but the insecure credential remains applicable to configurations or versions that use the password parameter. ### Attack Path 1. An administrator or AI agent copies the documented replication configuration. 2. The administrator does not replace the example password. 3. An attacker identifies a reachable DolphinDB node through network scanning, leaked configuration, or infrastructure knowledge. 4. The attacker attempts authentication with the documented `admin` and `123456` credentials. 5. If accepted, the attacker obtains the transaction and replication privileges assigned to the replication account. 6. The attacker can access, alter, or interfere with data available through that account. ### Impact Assessment Successful exploitation can grant privileged database access, including transaction execution and interference with inter-cluster replication. Depending on the pe ...[truncated 381 chars]
Remediation
## Remediation Suggestions - Replace literal credentials with explicit placeholders such as `REPLICATION_USER` and `REPLICATION_PASSWORD_FROM_SECRET_MANAGER`. - State prominently that examples must never use default or shared administrative credentials. - Require a dedicated replication account with only the minimum transaction and database permissions needed for replication. - Prefer the RSA-based authentication mechanism documented for DolphinDB 3.00.1 and later. - Generate unique, high-entropy credentials for deployments that still require password authentication. - Store credentials in a protected secret manager or encrypted configuration facility rather than source-controlled files. - Restrict replication ports to explicitly authorized cluster nodes using host firewalls and network access controls. - Rotate any existing deployment that uses `admin` and `123456`, and review authentication logs for prior use.

T09 · Insecure Skill Coding Practices

Error
Location
references/doc_3592.md:1471
Finding
Publicly Routable High-Availability Example Uses Predictable Administrator Password## Vulnerability Details **File Location**: `references/doc_3592.md:1471` **Vulnerability Type**: Predictable administrative credentials in a remote connection example **Risk Level**: High **Vulnerable Code**: ```java boolean success = conn.connect( host="115.239.209.228", port=21142, userid="admin", password="123456", highAvailability=True, highAvailabilitySites=sites ) ``` ### Technical Analysis The high-availability client example combines a publicly routable IP address with the privileged username `admin` and the predictable password `123456`. Readers commonly treat official connection examples as templates, so the example can encourage deployment of weak administrative credentials. The high-availability option may also cause the client to authenticate to several cluster endpoints using the same credentials. Reusing a weak administrator password across multiple nodes increases both the attack surface and the blast radius of a compromise. The reviewed file is static documentation and does not make this connection automatically. The vulnerability materializes when the example is copied without replacing the address and credentials. ### Attack Path 1. A user adapts the high-availability example but retains `admin` and `123456`. 2. The DolphinDB service or one of its failover endpoints is exposed to an untrusted network. 3. An attacker discovers the service endpoints. 4. The attacker submits the documented credentials to one or more high-availability nodes. 5. A successful login provides the permissions associated with the administrator account. 6. The attacker uses high-availability connectivity or shared credentials to access additional cluster nodes. ### Impact Assessment Successful exploitation may provide administrator-level database access across multiple high-availability endpoints. Potential consequences include unauthorized data access, data modification or deletion, ...[truncated 183 chars]
Remediation
## Remediation Suggestions - Replace the literal IP addresses, username, and password with clearly nonfunctional placeholders. - Use a dedicated least-privilege client identity rather than the built-in administrator. - Retrieve credentials from a secret manager or protected environment variable at runtime. - Use unique credentials for environments and clusters; do not reuse an administrator password across failover nodes. - Restrict client access to trusted networks and explicitly allowlisted source addresses. - Require encrypted transport and server identity verification for remote connections. - Add a warning that the sample values are illustrative and must not be used in production. - Rotate affected credentials and audit all cluster endpoints if the documented password has been deployed.

T09 · Insecure Skill Coding Practices

Warning
Location
references/doc_3475.md:136
Finding
Hard-Coded Password in SCRAM Authentication Example## Vulnerability Details **File Location**: `references/doc_3475.md:136-141` **Vulnerability Type**: Hard-coded plaintext password in authentication code **Risk Level**: Medium **Vulnerable Code**: ```python password = "123456" # Generate client proof client_proof_data = client_generate_proof( "user01", password, server_response["salt"], server_response["iteration_count"], client_data["client_nonce"], server_response["combined_nonce"] ) ``` ### Technical Analysis The SCRAM example correctly uses PBKDF2, HMAC, random nonces, and Base64 as components of the authentication protocol. The Base64 operations are not evidence of covert exfiltration. However, the example embeds the weak plaintext password `123456` directly in source code. SCRAM protects the password during authentication, but it does not compensate for a predictable password or insecure storage in source code. If users adapt the example unchanged, the account remains vulnerable to guessing. If they replace the value with a real password but retain the hard-coded pattern, the secret may leak through source control, backups, logs, code review systems, or generated artifacts. ### Attack Path 1. A developer copies the SCRAM example into an application. 2. The developer either retains `123456` or replaces it with a real secret stored directly in source code. 3. An attacker guesses the documented password or gains read access to the source repository or packaged application. 4. The attacker recovers the credential and authenticates as `user01`. 5. The attacker exercises the database permissions assigned to that account. ### Impact Assessment Exploitation grants the privileges of the affected DolphinDB user. The resulting scope may include access to queries, tables, functions, or administrative operations permitted to that identity. This issue does not expose a confirmed live credential in the audited package, and the cod ...[truncated 115 chars]
Remediation
## Remediation Suggestions - Replace the password with a clearly nonfunctional placeholder and require callers to supply it securely. - Demonstrate retrieval from a secret manager, protected credential prompt, or environment variable. - Avoid placing real credentials in source code, command-line arguments, notebooks, or generated examples. - Use a randomly generated, high-entropy password where password authentication is required. - Assign `user01` only the minimum permissions required for the example. - Add a warning that Base64 is encoding rather than encryption and must not be used to protect stored credentials. - Enable secret scanning and rotate any real password that has been committed using this pattern.

T09 · Insecure Skill Coding Practices

Error
Location
references/doc_539.md:24
Finding
Destructive Recursive Shell Command in API Example## Vulnerability Details **File Location**: `references/doc_539.md:24-26` **Vulnerability Type**: Unsafe operating-system command execution **Risk Level**: High **Vulnerable Code**: ```text cmd="rm -rf /home/user1/test.txt" shell(cmd); ``` ### Technical Analysis The example invokes the DolphinDB `shell` function to execute `rm -rf`. The target is shown as a single file, so recursive deletion is unnecessary. Both `-r` and `-f` remove safeguards: recursion permits deletion of directory trees, while force mode suppresses prompts and ignores some errors. The documentation states that `shell` is available only when `enableShellFunction` is enabled and is executed by a DolphinDB system administrator. This restriction reduces exposure but increases the consequences of a mistake because the command runs with the operating-system permissions of the DolphinDB process. If an AI agent or user generalizes this example using a variable or user-controlled path, path manipulation, an empty variable, wildcard expansion, or command injection can transform a single-file deletion into broad filesystem destruction. ### Attack Path 1. An administrator enables `enableShellFunction`. 2. A user or AI-generated script adapts the example to accept a path dynamically. 3. The path is malformed, attacker-controlled, empty, or resolves to a directory outside the intended location. 4. `shell(cmd)` passes the command to the operating system. 5. `rm -rf` recursively deletes every accessible object under the resolved target. 6. If shell metacharacters are accepted in the path, an attacker may append additional operating-system commands. ### Impact Assessment Exploitation or operator error can delete DolphinDB data, configuration, logs, application files, or other content accessible to the DolphinDB operating-system account. This may cause permanent data loss and complete service unavailability. If the DolphinDB process runs with excessive pri ...[truncated 300 chars]
Remediation
## Remediation Suggestions - Replace the destructive example with a harmless command that demonstrates the return value without modifying the filesystem. - If deletion must be demonstrated, use a dedicated temporary test file and a nonrecursive command such as `rm -- /controlled/path/test.txt`. - Never concatenate untrusted input into a shell command. - Canonicalize and validate paths against a strict allowlisted directory before performing filesystem operations. - Prefer a structured filesystem API that does not invoke a shell. - Keep `enableShellFunction` disabled unless there is a documented operational requirement. - Restrict use of `shell` to a dedicated least-privilege service identity and authorized administrators. - Prevent the DolphinDB service account from writing to or deleting operating-system and unrelated application directories. - Add explicit warnings about wildcard expansion, empty variables, symlink traversal, shell metacharacters, and recursive deletion.
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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (711)

Ae1

High
Category
analysis-evasion
Content
1. **[数据库白皮书](references/whitepapers/database.md)** (1073行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
1. **[数据库白皮书](references/whitepapers/database.md)** (1073行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
1. **[数据库白皮书](references/whitepapers/database.md)** (1073行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
1. **[数据库白皮书](references/whitepapers/database.md)** (1073行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
1. **[数据库白皮书](references/whitepapers/database.md)** (1073行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
1. **[数据库白皮书](references/whitepapers/database.md)** (1073行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
1. **[数据库白皮书](references/whitepapers/database.md)** (1073行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
1. **[数据库白皮书](references/whitepapers/database.md)** (1073行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
1. **[数据库白皮书](references/whitepapers/database.md)** (1073行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
2. **[流数据白皮书](references/whitepapers/streaming.md)** (2279行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
2. **[流数据白皮书](references/whitepapers/streaming.md)** (2279行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
2. **[流数据白皮书](references/whitepapers/streaming.md)** (2279行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
2. **[流数据白皮书](references/whitepapers/streaming.md)** (2279行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
2. **[流数据白皮书](references/whitepapers/streaming.md)** (2279行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
2. **[流数据白皮书](references/whitepapers/streaming.md)** (2279行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
3. **[中高频回测白皮书](references/whitepapers/backtest.md)** (2205行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
3. **[中高频回测白皮书](references/whitepapers/backtest.md)** (2205行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
3. **[中高频回测白皮书](references/whitepapers/backtest.md)** (2205行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
3. **[中高频回测白皮书](references/whitepapers/backtest.md)** (2205行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
3. **[中高频回测白皮书](references/whitepapers/backtest.md)** (2205行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
3. **[中高频回测白皮书](references/whitepapers/backtest.md)** (2205行)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- **如何部署集群?** → [分布式架构](references/doc_6249.md)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- **如何选择分区策略?** → [数据分区](references/doc_9485.md) + [数据库白皮书](references/whitepapers/database.md)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- **如何选择分区策略?** → [数据分区](references/doc_9485.md) + [数据库白皮书](references/whitepapers/database.md)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- **TSDB vs OLAP 如何选择?** → [TSDB存储引擎](references/doc_6240.md) 和 [OLAP存储引擎](references/doc_7837.md)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Static analysis

No suspicious patterns detected.