T09 · Insecure Skill Coding Practices
- Location
SKILL.md:16- Finding
API Key Exposed Through Terminal Output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a straightforward Eastmoney financial-data API helper, but users should handle its API key carefully and avoid logging it.
Install only if you intend to send your financial query text to Eastmoney's API and have an Eastmoney API key available. Do not print the API key with `echo`; check only whether it is set, avoid logged terminals, and consider adding request timeouts and disabling redirects before production use.
SKILL.md:16API Key Exposed Through Terminal Output
scripts/query.py:29Credential-Bearing HTTP Request Follows Redirects
scripts/query.py:34Outbound API Request Has No Timeout
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
}
try:
response = requests.post(url, headers=headers, json=data)
response.raise_for_status()
result = response.json()
The skill performs privileged actions—reading an environment variable, making outbound network requests, and providing executable examples—without declaring an explicit tool scope such as permissions or allowed-tools. This weakens policy enforcement and reviewability, increasing the chance that an agent can invoke broader capabilities than intended when handling user-provided financial queries.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
curl -X POST --location 'https://mkapi2.dfcfs.com/finskillshub/api/claw/query' \
--header 'Content-Type: application/json' \
--header "apikey: $EASTMONEY_APIKEY" \
--data '{"toolQuery":"用户的查询内容"}'
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
try:
response = requests.post(url, headers=headers, json=data)
response.raise_for_status()
result = response.json()
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
try:
response = requests.post(url, headers=headers, json=data)
response.raise_for_status()
result = response.json()
No suspicious patterns detected.