T09 · Insecure Skill Coding Practices
- Location
scripts/query_industry_information.py:35- Finding
FEEDAX API Key and Search Data Transmitted Over Plaintext HTTP
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill’s news-query purpose is legitimate, but it handles API credentials in unsafe ways and sends them over plaintext HTTP.
Review before installing. Do not paste API keys into chat, do not let an agent print `.env`, and rotate any FEEDAX key already used with this version. Only use this skill if the endpoint is changed to HTTPS and the key is passed through a secure environment or secret store without appearing in URLs or logs.
scripts/query_industry_information.py:35FEEDAX API Key and Search Data Transmitted Over Plaintext HTTP
SKILL.md:23Overbroad Environment File Inspection and Unnecessary Credential Retention Request
README.md:51Unpinned Third-Party Dependency Installation
The skill explicitly instructs access to .env, a common repository of secrets, to verify API key presence. In context, this is more dangerous because .env often stores multiple credentials; reading it exposes far more than the single FEEDAX key needed for the stated functionality.
查看 .env 文件是否存在且包含有效的 API Key:
cat .env
Requesting that users provide their API key to the agent so it can 'remember' it is an unsafe credential-handling pattern with no warning about privacy, storage, or exposure. In skill context, this is especially dangerous because the requested secret is unrelated to conversational memory and could be retained in logs, model context, or downstream systems.
The instruction to ask the user for the API key and 'remember' it is a direct request to retain a secret in natural-language agent memory. This is dangerous because LLM memory, chat transcripts, and telemetry are not appropriate secret stores and may later reveal the credential to unauthorized parties or unrelated tasks.
The command cat .env | grep FEEDAX_API_KEY still requires opening a secret file and may surface credential material in terminal output, logs, or model-visible context. Even targeted grep-based checks are inappropriate when the agent does not need direct secret access to perform news retrieval.
cat .env | grep FEEDAX_API_KEY
The execution flow repeats the instruction to solicit and remember the user's API key, reinforcing insecure credential collection and persistence as a required operational step. Repetition in procedural steps makes accidental compliance by the agent more likely and increases the chance of long-term secret exposure.
The script hardcodes a plain HTTP base URL and sends the API key in both the query string and headers, along with user search terms and returned metadata. This exposes credentials and potentially sensitive query activity to interception or modification by any party on the network path, and the query-string placement further increases leakage via logs, proxies, and monitoring systems.
The README describes querying industry information via the FEEDAX API but does not clearly warn that user-supplied keywords and query parameters will be transmitted to an external third-party service. This creates a privacy and data-handling transparency issue: users may unknowingly send sensitive research interests, internal project names, or regulated business context outside their environment.
The skill invokes capabilities to read environment files, execute shell/Python commands, write local files, and access a remote API, but it declares no explicit tool scope or permissions boundary. This mismatch increases the chance an agent will perform sensitive actions without clear user/admin approval or sandboxing expectations.
The skill directs the agent to inspect the local .env file using shell commands to determine whether an API key exists. Reading a general secret file is broader than necessary for the task and can expose unrelated credentials or sensitive configuration contents to the agent and logs.
The skill explicitly instructs the agent to ask the user for an API key 'so it can remember' it, which turns a news-query workflow into credential collection and retention. Asking an LLM agent to store secrets in conversation or memory creates a clear risk of credential exposure, reuse outside user intent, or later leakage in prompts/logs.
The skill requires automatic saving of all returned data to local CSV and Markdown files without clear prior notice or consent about persistence. This creates privacy and data-governance risk because potentially sensitive query results and content are retained on disk by default and may be accessible to other users or processes.
The skill prescribes executing local shell and Python CLI commands as part of normal operation, expanding the attack surface beyond simple query/analysis behavior. If user-controlled inputs flow into command construction or if the script is modified locally, this can lead to command misuse, unauthorized file access, or unintended system interaction.
The execution flow tells the agent to read .env to inspect API key configuration without warning that this file may contain sensitive credentials. Even if only one variable is intended, the behavior normalizes secret-file access and risks over-collection or accidental disclosure in command output.
The module docstring, CLI description, help text, and user-facing messages are presented in Chinese only, which imposes a specific language on users without any opt-in or alternative locale. Under the stated policy, forcing a language without user choice is a natural-language policy violation.
This code transmits user-supplied keywords and associated request metadata to an external service, which is expected for the skill but still constitutes data exfiltration from the local environment to a third party. In this specific skill context, external transmission is necessary functionality, but it becomes riskier because the destination is an IP-based endpoint over insecure HTTP and the transmitted data includes an API key.
}
try:
response = requests.post(url, params=params, headers=headers, json=payload, timeout=60)
response.raise_for_status()
return response.json()
except requests.exceptions.RequestException as e:
The README specifically directs use of an English-language variant ("Readme_en.md") as a supported language example, which can imply a language preference without offering user choice or documenting a justified locale constraint. This is a natural-language policy concern because the file is explicitly language-scoped yet does not explain whether language selection is optional or user-driven.
全文说明、示例对话、参数解释和输出示例均默认使用中文,没有提供语言选择、用户偏好说明或该语言限制的业务理由。根据语言/locale 政策,技能不应在未获用户明确选择的情况下强制单一语言。
No suspicious patterns detected.