T09 · Insecure Skill Coding Practices
- Location
scripts/query_company_information.py:35- Finding
API Key Transmitted over Plaintext HTTP and Repeated in the Request URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent company-news lookup tool, but it handles API credentials unsafely and sends them over unencrypted HTTP.
Review before installing. Do not paste API keys into chat or let the agent read full `.env` files. Prefer a scoped environment variable or secure secret store, avoid `--api-key` command-line usage, and do not use this version unless FEEDAX access can be made HTTPS-only. Treat exported CSV/Markdown reports as retained local records of your queries and results.
scripts/query_company_information.py:35API Key Transmitted over Plaintext HTTP and Repeated in the Request URL
SKILL.md:24Unsafe Secret Inspection and Solicitation of API-Key Retention
scripts/query_company_information.py:431Command-Line API-Key Option Exposes Credentials through Process Metadata and Shell History
scripts/query_company_information.py:157Spreadsheet Formula Injection in Generated CSV Reports
README.md:59Unpinned Third-Party Dependency Installation
The skill explicitly instructs reading the .env file, which is a common repository of secrets. Direct local credential access is dangerous because it can expose unrelated secrets and violates least-privilege for a company-news monitoring function.
查看 .env 文件是否存在且包含有效的 API Key:
cat .env
These instructions tell the agent to obtain API keys from local secret stores and, if missing, ask the user to disclose the key 'so I can remember it.' That creates a direct credential-handling risk by encouraging secrets to be read from disk and copied into the conversation or model memory, which is unnecessary and unsafe for a news-query skill.
The instruction to have the user provide an API key 'so I can remember it' is improper credential collection guidance. It encourages users to disclose secrets in natural-language chat and implies persistent storage by the assistant, which can lead to credential theft or misuse.
The workflow prescribes 'cat .env | grep FEEDAX_API_KEY' as an operational step, explicitly directing secret discovery from local files. This is a clear credential-access pattern and is unjustified by the skill's stated purpose, making secret leakage more likely.
cat .env | grep FEEDAX_API_KEY
The script hardcodes an HTTP base URL and sends the API key in both the query string and headers to that endpoint. Because HTTP is unencrypted, any on-path observer can capture the credential and the queried company/intelligence data, enabling credential theft, replay, and surveillance of user activity.
The skill documentation forces a single language presentation and does not indicate that Chinese is optional, user-selected, or required for a justified region-specific use case. This matches the language/locale policy violation criterion for natural-language policy issues.
The skill uses capabilities that imply access to environment secrets, local files, file output, and network requests, but it declares no explicit tool scope or permission boundaries. That mismatch increases the chance an agent will perform sensitive actions implicitly, such as reading credentials or writing persistent files, without clear authorization.
The manifest description, triggers, and operational instructions are all presented in Chinese, which effectively imposes a language constraint on users. Under the stated policy, locale or language restrictions should either be optional for the user or clearly justified as region-specific.
The skill makes shell-based local inspection a normal operating step by directing the agent to run commands like 'cat .env'. This is broader than needed for company-news lookup and expands the attack surface to local system and secret exposure.
Requesting the user's API key and saying the assistant should 'remember' it normalizes unsafe credential handling. In the context of an agent skill, this is especially risky because secrets can be logged, retained, or reused outside the user's expectations.
The skill mandates automatic creation of local CSV and Markdown files containing all returned data, even when the user only asked for conversational lookup. Unnecessary persistence increases data exposure risk and can leave sensitive or regulated content on disk without user intent or retention controls.
Automatically saving all returned data to local files without clear up-front warning or consent is a privacy and data-handling issue. Even if the content is mostly public news, the generated files may contain query history, derived analysis, and persistent records the user did not expect.
The workflow repeats the request that the user provide the API key for the assistant to remember, reinforcing unsafe secret-sharing behavior. Repetition in the execution flow makes accidental credential disclosure more likely during normal use.
The natural-language interface, usage text, help content, and user-facing messages are written in Chinese only, which effectively imposes a specific language on users. There is no opt-in, alternative locale, or justification that this tool is intentionally restricted to a Chinese-language environment.
External transmission is expected for an API client, so the mere use of requests.post is not inherently vulnerable. However, in this skill context it becomes security-relevant because the POST sends potentially sensitive company-monitoring queries and API credentials to an external host, and the configured transport is plain HTTP, increasing exposure risk.
}
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:
This markdown file explains that the skill generates CSV and Markdown output files and lists fields including news正文、摘要、URL等, but it does not provide a clear user-facing warning about local data persistence or sensitivity considerations. Under SQP-2 for markdown files, behaviours affecting user data or system state should be disclosed clearly.
Section 7.1 explicitly requires 11 core fields in the dialogue output, including event tags, while the later execution flow says the dialogue should show '10 个必须展示字段'. This is an active contradiction in the skill's own instructions about intended output behavior.
No suspicious patterns detected.