T09 · Insecure Skill Coding Practices
- Location
CLAUDE.md:27- Finding
API Keys Are Exposed by the Recommended Configuration Check
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent map-search tool, but it unnecessarily exposes configured map API keys and can send duplicate location-bearing requests because of script entry-point side effects.
Review before installing. Use only restricted, low-quota map API keys, avoid printing or pasting key values into chats or logs, and rotate any key already exposed. Be aware that addresses and coordinates are sent to AMap, Baidu, or Tencent, and that the current scripts may make duplicate requests until their CLI entry points are guarded.
CLAUDE.md:27API Keys Are Exposed by the Recommended Configuration Check
scripts/geocode.mjs:89Unconditional Module Entry Points Cause Duplicate Location and Credential-Bearing Requests
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
rmdir /S /Q %USERPROFILE%.openclaw\skills\map-query
rm -rf ~/.openclaw/skills/map-query
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
rmdir /S /Q %USERPROFILE%.openclaw\skills\map-query
rm -rf ~/.openclaw/skills/map-query
Referenced artifact was not completely inspected
node scripts/search.mjs "Sanlitun, Chaoyang District, Beijing" --type food
Referenced artifact was not completely inspected
node scripts/search.mjs "Sanlitun, Chaoyang District, Beijing" --type food
The skill explicitly instructs users to print secret-bearing environment variables with echo $AMAP_KEY, echo $BAIDU_MAP_KEY, and echo $TENCENT_MAP_KEY. This can expose API keys in terminal history, logs, chat transcripts, screenshots, or agent tool output, creating a credential disclosure risk even though the stated goal is only to check whether keys are configured.
The file presents a location-based skill for Chinese places and addresses, but all expected outputs are fixed in English and there is no indication that users may choose their preferred language or locale. Under SQP-3, forcing a specific language without user opt-in is a natural-language policy concern.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
### AMap (Recommended)
1. Visit https://lbs.amap.com/
2. Register/Login account
3. Go to Console → App Management → Create New App
4. Add Key, select "Web Service" type
5. Copy your API Key
The instructions explicitly recommend loading the API key from ~/.bashrc, which creates persistent credential availability in every future shell session. This broadens exposure and makes accidental disclosure more likely through shell history, dotfile syncing, debugging output, or compromised local user contexts.
export BAIDU_MAP_KEY="your_baidu_map_key" export TENCENT_MAP_KEY="your_tencent_map_key"
echo 'export AMAP_KEY="your_amap_api_key"' >> ~/.bashrc source ~/.bashrc
The installation guide tells users to persist API keys in shell startup files such as ~/.bashrc without any warning about credential exposure. Startup files are long-lived, frequently backed up or copied between systems, and may be readable by other local processes or accidentally committed or shared, increasing the chance of secret leakage.
The skill explicitly accepts user-provided addresses and uses third-party map providers for geocoding and nearby search, but it does not disclose that those addresses will be transmitted to external services. Addresses can contain precise location or other sensitive personal information, so failing to warn users creates a privacy and consent issue rather than a purely technical bug.
The script takes a user-supplied address and forwards it to the imported search function, which likely queries an external map/search provider selected by the user. Because addresses can contain precise location or personal data, sending them off-device without any disclosure or consent creates a privacy risk, especially in a CLI/tooling context where users may not realize a third party receives the query.
The script sends the user-supplied address to third-party geocoding providers over the network, but this file provides no disclosure, consent prompt, or warning that potentially sensitive location information will leave the local environment. Addresses can contain home, workplace, or other private location data, so silent transmission creates a real privacy risk even if it is expected for geocoding functionality.
The search keywords are fixed to Chinese terms, and the CLI example later also assumes a Chinese-language address format. This imposes a specific language/locale behavior without offering user choice or documenting a justified region-specific constraint.
The Baidu query string is fixed to Chinese-language search terms, which constrains the tool to a specific language/locale. There is no user opt-in, configurable locale selection, or explicit justification in this file for this restriction.
The Tencent query uses Chinese-only keywords, forcing a locale-specific search behavior. The file does not provide a mechanism for user language choice or explain that the script is limited to a particular region or language.
The script takes a user-supplied address, geocodes it, and sends the resulting location data to third-party map providers without any disclosure, consent prompt, or minimization visible in this file. Because addresses often reveal sensitive location information such as home or workplace, this creates a real privacy risk through external data sharing.
This CLI sends user-supplied addresses or derived coordinates to third-party map providers for geocoding and nearby-place search, but this file does not present any explicit user-facing privacy notice or confirmation before transmission. Location and address data are sensitive, and silent disclosure to external services can create privacy and compliance risks, especially when users may assume processing is local.
This is a markdown file, so SQP-2 applies to missing user-facing warnings in the skill description or examples. The examples prominently use full or near-full location inputs and geocoding outputs, but the file does not include any warning that the skill processes location data, which can affect user privacy.
The README uses "Help me find what's good to eat near ..." as a user invocation example. The leading phrase "Help me find" is very generic everyday language and, without any stated trigger constraints or exclusions, could contribute to overly broad activation guidance for the skill.
This code reads API credential environment variables for multiple map providers, but the file contains no comments, logging, or other user-facing disclosure indicating that provider keys will be accessed from the environment. For a code file, credential access can warrant a warning unless the behavior is documented elsewhere or clearly disclosed in the file itself, and no such disclosure is visible here.
The file uses fixed Chinese strings such as '美食', '川菜', '粤菜', and a Chinese example address, which creates a locale-specific behavior without any opt-in or documented justification. Under the policy, forcing a specific language or locale without user choice is a natural-language policy concern.
The script uses provider API keys from configuration/environment-backed settings to call third-party services. Although this is operationally expected for geocoding, the file provides no inline warning or documentation that external credentials are required and will be used for outbound requests.