T08 · Insecure Dependencies
- Location
SKILL.md:20- Finding
Unpinned Third-Party npm Package Receives Access to Private Zotero Documents
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 20–27 and 37–45
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumThe Skill directs users to install the latest available release of an external npm package without pinning a reviewed version or verifying its integrity. It subsequently instructs users to grant the installed software access to a Zotero storage directory containing potentially private papers and notes.
Relevant code:
markdown ## Installation You can install PapersGPT for Zotero globally using npm. This will make the `pz` and `pgz` commands available in your terminal. ```bash npm install papersgpt-for-zoteroAfter installation, ensure that you have your Zotero storage directory accessible and you are ready to use the
pzcommand. More information please see https://github.com/papersgpt/papersgpt-for-zotero.text ```markdown 1. **Initialize**: Run `pz init` once to link your Zotero storage and start the background indexing process. ```bash # Initialize with default Zotero path pz init # Initialize with a custom path pz init "/Users/name/Documents/Zotero/storage" ```Technical Analysis
The command
npm install papersgpt-for-zoterodoes not specify an exact package version or integrity digest. Consequently, the code installed depends on the package version published under that name at installation time. npm packages can also define lifecycle scripts that execute during installation with the permissions of the invoking user.After installation,
pz initis expected to access and index the user's Zotero storage. This creates a supply-chain trust boundary: an external package that is not included in the audited project is granted access to potentially sensitive local documents. The project contains onlySKILL.md, so the package's lifecycle scripts, network communication, local data handling, background service, and ind ...[truncated 1703 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the installation command to an exact, reviewed package version rather than implicitly installing the latest release.
- Record and verify the npm registry integrity value for the approved package artifact.
- Commit a lockfile where the installation workflow permits it, and use a reproducible installation command such as
npm ci. - Audit the package source, transitive dependencies, and npm lifecycle scripts before recommending installation.
- Publish the relevant implementation with the Skill or link to an immutable source revision so reviewers can verify the code corresponding to the pinned package.
- Document all expected network destinations, telemetry behavior, local index locations, file permissions, and retention policies.
- Recommend installation and execution under a dedicated, least-privileged account or sandbox with access limited to the required Zotero directory.
- Disable npm lifecycle scripts during installation when they are unnecessary, or explicitly document and review every required script.
- Add package provenance or signature verification and establish a controlled update process requiring security review before changing the approved version.
- Correct the installation documentation if global installation is intended, because the stated global behavior does not match the displayed command.
