Gathering detailed insights and metrics for adm-zip
Gathering detailed insights and metrics for adm-zip
Gathering detailed insights and metrics for adm-zip
Gathering detailed insights and metrics for adm-zip
A Javascript implementation of zip for nodejs. Allows user to create or extract zip files both in memory or to/from disk
npm install adm-zip
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.8
Supply Chain
96.1
Quality
79.3
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
1,241,529,357
Last Day
1,254,062
Last Week
7,408,210
Last Month
28,880,856
Last Year
284,123,880
MIT License
2,100 Stars
455 Commits
374 Forks
39 Watchers
4 Branches
89 Contributors
Updated on Apr 29, 2025
Minified
Minified + Gzipped
Latest Version
0.5.16
Package Id
adm-zip@0.5.16
Unpacked Size
118.64 kB
Size
26.42 kB
File Count
19
NPM Version
10.8.2
Node Version
22.4.1
Published on
Aug 30, 2024
Cumulative downloads
Total Downloads
5
ADM-ZIP is a pure JavaScript implementation for zip data compression for NodeJS.
With npm do:
$ npm install adm-zip
Electron file system support described below.
The library allows you to:
There are no other nodeJS libraries that ADM-ZIP is dependent of
1var AdmZip = require("adm-zip"); 2 3// reading archives 4var zip = new AdmZip("./my_file.zip"); 5var password = "1234567890"; 6var zipEntries = zip.getEntries(); // an array of ZipEntry records - add password parameter if entries are password protected 7 8zipEntries.forEach(function (zipEntry) { 9 console.log(zipEntry.toString()); // outputs zip entries information 10 if (zipEntry.entryName == "my_file.txt") { 11 console.log(zipEntry.getData().toString("utf8")); 12 } 13}); 14// outputs the content of some_folder/my_file.txt 15console.log(zip.readAsText("some_folder/my_file.txt")); 16// extracts the specified file to the specified location 17zip.extractEntryTo(/*entry name*/ "some_folder/my_file.txt", /*target path*/ "/home/me/tempfolder", /*maintainEntryPath*/ false, /*overwrite*/ true); 18// extracts everything 19zip.extractAllTo(/*target path*/ "/home/me/zipcontent/", /*overwrite*/ true); 20 21// creating archives 22var zip = new AdmZip(); 23 24// add file directly 25var content = "inner content of the file"; 26zip.addFile("test.txt", Buffer.from(content, "utf8"), "entry comment goes here"); 27// add local file 28zip.addLocalFile("/home/me/some_picture.png"); 29// get everything as a buffer 30var willSendthis = zip.toBuffer(); 31// or write everything to disk 32zip.writeZip(/*target file name*/ "/home/me/files.zip"); 33 34// ... more examples in the wiki
For more detailed information please check out the wiki.
ADM-ZIP has supported electron original-fs for years without any user interractions but it causes problem with bundlers like rollup etc. For continuing support original-fs or any other custom file system module. There is possible specify your module by fs option in ADM-ZIP constructor.
Example:
1const AdmZip = require("adm-zip"); 2const OriginalFs = require("original-fs"); 3 4// reading archives 5const zip = new AdmZip("./my_file.zip", { fs: OriginalFs }); 6. 7. 8.
5.5/10
Summary
Arbitrary File Write in adm-zip
Affected Versions
< 0.4.11
Patched Versions
0.4.11
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
2 existing vulnerabilities detected
Details
Reason
Found 6/19 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-04-21
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreLast Day
44%
1,254,062
Compared to previous day
Last Week
19.4%
7,408,210
Compared to previous week
Last Month
2.1%
28,880,856
Compared to previous month
Last Year
39.2%
284,123,880
Compared to previous year