T08 · Insecure Dependencies
- Location
skill.md:7- Finding
Unreviewed Third-Party Package Receives the API Credential
- Content
View full analysis
Vulnerability Details
File Location:
skill.md:7-9,skill.md:41,skill.md:58,skill.md:67-73,requirements.txt:1,reference/场景Agent/个股详情分析.md:25, andreference/场景Agent/高管增减持详细分析.md:25
Vulnerability Type: T08: Insecure Dependencies
Risk Level: MediumVulnerable Code
skill.md:7-9:yaml install_command: pip install 'equal-data==0.0.12' required_env_vars: - EQUAL_DATA_API_KEYskill.md:41andskill.md:58:bash pip install equal-data==0.0.12skill.md:67-73:python from equal_data import EqualDataApi import os # Read API_KEY from the environment variable or a locally recorded API_KEY API_KEY = os.getenv('EQUAL_DATA_API_KEY') api = EqualDataApi(API_KEY) data = api.query_equal_data( interfaceId="B6",requirements.txt:1:text equal-data==0.0.12reference/场景Agent/个股详情分析.md:25andreference/场景Agent/高管增减持详细分析.md:25:bash pip install equal-data==0.0.12 -i https://pypi.tuna.tsinghua.edu.cn/simpleTechnical Analysis
The audited artifact does not contain the implementation of the
equal_datamodule. Instead, all functional behavior is delegated to the externalequal-data==0.0.12distribution. Installing a Python package may execute package-controlled build or installation logic, while importing and invoking it executes code that is outside the reviewed artifact.The external package is also given
EQUAL_DATA_API_KEYdirectly. Consequently, the security of the credential and all runtime behavior depends on an implementation that could not be inspected during this audit. Exact version pinning reduces unintended version changes but does not verify package integrity or provenance because no cryptographic hashes are provided.Two scenario documents direct users to an alternate package index. Although the named mirror is not itself evidence of compromise, using additional distribution infrastructure ex ...[truncated 2101 chars]
- Remediation
View remediation
Remediation Suggestions
- Publish or bundle the exact source corresponding to
equal-data==0.0.12so its installation, networking, and credential-handling behavior can be audited. - Generate a locked dependency file containing SHA-256 hashes and require hash verification during installation, for example with
pip install --require-hashes -r requirements.txt. - Verify that the package name, PyPI publisher, source repository, release tag, and packaged source all correspond to the same maintainers and commit.
- Reconcile the conflicting repository URLs in
metadata.jsonandskill.md, and document one authoritative source repository. - Prefer the canonical package index. If an alternate mirror remains documented, explain its trust assumptions and require the same package hashes regardless of index.
- Document the precise API endpoint to which the credential is sent and confirm that TLS certificate verification is enforced.
- Run the dependency in a restricted environment with minimal filesystem access, a narrowly scoped API key, limited environment variables, and constrained outbound network access.
- Avoid storing the API key directly in shell startup files or plaintext configuration where possible. Use a dedicated secret manager or restricted configuration file and rotate the key if dependency integrity is ever in doubt.
- Publish or bundle the exact source corresponding to
