T09 · Insecure Skill Coding Practices
- Location
scripts/p002_applicant_search.py:55- Finding
API Token Exposure Through Command-Line Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a disclosed Zhihuiya patent-search helper with some implementation and documentation quality issues, but I did not find hidden, destructive, persistent, or deceptive behavior.
Install only if you are comfortable granting a Zhihuiya API token for patent searches. Use the ZHIHUIYA_API_TOKEN environment variable rather than --token, avoid feeding untrusted applicant names directly, and treat P002 count results cautiously until the collapse_order_authority conflict is fixed.
scripts/p002_applicant_search.py:55API Token Exposure Through Command-Line Arguments
scripts/p002_applicant_search.py:25Query-Language Injection Through Unescaped Applicant Name
scripts/p002_applicant_search.py:14Prohibited Collapse Authority Parameter Causes Search Result Integrity Errors
声明描述的是一个具备具体专利检索能力的技能,但实际代码只是最小化占位脚本,仅输出一行文本,没有任何与专利、网络请求、API 封装、查询参数处理或数据去重相关的实现。因此代码实际行为与声明用途存在明显且实质性的不一致,应判定为 mismatch。
The skill documents use of environment-injected secrets and outbound network access, but it does not declare any tool scope or allowed-tools boundary. In an agent environment, missing explicit capability declarations can lead to over-broad execution privileges, making secret access and external API calls less governable and harder to audit.
The markdown specifies a fixed natural-language parameter lang: "cn" for A002, and the summary reiterates lang=cn as a required setting. This imposes a specific language/locale behavior in the skill documentation without offering opt-in, alternatives, or a clear justification that the skill is region-specific by policy.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"page": page,
"page_size": page_size
}
resp = requests.post(API_URL, headers=headers, json=payload, timeout=30)
resp.raise_for_status()
data = resp.json()
if not data.get("status"):
This markdown file contains user-facing instructions only in Chinese, which can amount to a language/locale policy issue when no opt-in or alternative language is provided. The content does not indicate that the skill is region-specific or that Chinese-only documentation is required.