T09 · Insecure Skill Coding Practices
- Location
scripts/opd_query.py:146- Finding
API Key Exposure Through Unvalidated Cross-Origin Redirects
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent OPD financial-data client, but it needs review because its API-key handling is weaker than its stated safety boundary.
Install only if you trust OPD and are comfortable storing an OPD API key locally. Prefer a restricted account/key, check permissions on ~/.opd/api_key, avoid sharing keys in chat or logs, and treat results containing contact, shareholder, salary, birth-date, or resume fields as sensitive.
scripts/opd_query.py:146API Key Exposure Through Unvalidated Cross-Origin Redirects
scripts/opd_query.py:109Plaintext API Key File Created Without Explicit Restrictive Permissions
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"Accept": "application/json",
})
try:
with urllib.request.urlopen(req, timeout=60) as resp:
body = resp.read().decode("utf-8")
except urllib.error.HTTPError as e:
body = e.read().decode("utf-8", "replace")
Referenced artifact was not completely inspected
### 财务信息(references/catalog_finance.md,16 个接口)
The skill performs privileged actions—reading environment variables, writing a local API key file, and making outbound network requests—but does not declare an explicit tool scope such as permissions or allowed-tools. That creates a governance gap: the runtime and reviewers cannot enforce least privilege from the manifest alone, increasing the chance of unintended capability exposure or future drift beyond the documented behavior.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
opd_xxx。注册/订阅等管理操作在 https://data.originp.com/ 完成(该站提供页面服务);https://api.originp.com 为接口调用地址,专供程序调用、不含页面。注意:除 Key 外还需订阅所需接口(试用或购买套餐),未订阅的接口调用会返回 BIZ_INTERFACE_FORBIDDEN。python scripts/opd_query.py --set-key
This markdown file documents authenticated access via X-API-Key and multiple endpoints that return named shareholders, management personnel, resumes, birth dates, salaries, and related governance data. Under the markdown-file criteria, the description should warn users about privacy, credential handling, or data-sensitivity impacts, but no such warning appears near the authentication or dataset descriptions.
This markdown file presents all operational instructions, parameter descriptions, and usage details exclusively in Chinese. Under the policy, forcing a specific language without user opt-in or a documented justification is a natural-language policy violation.
This markdown file includes authentication instructions using the X-API-Key header, which is a credential-bearing operation. The document explains how to supply the key but does not include any user warning about keeping the key secret, avoiding client-side exposure, or handling it securely.
The file again instructs users to send X-API-Key: opd_xxx for authentication but provides no warning about credential sensitivity. Because this is user-facing markdown documenting credential use, a short disclosure about safe handling is warranted.
This section tells users to authenticate with an API key header but does not mention any privacy or security implications of using a secret credential. In markdown documentation, omission of such a warning can lead to unsafe handling or accidental disclosure.
The markdown specifies an X-API-Key value for authenticated access but provides no warning about safeguarding that key. Since the skill description covers behavior affecting credential handling, it should disclose the sensitivity of the secret.
This section documents passing an API key in the request header but contains no warning about secure storage or accidental leakage. For markdown files, omission of warnings around credential use is a relevant quality and safety issue.
The file repeatedly instructs use of X-API-Key: opd_xxx yet never warns users about credential confidentiality. That omission reduces safety for a skill description involving authenticated access.
This markdown file documents requests requiring an X-API-Key header, which affects user privacy and system integrity because it involves credential use. The page provides authentication details but no caution about protecting the key, avoiding exposure in logs/shared examples, or using secure storage.
该 markdown 文档从标题到全部接口说明均仅以中文呈现,没有说明可切换语言、可提供英文版本,或该语言限制仅适用于特定地区/用户群。根据规则,强制单一语言而无用户选择可能构成语言/locale 政策问题。