Back to skill

Security audit

Connectors Available

Security checks for vulnerabilities and agentic risk

Overview

This skill has a legitimate connector-checking purpose, but its scripts handle trading API credentials and user input unsafely enough to require review before installation.

Review before installing. Use only with a local Hummingbot API you control, replace admin/admin with unique credentials, avoid remote HTTP endpoints, do not run it in directories containing untrusted .env files, and avoid passing untrusted token or data-file strings to search_token.sh. Expect test_all.sh to write data/trading_rules.json or a chosen output path.

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
scripts/search_token.sh:29
Finding
Arbitrary Python Code Execution Through Shell-Expanded Heredoc<![CDATA[ ## Vulnerability Details **File Location**: `scripts/search_token.sh:29-34` **Vulnerability Type**: Injection of user-controlled shell arguments into executable Python source **Risk Level**: High ### Vulnerable Code ```bash python3 << PYTHON import json import sys token = "${TOKEN}".upper() data_file = "${DATA_FILE}" ``` The values assigned to `TOKEN` and `DATA_FILE` originate from the user-controlled `--token` and `--data` command-line arguments: ```bash while [[ $# -gt 0 ]]; do case $1 in --token) TOKEN="$2"; shift 2 ;; --data) DATA_FILE="$2"; shift 2 ;; *) shift ;; esac done ``` ### Technical Analysis The heredoc delimiter is unquoted, so the shell performs parameter expansion before passing the generated source to Python. The expanded values are placed directly inside Python string literals without escaping. An argument containing a quote, newline, or valid Python expression can terminate the intended string literal and inject additional Python statements. This is not merely malformed input: the resulting content is interpreted as executable Python source. The local token-search functionality only needs to pass two data values to Python. Generating Python source from those values is unnecessary and violates the principle of treating external input as data rather than code. ### Attack Path 1. An attacker causes the Skill or a user to invoke `search_token.sh` with a crafted `--token` or `--data` argument. 2. The argument is stored in `TOKEN` or `DATA_FILE`. 3. The unquoted heredoc expands the malicious value directly into the Python program. 4. The crafted value escapes the surrounding Python string. 5. Python executes the injected statements with the privileges of the process running the Skill. A conceptual malicious value could terminate the string, invoke functionality such as `os.system(...)`, and comment out the remaining generated source. ### Impact Assessment Successful exploitation provides arbi ...[truncated 531 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Pass user-controlled values as arguments rather than embedding them in generated source. Quote the heredoc delimiter to disable shell expansion: ```bash python3 - "$TOKEN" "$DATA_FILE" <<'PYTHON' import json import sys token = sys.argv[1].upper() data_file = sys.argv[2] with open(data_file, encoding="utf-8") as f: data = json.load(f) # Continue processing data. PYTHON ``` Additional hardening should include: 1. Validate `TOKEN` against an expected format, such as a conservative alphanumeric token-symbol pattern. 2. Restrict `DATA_FILE` to an approved directory when arbitrary file selection is not required. 3. Reject unexpected command-line arguments instead of silently ignoring them. 4. Add regression tests containing quotes, newlines, command substitutions, and Python syntax. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/test_all.sh:8
Finding
Arbitrary Shell Execution Through Sourcing of Broadly Located Environment Files<![CDATA[ ## Vulnerability Details **File Location**: `scripts/test_all.sh:8-12`; `scripts/test_connector.sh:6-10` **Vulnerability Type**: Execution of configuration files as shell code **Risk Level**: High ### Vulnerable Code The following code appears in `scripts/test_all.sh`: ```bash # Load .env if present for f in hummingbot-api/.env ~/.hummingbot/.env .env; do if [ -f "$f" ]; then set -a; source "$f"; set +a break fi done ``` The same behavior appears in `scripts/test_connector.sh`: ```bash # Load .env if present for f in hummingbot-api/.env ~/.hummingbot/.env .env; do if [ -f "$f" ]; then set -a; source "$f"; set +a break fi done ``` ### Technical Analysis The shell `source` command does not safely parse a passive key-value configuration file. It executes the entire file as shell code in the current process. Consequently, command substitutions, shell functions, redirections, external commands, and other shell constructs in any selected `.env` file execute immediately. The scripts search relative paths controlled by the current working directory as well as a broad home-directory path. They do not validate file ownership, permissions, content, or whether the path is a symbolic link. The declared functionality only requires three settings: `HUMMINGBOT_API_URL`, `API_USER`, and `API_PASS`. Executing arbitrary configuration content and exporting every variable from the file exceeds the minimum privileges and data access needed for connector testing. ### Attack Path 1. An attacker creates or modifies one of the searched files, such as `hummingbot-api/.env` or `.env`, in the working directory. 2. The file contains apparently valid configuration together with a shell command or command substitution. 3. A user or Agent invokes `test_all.sh` or `test_connector.sh`. 4. The script finds the attacker-controlled file and executes it with `source`. 5. The embedded commands run with the privileges of the invokin ...[truncated 856 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Do not execute `.env` files with `source`. Prefer one of the following designs: 1. Require the three supported values to be supplied through the existing process environment. 2. Accept an explicit configuration-file path and parse only an allowlist of keys. 3. Use a parser that treats the file strictly as data and rejects command substitutions, shell operators, functions, and malformed lines. Only these keys should be recognized: - `HUMMINGBOT_API_URL` - `API_USER` - `API_PASS` Further hardening should include: - Resolve the configuration path canonically and reject unexpected symbolic links. - Check that the file is owned by the expected user and is not group- or world-writable. - Avoid automatically searching the current working directory. - Do not export unrelated variables. - Apply the same fix to both `test_all.sh` and `test_connector.sh`. - Add tests proving that shell syntax inside a configuration file is never executed. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/test_all.sh:15
Finding
Basic Authentication Credentials Can Be Sent to an Unrestricted Plaintext Endpoint<![CDATA[ ## Vulnerability Details **File Location**: `scripts/test_all.sh:15-17, 31, 38, 52-53`; `scripts/test_connector.sh:13-15, 32-33` **Vulnerability Type**: Plaintext credential transmission and insufficient destination validation **Risk Level**: High ### Vulnerable Code From `scripts/test_all.sh`: ```bash API_URL="${HUMMINGBOT_API_URL:-http://localhost:8000}" API_USER="${API_USER:-admin}" API_PASS="${API_PASS:-admin}" ``` ```bash AUTH="-u $API_USER:$API_PASS" ``` ```bash if [[ -z "$CONNECTORS" ]]; then CONNECTORS=$(curl -s $AUTH "$API_URL/connectors/" | python3 -c "import sys,json; print(','.join(json.load(sys.stdin)))") fi ``` ```bash result=$(curl -s $AUTH --max-time "$TIMEOUT" \ "$API_URL/connectors/$connector/trading-rules" 2>&1) ``` From `scripts/test_connector.sh`: ```bash API_URL="${HUMMINGBOT_API_URL:-http://localhost:8000}" API_USER="${API_USER:-admin}" API_PASS="${API_PASS:-admin}" TIMEOUT=10 ``` ```bash result=$(curl -s -u "$API_USER:$API_PASS" --max-time "$TIMEOUT" \ "$API_URL/connectors/$CONNECTOR/trading-rules" 2>&1) ``` ### Technical Analysis HTTP Basic authentication only encodes credentials; it does not encrypt them. When the configured endpoint uses HTTP, anyone able to observe the traffic can recover the username and password. Although the default destination is loopback, `HUMMINGBOT_API_URL` can specify any destination and either HTTP or HTTPS. The scripts do not enforce loopback use, validate the scheme, restrict the destination, or request confirmation before transmitting credentials to a remote host. In `test_all.sh`, authentication options are also assembled into a scalar and expanded without quotes: ```bash AUTH="-u $API_USER:$API_PASS" curl -s $AUTH ... ``` Whitespace or curl-option syntax in credential values can therefore alter argument parsing. This expands the risk beyond credential disclosure because malicious configuration can inject additional curl options. Network access is necessary for the ...[truncated 1623 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Restrict the default deployment to loopback and reject non-loopback hosts unless the user explicitly enables remote access. 2. Require HTTPS for remote endpoints. Permit HTTP only for verified loopback addresses. 3. Parse and validate `HUMMINGBOT_API_URL` before use: - Allow only `http` or `https`. - Reject URL user information. - Reject malformed hosts and unexpected schemes. - Consider an explicit host allowlist. 4. Do not store command options in a scalar string. Use direct, quoted arguments: ```bash curl --silent --show-error \ --user "$API_USER:$API_PASS" \ --max-time "$TIMEOUT" \ -- "$API_URL/connectors/" ``` 5. Apply the same quoted-argument approach to every request. 6. Use `--fail-with-body` and check curl's exit status separately from API response parsing. 7. Avoid logging or echoing credentials. 8. Document clearly that remote API use requires authenticated TLS and explicit operator approval. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/test_all.sh:15
Finding
Predictable Administrative Default Credentials<![CDATA[ ## Vulnerability Details **File Location**: `scripts/test_all.sh:15-17`; `scripts/test_connector.sh:13-15`; documented in `SKILL.md:83-92` **Vulnerability Type**: Hardcoded weak default credentials **Risk Level**: Medium ### Vulnerable Code From `scripts/test_all.sh`: ```bash API_URL="${HUMMINGBOT_API_URL:-http://localhost:8000}" API_USER="${API_USER:-admin}" API_PASS="${API_PASS:-admin}" ``` From `scripts/test_connector.sh`: ```bash API_URL="${HUMMINGBOT_API_URL:-http://localhost:8000}" API_USER="${API_USER:-admin}" API_PASS="${API_PASS:-admin}" ``` The behavior is explicitly documented in `SKILL.md`: ```markdown ## Requirements - Hummingbot API running (default: localhost:8000) - API credentials (default: admin/admin) ## Environment Variables ```bash export HUMMINGBOT_API_URL=http://localhost:8000 export API_USER=admin export API_PASS=admin ``` ``` ### Technical Analysis Both connector-testing scripts silently fall back to the universal `admin/admin` credential pair. Predictable administrative defaults provide no meaningful protection when an API is reachable by another local user, container, or remote host. The scripts also continue without warning when credentials are absent, making it easy for operators to retain the insecure defaults unintentionally. The connector-testing feature does not require hardcoded credentials; it can fail safely and request explicit configuration. ### Attack Path 1. An operator starts or exposes a Hummingbot API instance while retaining the documented default credentials. 2. The service becomes reachable by an untrusted local process or remote host. 3. An attacker attempts the publicly documented `admin/admin` credential pair. 4. Authentication succeeds if the service still accepts the defaults. 5. The attacker gains the API permissions associated with the administrative account. ### Impact Assessment The impact depends on the API endpoints and permissions granted to the `admin` account. At minimum, an ...[truncated 366 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Remove the fallback credentials and fail closed when authentication values are missing: ```bash : "${API_USER:?API_USER must be configured}" : "${API_PASS:?API_PASS must be configured}" ``` Further hardening should include: 1. Require unique, randomly generated credentials during initial API setup. 2. Warn and refuse to proceed when known default credentials are detected. 3. Store credentials in a protected secret store or a narrowly permissioned configuration file. 4. Avoid placing passwords directly in documentation examples; use placeholders instead. 5. Bind the API to loopback by default. 6. Require TLS and explicit authentication configuration before allowing remote exposure. 7. Document credential rotation procedures. ]]>
Vulnerability Patterns
  • 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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (22)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The skill description omits important operational behavior: it relies on authenticated local API access and local environment credentials. That mismatch can mislead users into approving a seemingly harmless lookup skill when it actually performs authenticated local actions, increasing the chance of unintended credential use or local system interaction.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
The skill description omits important operational behavior: it relies on authenticated local API access and local environment credentials. That mismatch can mislead users into approving a seemingly harmless lookup skill when it actually performs authenticated local actions, increasing the chance of unintended credential use or local system interaction.

Ae1

High
Category
analysis-evasion
Content
Fetches trading rules from each connector. If data returns, it's accessible. Results saved to `data/trading_rules.json`.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Fetches trading rules from each connector. If data returns, it's accessible. Results saved to `data/trading_rules.json`.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Credential Access

High
Category
Privilege Escalation
Content
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# Load .env if present
for f in hummingbot-api/.env ~/.hummingbot/.env .env; do
    if [ -f "$f" ]; then
        set -a; source "$f"; set +a
Confidence
97% confidence
Finding
Accessing .env files to retrieve credentials is a real security concern here because the script consumes secrets from multiple local locations automatically. In addition, using source on a .env file allows arbitrary shell execution if the file contents are malicious, turning credential access into potential code execution.

Credential Access

High
Category
Privilege Escalation
Content
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# Load .env if present
for f in hummingbot-api/.env ~/.hummingbot/.env .env; do
    if [ -f "$f" ]; then
        set -a; source "$f"; set +a
        break
Confidence
97% confidence
Finding
This specific instance continues the same risky behavior: iterating through candidate .env paths and sourcing the first match. That behavior can unintentionally pull secrets from the user's home directory or project tree and execute attacker-controlled shell content if any discovered file is unsafe.

External Script Fetching

High
Category
Supply Chain
Content
# Get all connectors if not specified
if [[ -z "$CONNECTORS" ]]; then
    CONNECTORS=$(curl -s $AUTH "$API_URL/connectors/" | python3 -c "import sys,json; print(','.join(json.load(sys.stdin)))")
fi

echo ""
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Credential Access

High
Category
Privilege Escalation
Content
# Test if a connector is accessible from current location
# Usage: ./test_connector.sh --connector <name> [--timeout 10]

# Load .env if present
for f in hummingbot-api/.env ~/.hummingbot/.env .env; do
    if [ -f "$f" ]; then
        set -a; source "$f"; set +a
Confidence
93% confidence
Finding
This finding reflects credential access behavior: the script inspects and sources local .env files that commonly contain API secrets. In addition to unnecessary secret access for the stated task, sourcing the file as shell code means a poisoned .env can lead to arbitrary command execution and secret exposure.

Credential Access

High
Category
Privilege Escalation
Content
# Usage: ./test_connector.sh --connector <name> [--timeout 10]

# Load .env if present
for f in hummingbot-api/.env ~/.hummingbot/.env .env; do
    if [ -f "$f" ]; then
        set -a; source "$f"; set +a
        break
Confidence
89% confidence
Finding
The explicit search through multiple standard .env locations broadens the credential-access surface and makes the behavior more intrusive than the skill description suggests. In this context, silently probing for local secret files is particularly concerning because the task is framed as a simple availability/trading-rules check, not credentialed secret handling.

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill invokes shell scripts but does not declare any tool restrictions or allowed tools, which weakens containment and reviewability. In an agent setting, undeclared shell capability increases the risk that the skill will execute local commands or access files in ways the user did not explicitly authorize.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill instructs use of default admin/admin credentials and encourages loading secrets from .env locations without strong security guidance. This is dangerous because weak default credentials on a local trading API can enable unauthorized access to trading-related functionality or leakage of sensitive account configuration if the host is exposed or shared.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The manifest says the skill checks which exchanges work from a location and searches for tokens with trading rules, implying a crypto-token focused scope. This data file includes many non-token instruments such as stock-like symbols (for example AAPLX-USDT, MSFT-USDT), commodities (XAU-USDT, XAG-USDT), indices (SPX500-USDT, NAS100-USDT), and forex-style pairs (EUR-USDT, JPY-USDT), which broadens the effective behavior beyond the stated purpose.

Natural-Language Policy Violations

Medium
Confidence
85% confidence
Finding
This JSON manifest includes a market key named "币安人生-USDT", which is natural-language content in Chinese embedded directly in the skill data. The file provides no indication that Chinese-language naming is optional, user-selected, or justified by a region-specific scope, so it can violate the stated language/locale policy.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The market entry "我踏马来了-USDT" contains Chinese natural-language text rather than a locale-neutral code. Because the file does not offer language choice or explain a Chinese-only regional context, this constitutes a language/locale policy concern under the natural-language policy rule.

Natural-Language Policy Violations

Medium
Confidence
84% confidence
Finding
The instrument key "踏马的没房-USDT" contains Chinese natural-language wording in the data set. There is no surrounding documentation indicating that users opted into Chinese localization or that the file is intended only for a Chinese-language audience, so this may violate the organizational language/locale policy.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The script automatically sources local and home-directory .env files, importing secrets and configuration that are not necessary for a simple availability/trading-rules lookup unless the user explicitly opted in. Because Bash source executes shell syntax, a malicious or tampered .env file could also run arbitrary commands in the user's context, making this more than passive configuration loading.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The script silently loads API credentials from .env files and uses them for authenticated requests without a prominent warning or consent step. In the context of a skill described as checking exchange availability and trading rules, implicit credential use expands scope and can surprise users who would reasonably expect unauthenticated metadata queries.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The script makes authenticated network requests and writes the returned data to disk without explicit user-facing disclosure of those side effects. While saving trading rules is aligned with the stated function, the combination of network activity, credential use, and local persistence can leak sensitive operational details or produce unintended artifacts in shared environments.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The script sources local .env files and imports all variables into the environment before performing a simple connector-availability check. This exceeds the stated purpose and creates unnecessary access to secrets; additionally, sourcing a .env as shell code is dangerous because a maliciously modified file can execute commands in the user's shell context.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The script silently loads credentials from common local .env locations without informing the user. Even if intended for convenience, this is risky because users may not expect a location-checking utility to access secrets, and the sourcing mechanism can also execute arbitrary shell content from those files.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The script sends credentials via curl using basic authentication without visible user disclosure, and it defaults to admin/admin if variables are absent. In the skill context, a user may think they are only checking connector availability, but the script may authenticate to an API endpoint and expose credentials to a misconfigured or non-local service, especially if API_URL is overridden.

Missing User Warnings

Low
Confidence
86% confidence
Finding
The skill writes results to data/trading_rules.json without warning that it may create or overwrite a local file. Silent filesystem writes are risky in agent workflows because they can unexpectedly modify user data, interfere with existing files, or leave behind sensitive exchange metadata.

Static analysis

No suspicious patterns detected.