T09 · Insecure Skill Coding Practices
- Location
skill.yaml:46- Finding
Account Credentials Are Unnecessarily Declared as Invocation Parameters
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill’s market-data purpose is legitimate, but its documentation and manifest can lead users to submit account passwords in ordinary skill calls even though the code uses environment variables instead.
Install only if you configure TQ_USERNAME and TQ_PASSWORD through a protected secret or environment-variable mechanism. Do not put the Tianqin username or password in prompts, chat messages, README-style JSON examples, or normal skill request parameters. Review dependency pinning before use in a sensitive environment.
skill.yaml:46Account Credentials Are Unnecessarily Declared as Invocation Parameters
requirements.txt:1Unbounded Dependency Versions Create Supply-Chain Exposure
The README instructs users to provide a username and password for a third-party market-data service, but it does not clearly state that these credentials will be transmitted externally during skill execution. This creates a real secret-handling and informed-consent risk: users may provide credentials without understanding where they go, how they are used, or whether the skill stores, logs, or forwards them.
The skill requires sensitive credentials via environment variables (TQ_USERNAME and TQ_PASSWORD) but does not declare any tool scope or permission boundary in the manifest. This creates an avoidable trust gap: operators and review systems cannot clearly see that the skill depends on secret access, increasing the risk of overbroad deployment or unnoticed secret exposure through future code changes.
The natural-language content of the manifest and README-style instructions is presented only in Chinese, including parameter descriptions, usage notes, and troubleshooting guidance. This effectively forces a specific language for users without any opt-in or explicit statement that the skill is intended only for Chinese-speaking or region-specific users.
The manifest describes a skill for retrieving real-time and historical futures/options market data. While network access to the TqSdk service is expected for that purpose, directly reading TQ_USERNAME and TQ_PASSWORD from environment variables introduces credential-access capability that is not stated in the skill purpose and is not inherent from the manifest text alone.
The manifest explicitly requires a username and password for a third-party trading data account, but it does not include any user-facing notice about sensitive credential handling, storage, transmission, or logging. In a skill ecosystem, collecting raw credentials without clear safeguards increases the risk of accidental exposure through logs, debugging output, or insecure secret management.
This code initiates an authenticated connection to an external service via TqApi/TqAuth using the provided username and password. While the class docstrings describe functionality, there is no visible confirmation, logging, or explicit warning that credentials will be used to establish a remote connection and transmit market-data requests.
A language or locale policy issue exists when a skill forces a specific language without user opt-in. This README presents all operational instructions in Chinese and does not mention any user language choice or justified locale restriction.
The dependency tqsdk is specified with a lower-bound only (>=3.0.0), which makes builds non-reproducible and allows future releases to be installed without review. That increases supply-chain risk because a compromised, malicious, or breaking upstream release could be pulled in automatically.
tqsdk>=3.0.0
pandas>=1.3.0
The pandas dependency is also unpinned, so installations may resolve to different versions over time. This weakens reproducibility and can expose consumers to newly introduced vulnerable or incompatible upstream releases.
tqsdk>=3.0.0
pandas>=1.3.0
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.
The natural-language content in the manifest is entirely Chinese, which can force a specific language on users without opt-in or an alternative. The policy calls for flagging language or locale constraints when the skill does not explicitly offer a choice or justify the restriction.
Multiple docstrings are written only in Chinese, which can impose a language-specific experience without user opt-in. The file does not indicate that the skill is region-specific or provide an alternative language option.
The class is presented as a straightforward wrapper for the 天勤量化 API, but in aexit it uses await self._api.close(), while TqApi.close() is commonly a synchronous cleanup method. This is not a manifest-level scope issue, but it does indicate the async cleanup intent in the code diverges from the underlying operation and may fail at runtime rather than performing the documented resource cleanup.
No suspicious patterns detected.