Back to skill

Security audit

DolphinDB 流式计算技能

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its DolphinDB streaming purpose, but needs review because it requires unpinned setup scripts and repeatedly shows privileged default database credentials in financial automation examples.

Review this skill before installing or using it in a real environment. Do not run the examples with default admin credentials, verify and pin the referenced DolphinDB helper skills/scripts, and treat the alerting/order-execution examples as illustrative until you add dry-run mode, least-privilege accounts, approvals, audit logging, and production separation.

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
SKILL.md:8
Finding
Mandatory Execution of Unpinned External Skill Dependencies<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 8–14, 33–42 **Vulnerability Type**: Unpinned third-party dependency and unaudited shell-script execution **Risk Level**: Medium ### Vulnerable Code ```bash # Method 1: Run inside the skill directory cd ~/.jvs/.openclaw/workspace/skills/<skill-name> source ../dolphindb-skills/scripts/dolphin_wrapper.sh # Method 2: Run from any location source ~/.jvs/.openclaw/workspace/skills/dolphindb-skills/scripts/dolphin_global.sh ``` ```bash clawhub install dolphindb-basic ``` ```bash # Load the environment detector source ../dolphindb-skills/scripts/load_dolphindb_env.sh ``` ### Technical Analysis The Skill requires users or agents to execute shell scripts supplied by a separate `dolphindb-skills` installation and to install `dolphindb-basic` from ClawHub. Neither dependency is pinned to an immutable version, commit, digest, or cryptographic checksum. The shell `source` command executes a referenced file in the current shell rather than an isolated subprocess. Consequently, those external scripts can execute commands with the invoking user's permissions and can modify environment variables, shell functions, aliases, working directories, or other process state. Because the referenced files are outside this audited project, their behavior and integrity cannot be verified from the submitted artifact. No evidence establishes that the current external dependencies are malicious. The vulnerability is the unaudited and mutable supply-chain trust boundary created by mandatory initialization. ### Attack Path 1. An attacker compromises the external Skill distribution, its publisher account, an update channel, or the locally installed `dolphindb-skills` directory. 2. The attacker modifies one of the referenced initialization scripts or causes an unsafe version of the unpinned dependency to be installed. 3. A user or agent follows the mandatory setup instructions in `SKILL.md`. 4. The shell evaluates the ...[truncated 611 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `dolphindb-basic` and `dolphindb-skills` to immutable, reviewed versions or content digests. 2. Verify package signatures and cryptographic checksums before installation or execution. 3. Bundle the required initialization logic in the audited package where licensing and maintenance requirements permit. 4. Avoid sourcing mutable third-party scripts into the current shell. Prefer a constrained subprocess with an explicit environment and minimal filesystem permissions. 5. Validate ownership and permissions of every referenced script and reject files writable by untrusted users. 6. Document the exact trusted publisher, repository, version, and expected hashes. 7. Review dependency updates before changing the pinned version. 8. Run initialization and package installation under a least-privileged account in a sandbox or container. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:64
Finding
Hardcoded Weak DolphinDB Administrator Credentials in Runnable Examples<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 64, 132, 159, 193, 234, 283, 326, 375, 416, and 462 **Vulnerability Type**: Hardcoded plaintext administrator credentials **Risk Level**: Medium ### Vulnerable Code The following runnable connection statement is repeated ten times: ```python s.connect(host="localhost", port=8848, userid="admin", password="123456") ``` ### Technical Analysis The examples embed the predictable password `123456` for the privileged `admin` account. Although the configured host is `localhost`, users may copy these examples into persistent scripts or adapt the host without replacing the credentials. Repetition throughout the document also presents the value as a normal default rather than an explicit placeholder that must be changed. A weak credential is especially dangerous for an administrator account because successful authentication may provide broad control over DolphinDB data and server-side operations. Storing credentials directly in scripts also exposes them through source repositories, backups, logs, process diagnostics, and shared workspaces. The artifact does not demonstrate that these credentials are active on a deployed server. The finding concerns the insecure runnable configuration and the foreseeable risk of example code being reused unchanged. ### Attack Path 1. An operator copies a documented example into a development or production workflow without replacing the credentials. 2. The DolphinDB service retains or accepts the demonstrated `admin` and `123456` credential pair. 3. An attacker obtains network access to the service, or gains local access where it remains bound only to localhost. 4. The attacker authenticates using the published credential pair. 5. The attacker performs operations available to the DolphinDB administrator account. ### Impact Assessment If the example credentials are accepted, exploitation could expose or modify database contents, streaming tables, analytics eng ...[truncated 355 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace the real-looking password with an unmistakable nonfunctional placeholder, such as `password=os.environ["DOLPHINDB_PASSWORD"]`. 2. Retrieve credentials from a dedicated secret manager or protected environment variables rather than embedding them in source files. 3. Create a least-privileged service account for streaming operations instead of using `admin`. 4. Require operators to rotate all default credentials during deployment. 5. Enforce strong, unique passwords and restrict DolphinDB network access to authorized clients. 6. Add TLS where supported so credentials are not transmitted over an unprotected channel. 7. Include explicit warnings that examples must not be deployed with default credentials. 8. Scan repositories and deployment configurations for copied instances of `admin`/`123456`, then rotate any affected credentials. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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 (2)

Missing User Warnings

Medium
Confidence
98% confidence
Finding
The skill repeatedly demonstrates connecting to DolphinDB with hardcoded default administrator credentials (`admin` / `123456`) and does not warn users to replace them. In a real environment, users often copy examples verbatim; if the target server still has default credentials or if examples normalize insecure practice, this can lead to unauthorized database access, data manipulation, or full administrative compromise.

Missing User Warnings

Medium
Confidence
86% confidence
Finding
The skill describes streaming pipelines that include alerting and order execution behaviors such as `sendAlert(...)` and `executeOrders` without clear safety warnings, approval gates, or simulation-only guidance. In trading and operational contexts, users may adapt these examples into live systems, creating risk of unintended external actions, false alerts, or unauthorized trade execution from malformed logic or accidental deployment.

Static analysis

No suspicious patterns detected.