Back to skill

Security audit

pywencai

Security checks for vulnerabilities and agentic risk

Overview

This skill appears purpose-aligned for querying iWenCai market data, but it should go to Review because it asks users to handle a live session cookie while relying on mutable third-party installs.

Install only if you are comfortable giving PyWenCai an authenticated iWenCai session cookie. Treat `WENCAI_COOKIE` like a password: keep it out of prompts, source files, logs, screenshots, and shared folders, and rotate it if exposed. Prefer pinned, reviewed dependency versions or a lockfile instead of `--upgrade`, and run the skill in a least-privilege environment with only the network and files it needs.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Mutable and Unverified Third-Party Dependencies

Content
View full analysis
=0.10.0 pandas>=1.5.0 ``` `SKILL.md:21` and `README.md:20`: ```bash pip install pywencai --upgrade ``` `demo_project/README.md:9`: ```bash pip install -r ../requirements.txt ``` ### Technical Analysis The project installs third-party packages using open-ended minimum-version constraints. It also explicitly recommends installing the newest available `pywencai` release with `--upgrade`. Consequently, installation results can change over time without any modification to this audited artifact. No lockfile, exact version pins, package hashes, or other integrity controls constrain the downloaded artifacts to reviewed versions. A future package release would therefore be trusted and executed automatically when users follow the documented installation process. This risk is particularly relevant for `pywencai` because the Skill supplies it with an authenticated iWenCai session cookie and states that the package executes JavaScript through Node.js. The actual `pywencai` implementation is not bundled in this project, so its runtime handling of credentials, network traffic, and JavaScript cannot be verified by this audit. There is no evidence that the dependency versions currently available are malicious. The vulnerability is the project's mutable and non-reproducible dependency trust model. ### Attack Path 1. An attacker compromises a future release, maintainer account, distribution infrastructure, or transitive dependency associated with `pywencai` or `pandas`. 2. The attacker publishes a release satisfying the unrestricted `>=` constraint, or the release becomes the version selected by `pip install pywencai --upgrade`. 3. A user follows the document ...[truncated 1161 chars]
Remediation
View remediation
pandas== ``` 2. Generate and commit a reproducible lockfile covering direct and transitive dependencies. 3. Require package hashes during installation, for example by generating a hash-locked requirements file and installing it with: ```bash pip install --require-hashes -r requirements.lock ``` 4. Remove unconditional `--upgrade` instructions. Dependency upgrades should occur only through a controlled review process that examines release changes and regenerates approved hashes. 5. Configure installation to use a trusted package index and disallow unexpected alternate or supplemental indexes. 6. Run dependency vulnerability and provenance checks in continuous integration before approving updates. 7. Execute the Skill in a least-privilege environment with restricted filesystem access and outbound network access limited to required destinations. 8. Keep the iWenCai cookie in a protected secret store or environment variable, avoid embedding it in source code, and use a dedicated session with the minimum available account privileges. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (11)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation instructs users to provide a live website cookie for authenticated access but does not warn that cookies are sensitive credentials equivalent to session tokens. In practice, users may hardcode, log, share, or commit the cookie, enabling account/session hijacking or unauthorized use of the linked iWenCai account if the token is exposed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README instructs users to extract and provide a live website cookie for authentication, but it does not warn that this cookie is a sensitive session credential equivalent to account access. In an agent or shared environment, users may paste the cookie into code, logs, notebooks, or prompts, creating a realistic risk of session theft and unauthorized use of the linked account.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The description states the tool is used with Chinese natural-language queries, and later guidance reinforces that queries should be written in Chinese. This imposes a language-specific constraint without giving users an opt-in choice or clearly framing the limitation as a justified region- or service-specific requirement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly instructs users to extract a live authenticated Cookie from browser developer tools and pass it into code, but it does not warn that this credential is sensitive. In an AI-agent context, that omission increases the chance the cookie will be pasted into prompts, logs, source files, notebooks, or shared artifacts, enabling account/session hijacking or unauthorized access to paid/query features.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

Lines L7 and L11 state that the tool uses Chinese natural language queries, which can amount to a language restriction. The README does not indicate user opt-in, alternatives, or a justification that the locale constraint is required by the upstream service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The example writes query results to a local Excel file without warning that exported market screens or account-scoped results may contain sensitive or proprietary data. This can lead users or agents to leave unprotected files on disk or in synced/shared directories, causing unintended disclosure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file presents all user-facing instructions in Chinese, including the title and execution steps. The policy requires flagging language or locale constraints when they are imposed without user opt-in or documented justification, and no alternative language option or explanation is provided here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description states that the tool uses Chinese natural-language queries, which imposes a specific language expectation. Under the policy, language constraints should either be optional for the user or clearly justified as region-specific; this text does not present it as a user choice.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

The dependency specifier pywencai>=0.10.0 is unpinned, so installs may pull different future versions over time. This creates a supply-chain and reproducibility risk because a later release could introduce malicious code, breaking changes, or newly vulnerable behavior without any review by the skill author.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
pywencai>=0.10.0
pandas>=1.5.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The dependency specifier pandas>=1.5.0 is unpinned, meaning builds are not reproducible and may silently consume future releases. In a package that processes market data, this increases supply-chain exposure because a compromised or incompatible upstream version could be installed automatically.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
pywencai>=0.10.0
pandas>=1.5.0

Unverifiable Dependency: pandas has 1 known advisory(ies) (CVE-2020-13091 (** DISPUTED ** pandas through 1.0.3 can unserialize and execute commands from an)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
85% confidence
Finding

pandas has a known disputed advisory affecting some historical versions, and because the manifest does not pin a specific release, it is impossible to verify whether deployment will install an affected version. Even if the cited issue is disputed and older, the lack of version pinning prevents assurance that only non-affected versions are used.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.