T09 · Insecure Skill Coding Practices
- Location
scripts/poi_fetch.py:10- Finding
Hard-Coded Amap API Credential Exposed in Source Code
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill does what it advertises, but it should be reviewed because it ships a reusable Amap API key and can create Excel files from third-party data without formula safeguards.
Install only after replacing the bundled Amap key with your own restricted key, or treating the bundled key as already exposed. Prefer a pinned dependency in a virtual environment. Generated Excel files contain third-party POI text, so open them with external links and active content disabled, or use `--skip-excel` when XLSX output is not needed.
scripts/poi_fetch.py:10Hard-Coded Amap API Credential Exposed in Source Code
scripts/poi_fetch.py:83Excel Formula Injection Through Untrusted POI Fields
SKILL.md:69Unpinned Runtime Dependency Installation
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
SKIP_EXCEL = "--skip-excel" in sys.argv
def fetch_json(url):
with urllib.request.urlopen(url, timeout=10) as r:
return json.loads(r.read().decode("utf-8"))
def get_districts(city_name):
The documentation exposes a default owner API key in plaintext, which is effectively a credential disclosure. Anyone reading the skill can reuse the key for unauthorized API calls, leading to quota exhaustion, billing abuse, attribution problems, and possible service suspension for the legitimate owner.
The skill documentation describes capabilities to access the network, read environment-provided data such as API keys, and write files locally, but it does not declare any explicit tool scope or permission boundary. That increases the risk of overbroad execution and makes it harder for users or the platform to understand and constrain what the skill is allowed to do.
The trigger phrase “抓取POI” is very broad and overlaps with ordinary map, search, and data-query requests, which can cause accidental activation of a networked scraping and file-writing workflow. Unintended execution is dangerous here because the skill performs external collection and persists output locally, potentially without the user realizing a more invasive action was invoked.
The skill performs remote data collection and writes JSON and Excel artifacts to the local workspace, but the documentation does not present this as an explicit consent or disclosure step to the user. This can lead to silent data acquisition and local persistence, which is risky in agent environments where users may expect a simple lookup rather than scraping plus file creation.
The file's natural-language interface and usage text are entirely in Chinese, and the script prints Chinese-only runtime messages. Under the stated policy, forcing a specific language without user opt-in is a locale-policy issue unless the regional restriction is explicitly documented and justified.
SQP-3 适用于所有文件。文档中的描述、触发词和示例均仅以中文给出,未说明是否要求中文输入,也未提供其他语言选项或用户可选择的 locale 行为。
This code creates a directory under ~/.openclaw/workspace/data and persists fetched POI data there, later also saving an Excel export. Although there are progress prints, the initial user-facing description does not clearly warn that local files will be created and populated, which is the kind of disclosure this rule asks for on code files.