T09 · Insecure Skill Coding Practices
- Location
scripts/oracle_report_generator.py:114- Finding
Hard-Coded API Credentials Exposed in Distributed Source Code
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This market-report skill has a coherent purpose, but it embeds API credentials and automatically sends reports to a hard-coded Feishu recipient, so users should review it before installing.
Install only after removing and rotating the embedded API keys, requiring an explicit Feishu recipient and send confirmation, pinning or reviewing the dependency skills, and changing secrets to environment variables or a secret manager. Treat scheduled use as outbound messaging, not just local report generation.
scripts/oracle_report_generator.py:114Hard-Coded API Credentials Exposed in Distributed Source Code
scripts/oracle_report_generator.py:120Automatic Report Delivery to a Hard-Coded Feishu Recipient
SKILL.md:15Unpinned Executable Skill Dependencies Receive API Credentials
scripts/oracle_report_generator.py:291Unauthenticated HTTP Market Feeds Permit Report Data Manipulation
The file hard-codes multiple live secrets (QVeris, MX, Tushare, Finnhub) directly in source. Anyone with read access to the skill can reuse these credentials for unauthorized API access, billing abuse, data exfiltration, or impersonation, and the script also transmits them outward in subprocess-built commands and HTTP headers.
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).
codes = list(INDEX_CODES.keys())
codes_str = ",".join(codes)
cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} call ths_ifind.real_time_quotation.v1 --discovery-id "{DISCOVERY_ID}" --params '{{"codes":"{codes_str}"}}' '''
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
output = result.stdout
lines = output.split('\n')
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).
codes = list(INDEX_CODES.keys())
codes_str = ",".join(codes)
cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} call ths_ifind.real_time_quotation.v1 --discovery-id "{DISCOVERY_ID}" --params '{{"codes":"{codes_str}"}}' '''
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
output = result.stdout
lines = output.split('\n')
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).
codes = list(INDEX_CODES.keys())
codes_str = ",".join(codes)
cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} call ths_ifind.real_time_quotation.v1 --discovery-id "{DISCOVERY_ID}" --params '{{"codes":"{codes_str}"}}' '''
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
output = result.stdout
lines = output.split('\n')
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).
codes = list(INDEX_CODES.keys())
codes_str = ",".join(codes)
cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} call ths_ifind.real_time_quotation.v1 --discovery-id "{DISCOVERY_ID}" --params '{{"codes":"{codes_str}"}}' '''
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
output = result.stdout
lines = output.split('\n')
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).
codes = list(INDEX_CODES.keys())
codes_str = ",".join(codes)
cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} call ths_ifind.real_time_quotation.v1 --discovery-id "{DISCOVERY_ID}" --params '{{"codes":"{codes_str}"}}' '''
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
output = result.stdout
lines = output.split('\n')
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).
codes = list(INDEX_CODES.keys())
codes_str = ",".join(codes)
cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} call ths_ifind.real_time_quotation.v1 --discovery-id "{DISCOVERY_ID}" --params '{{"codes":"{codes_str}"}}' '''
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
output = result.stdout
lines = output.split('\n')
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).
codes = list(INDEX_CODES.keys())
codes_str = ",".join(codes)
cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} call ths_ifind.real_time_quotation.v1 --discovery-id "{DISCOVERY_ID}" --params '{{"codes":"{codes_str}"}}' '''
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
output = result.stdout
lines = output.split('\n')
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).
codes = list(INDEX_CODES.keys())
codes_str = ",".join(codes)
cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} call ths_ifind.real_time_quotation.v1 --discovery-id "{DISCOVERY_ID}" --params '{{"codes":"{codes_str}"}}' '''
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
output = result.stdout
lines = output.split('\n')
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).
codes = list(INDEX_CODES.keys())
codes_str = ",".join(codes)
cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} call ths_ifind.real_time_quotation.v1 --discovery-id "{DISCOVERY_ID}" --params '{{"codes":"{codes_str}"}}' '''
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
output = result.stdout
lines = output.split('\n')
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).
codes = list(INDEX_CODES.keys())
codes_str = ",".join(codes)
cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} call ths_ifind.real_time_quotation.v1 --discovery-id "{DISCOVERY_ID}" --params '{{"codes":"{codes_str}"}}' '''
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
output = result.stdout
lines = output.split('\n')
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).
codes = list(INDEX_CODES.keys())
codes_str = ",".join(codes)
cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} call ths_ifind.real_time_quotation.v1 --discovery-id "{DISCOVERY_ID}" --params '{{"codes":"{codes_str}"}}' '''
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
output = result.stdout
lines = output.split('\n')
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).
codes = list(INDEX_CODES.keys())
codes_str = ",".join(codes)
cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} call ths_ifind.real_time_quotation.v1 --discovery-id "{DISCOVERY_ID}" --params '{{"codes":"{codes_str}"}}' '''
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
output = result.stdout
lines = output.split('\n')
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).
codes = list(INDEX_CODES.keys())
codes_str = ",".join(codes)
cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} call ths_ifind.real_time_quotation.v1 --discovery-id "{DISCOVERY_ID}" --params '{{"codes":"{codes_str}"}}' '''
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
output = result.stdout
lines = output.split('\n')
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).
codes = list(INDEX_CODES.keys())
codes_str = ",".join(codes)
cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} call ths_ifind.real_time_quotation.v1 --discovery-id "{DISCOVERY_ID}" --params '{{"codes":"{codes_str}"}}' '''
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
output = result.stdout
lines = output.split('\n')
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).
codes = list(INDEX_CODES.keys())
codes_str = ",".join(codes)
cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} call ths_ifind.real_time_quotation.v1 --discovery-id "{DISCOVERY_ID}" --params '{{"codes":"{codes_str}"}}' '''
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
output = result.stdout
lines = output.split('\n')
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).
codes = list(INDEX_CODES.keys())
codes_str = ",".join(codes)
cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} call ths_ifind.real_time_quotation.v1 --discovery-id "{DISCOVERY_ID}" --params '{{"codes":"{codes_str}"}}' '''
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
output = result.stdout
lines = output.split('\n')
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).
codes = list(INDEX_CODES.keys())
codes_str = ",".join(codes)
cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} call ths_ifind.real_time_quotation.v1 --discovery-id "{DISCOVERY_ID}" --params '{{"codes":"{codes_str}"}}' '''
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
output = result.stdout
lines = output.split('\n')
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).
codes = list(INDEX_CODES.keys())
codes_str = ",".join(codes)
cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} call ths_ifind.real_time_quotation.v1 --discovery-id "{DISCOVERY_ID}" --params '{{"codes":"{codes_str}"}}' '''
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
output = result.stdout
lines = output.split('\n')
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).
print("正在使用QVeris获取汇率...")
# 先discover获取discovery_id
discover_cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} discover "exchange rate" 2>&1'''
discover_result = subprocess.run(discover_cmd, shell=True, capture_output=True, text=True, timeout=30)
discover_output = discover_result.stdout
# 提取discovery_id
The trigger phrases are broad enough to match common user requests like '日报' or '发送日报', which can cause this skill to activate in contexts where the user did not specifically intend to run a market-reporting workflow. Because the skill can generate output, send content to Feishu, and invoke external data-dependent automation, overbroad triggering increases the risk of unintended actions and disclosure to recipients.
The documentation describes generation, scheduling, Feishu targeting, and Markdown archiving, but does not prominently warn that running the skill may send reports to configured Feishu recipients and persist copies to disk. In a skill ecosystem, hidden or underemphasized side effects are dangerous because users may invoke the skill expecting analysis only, while it performs communication and local data retention that could expose sensitive content or create unintended audit artifacts.
The trigger list includes generic phrases such as '日报', '收盘报告', and '生成日报' that can plausibly appear in ordinary user requests, increasing the chance this skill activates unintentionally. Because the skill produces scheduled market reports and depends on external data sources and API-backed skills, accidental invocation could cause unintended data access, unexpected actions, or user confusion.
Natural-language strings throughout the file, including the module description and all generated report content, are fixed in Chinese with no indication of user language selection or opt-in. This can violate language/locale policy when a skill imposes a specific language without offering a choice.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
codes = list(INDEX_CODES.keys())
codes_str = ",".join(codes)
cmd = f'''export QVERIS_API_KEY="{QVERIS_API_KEY}" && cd /root/.openclaw/skills/qveris && node {QVERIS_TOOL} call ths_ifind.real_time_quotation.v1 --discovery-id "{DISCOVERY_ID}" --params '{{"codes":"{codes_str}"}}' '''
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
output = result.stdout
lines = output.split('\n')