T09 · Insecure Skill Coding Practices
- Location
scripts/quick-config.sh:17- Finding
Hardcoded Search Provider API Credentials in a Distributed Script
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This search skill matches its general purpose, but it includes serious credential-handling and setup risks that users should review before installing.
Review before installing. Avoid running quick-config.sh, rotate any bundled or previously exposed provider credentials, do not store OPENCLAW_MASTER_KEY in shell startup files, and prefer a restricted secret store or a 0600-only file. Treat setup:bailian as a persistent external tool configuration and pin or review the MCP server version before using it.
scripts/quick-config.sh:17Hardcoded Search Provider API Credentials in a Distributed Script
scripts/setup-wizard.ts:75Master Encryption Key Written to a Plaintext File Without Explicit Restrictive Permissions
scripts/search.sh:35Shell Wrapper Executes the Contents of the Configuration File
scripts/manage-keys.ts:47Key Management Command Prints Complete Decrypted API Keys
scripts/setup-bailian.ts:155Bailian Setup Prints the Complete Master Encryption Key to the Terminal
scripts/setup-bailian.ts:116Unpinned Package Is Configured for Automatic Execution Through npx
handlebars 4.7.8 has multiple serious advisories, including prototype pollution and potential code or script injection vectors when compiling or rendering attacker-controlled templates. Although this lockfile suggests it is brought in transitively by ts-jest as a development dependency, templating vulnerabilities are high risk because CI, scaffolding, or code-generation paths may process external content and can become an execution or injection boundary.
The guide tells users to extract a master key directly from .env into an environment variable via shell command substitution. This increases exposure of a decryption secret to the shell environment and process context, making accidental disclosure more likely through shell history, process inspection in some setups, or inherited environments.
cd ~/.agents/skills/openclaw-smart-search
export OPENCLAW_MASTER_KEY=$(grep OPENCLAW_MASTER_KEY .env | cut -d'=' -f2)
echo "✅ 主密钥已加载(${#OPENCLAW_MASTER_KEY}字符)"
This troubleshooting step again instructs users to load the master key from .env into an environment variable, unnecessarily broadening the secret's exposure. Repeating the pattern in troubleshooting guidance makes unsafe handling more likely and normalizes insecure operational practice.
解决:
export OPENCLAW_MASTER_KEY=$(grep OPENCLAW_MASTER_KEY .env | cut -d'=' -f2)
永久生效:
Appending the master key export into ~/.bashrc creates persistence of a sensitive secret in plaintext within a shell startup file. This materially worsens risk because the key becomes long-lived, automatically loaded into every shell session, and more likely to be exposed via backups, dotfile sync, local compromise, or accidental sharing.
永久生效:
echo 'export OPENCLAW_MASTER_KEY="'$(grep OPENCLAW_MASTER_KEY .env | cut -d'=' -f2)'"' >> ~/.bashrc
source ~/.bashrc
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
pm run key:get tavily
### 重新配置 API Keys
```bash
npm run setup
npm run key:generate-master
问题:
❌ OPENCLAW_MASTER_KEY 未设置
解决:
export OPENCLAW_MASTER_KEY=$(grep OPENCLAW_MASTER_KEY .env | cut -d'=' -f2)
永久生效:
echo 'export OPENCLAW_MASTER_KEY="'$(grep OPENCLAW_MASTER_KEY .env | cut -d'=' -f2)'"' >> ~/.bashrc
source ~/.bashrc
问题:
未配置 API Key。请运行:npm run setup
解决:
npm run setup
交互式输入至少一个引擎的 API Key。
问题:
Salt not found in config file
解决:
# 重新生成配置文件
node test-config.js
# 重新配置 API Keys
npm run setup
问题:
[Bailian] API Error: 401 Unauthorized
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.
The documentation describes a benign search-aggregation skill, but the content repeatedly indicates broader behaviors: secret collection, key import/export, local filesystem writes, environment inspection, and shell-based diagnostics. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the declared purpose while the skill performs materially more sensitive operations.