T09 · Insecure Skill Coding Practices
- Location
scripts/query_bond_information.py:36- Finding
API Key Transmitted over Unencrypted 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 performs the advertised bond-news querying, but its handling of API keys and local output is risky enough that users should review it before installing.
Install only if you are comfortable sending bond-search terms and a FEEDAX API key to the FEEDAX service, and avoid using this version with production credentials unless the endpoint is changed to HTTPS and the key is removed from URLs. Do not paste API keys into chat, do not let the agent print .env, prefer protected environment-variable injection, and use --no-output or a controlled output directory for sensitive research.
scripts/query_bond_information.py:36API Key Transmitted over Unencrypted HTTP and Repeated in the Request URL
SKILL.md:20Skill Instructions Direct the Agent to Print Secret Configuration
scripts/query_bond_information.py:319API Keys May Be Exposed through Process Arguments and Plaintext Configuration Files
README.md:52Unpinned Third-Party Dependency Installation
The skill instructs the agent to inspect .env directly using shell commands, which is credential-access behavior because .env commonly contains secrets beyond the FEEDAX key. A bond-news skill does not need broad file inspection, and reading .env can expose unrelated credentials if output is logged or surfaced.
查看 .env 文件是否存在且包含有效的 API Key:
cat .env
The skill explicitly tells the user to provide an API key to the assistant 'so I can remember it,' which encourages collection and retention of a secret in chat memory. A bond-information skill has no legitimate need for the assistant to store user credentials conversationally, so this creates a clear secret-handling risk and potential credential leakage path.
The instruction to have the user provide an API key directly to the assistant and store it in memory is an unsafe secret-collection pattern. Chat transcripts and memory systems are not appropriate secret stores, so this can lead to inadvertent disclosure, reuse, or exfiltration of the credential.
The workflow explicitly runs cat .env | grep FEEDAX_API_KEY, which is direct credential discovery against a common secret file. Even targeted grepping of .env is risky because it normalizes secret-file access and may reveal secret material in command output, logs, or error traces.
cat .env | grep FEEDAX_API_KEY
The README documents an external FEEDAX API endpoint and default CSV/MD output behavior, but it does not clearly warn users that their search keywords and related query data are transmitted to a third-party service and that returned data is written to local files by default. In a bond-risk monitoring context, queries may reveal sensitive investment interests, issuer watchlists, or internal risk investigations, so the omission can cause unintentional data disclosure to both the API provider and local storage.
The skill uses capabilities that go beyond simple bond-news querying—reading environment files, executing shell commands, writing files, and making network requests—yet it declares no explicit tool scope or permission boundaries. This increases the blast radius if the skill is invoked unexpectedly or if later instructions are abused to access local data or persist sensitive outputs.
Telling the user to share an API key 'so I can remember it' encourages the assistant to collect and retain a credential beyond immediate use. Secret retention in conversation or memory systems increases the risk of later accidental disclosure, cross-task exposure, or misuse if logs are accessible.
The skill automatically saves all returned data to local CSV and Markdown files even though the skill is presented primarily as a query/monitoring function. Silent persistence can expose sensitive query results, create unintended retention, and leave local artifacts on disk without the user's informed consent.
The skill states that all returned data will be automatically written to CSV and MD files without a clear upfront warning or consent step. Even if the data is not always highly sensitive, automatic persistence can leak research activity, proprietary watchlists, or risk-monitoring outputs to local storage where other processes or users may access them.
The workflow mandates shell-based inspection of local files and execution of a CLI script as part of normal operation, which exceeds the stated purpose of retrieving bond information. This introduces unnecessary command-execution and filesystem access, expanding the attack surface and increasing the chance of sensitive local-data exposure or misuse of host capabilities.
The repeated workflow step reinforces asking the user for the API key in chat for later memory/retention, normalizing unsafe handling of secrets. Repetition makes the behavior more likely to be followed and increases the chance that sensitive credentials enter logs, memory, or transcripts.
The script places the API key directly in the request URL and again in query parameters, while also using plain HTTP to a fixed IP address. Query-string secrets are commonly exposed through logs, proxies, browser/history equivalents, monitoring systems, and server access logs, making credential leakage significantly more likely than if the key were sent only in an authorization header over HTTPS.
The script transmits user query content and API credentials to an external service, which is expected for this skill, but it does so to a hardcoded third-party endpoint over insecure HTTP. In this context, the external transmission becomes security-relevant because bond-related search terms and returned intelligence may be sensitive, and the lack of transport security enables interception or tampering in transit.
}
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 file includes natural-language guidance to use language-specific README files such as "Readme_en.md" and "Readme_zh.md", which implies a locale-specific documentation convention. Because this file is specifically an English README and does not present any user opt-in or justification for language selection within the skill documentation, it may conflict with language/locale policy requirements.
SQP-3 applies to all file types and covers natural-language policy violations such as forcing a specific language without user opt-in. The entire skill documentation, parameters, examples, and expected values are presented only in Chinese, with no indication that other language options are supported or that the Chinese-only scope is intentional and justified.
The documented behavior includes sourcing API keys from environment variables or local config files, but this access is not clearly disclosed in the manifest's high-level description. While reading credentials from secure local sources can be legitimate, the undisclosed local secret access weakens transparency and makes the skill more sensitive than advertised.
Natural-language strings in the module docstring, help text, and runtime output consistently force a specific language for all users. There is no opt-in, alternative locale, or explanation that the tool is intentionally region-specific.