pompelmi 0.15.1 → 0.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +26 -24
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,11 +1,12 @@
1
+ <!-- HERO START -->
1
2
 
2
3
  <p align="center">
3
4
 
4
5
  <br/>
5
- <a href="https://www.producthunt.com/products/pompelmi?embed=true&utm_source=badge-featured&utm_medium=badge&utm_source=badge-pompelmi" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=1010722&theme=light&t=1756653468504" alt="pompelmi - free&#0044;&#0032;open&#0045;source&#0032;file&#0032;scanner | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
6
+ <a href="https://www.producthunt.com/products/pompelmi?embed=true&utm_source=badge-pompelmi&utm_medium=badge" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=1010722&theme=light&t=1756653468504" alt="pompelmi - free&#0044;&#0032;open&#0045;source&#0032;file&#0032;scanner | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
6
7
  <br/>
7
8
  <a href="https://github.com/pompelmi/pompelmi" target="_blank" rel="noopener noreferrer">
8
- <img src="https://raw.githubusercontent.com/pompelmi/pompelmi/refs/heads/main/assets/logo.svg" alt="pompelmi logo" width="360" height="280" />
9
+ <img src="https://raw.githubusercontent.com/pompelmi/pompelmi/refs/heads/main/assets/logo.svg" alt="pompelmi logo" width="360" />
9
10
  </a>
10
11
  <br/>
11
12
  <a href="https://www.detectionengineering.net/p/det-eng-weekly-issue-124-the-defcon"><img alt="Featured in Detection Engineering Weekly #124" src="https://img.shields.io/badge/featured-Detection%20Engineering%20Weekly-0A84FF?logo=substack"></a>
@@ -18,13 +19,10 @@
18
19
 
19
20
 
20
21
  <p align="center">
21
- <img src="assets/video.gif" alt="pompelmi demo" width="920" />
22
- <br/>
23
- <br/>
22
+
24
23
  <strong>Fast file‑upload malware scanning for Node.js</strong> — optional <strong>YARA</strong> integration, ZIP deep‑inspection, and drop‑in adapters for <em>Express</em>, <em>Koa</em>, and <em>Next.js</em>. Private by design. Typed. Tiny.
25
24
  </p>
26
25
 
27
- assets/video.mp4
28
26
 
29
27
 
30
28
  <p align="center">
@@ -51,14 +49,16 @@ assets/video.mp4
51
49
  <a href="#configuration">Config</a> ·
52
50
  <a href="#production-checklist">Production checklist</a> ·
53
51
  <a href="#yara-getting-started">YARA</a> ·
54
- <a href="#quick-test-eicar">Quick test</a> ·
52
+ <a href="#quick-test-no-eicar">Quick test</a> ·
55
53
  <a href="#security-notes">Security</a> ·
56
54
  <a href="#faq">FAQ</a>
57
55
  </p>
58
56
 
57
+ <!-- HERO END -->
58
+
59
59
  ---
60
60
 
61
- ## Overview
61
+ ## 🚀 Overview
62
62
 
63
63
  **pompelmi** scans untrusted file uploads **before** they hit disk. A tiny, TypeScript-first toolkit for Node.js with composable scanners, deep ZIP inspection, and optional signature engines.
64
64
 
@@ -68,7 +68,7 @@ assets/video.mp4
68
68
  - **Drop-in adapters** — Express, Koa, Fastify, Next.js
69
69
  - **Typed & tiny** — modern TS, minimal surface
70
70
 
71
- ## Highlights
71
+ ## Highlights
72
72
 
73
73
  - **Block risky uploads early** — classify uploads as _clean_, _suspicious_, or _malicious_ and stop them at the edge.
74
74
  - **Real guards** — extension allow‑list, server‑side MIME sniff (magic bytes), per‑file size caps, and **deep ZIP** traversal with anti‑bomb limits.
@@ -81,7 +81,7 @@ assets/video.mp4
81
81
 
82
82
  ---
83
83
 
84
- ## Installation
84
+ ## 🔧 Installation
85
85
 
86
86
  ```bash
87
87
  # core library
@@ -100,7 +100,7 @@ yarn add pompelmi
100
100
 
101
101
  ---
102
102
 
103
- ## Quick‑start
103
+ ## Quick‑start
104
104
 
105
105
  **At a glance (policy + scanners)**
106
106
 
@@ -182,7 +182,7 @@ export const POST = createNextUploadHandler({ ...policy, scanner });
182
182
 
183
183
  ---
184
184
 
185
- ## GitHub Action
185
+ ## 🤖 GitHub Action
186
186
 
187
187
  Run **pompelmi** in CI to scan repository files or built artifacts.
188
188
 
@@ -228,7 +228,7 @@ jobs:
228
228
 
229
229
  ---
230
230
 
231
- ## Adapters
231
+ ## 🧩 Adapters
232
232
 
233
233
  Use the adapter that matches your web framework. All adapters share the same policy options and scanning contract.
234
234
 
@@ -245,7 +245,7 @@ Use the adapter that matches your web framework. All adapters share the same pol
245
245
 
246
246
  ---
247
247
 
248
- ## Diagrams
248
+ ## 🗺️ Diagrams
249
249
 
250
250
  ### Upload scanning flow
251
251
  ```mermaid
@@ -371,7 +371,7 @@ flowchart LR
371
371
 
372
372
  ---
373
373
 
374
- ## Configuration
374
+ ## ⚙️ Configuration
375
375
 
376
376
  All adapters accept a common set of options:
377
377
 
@@ -399,7 +399,7 @@ failClosed: true,
399
399
 
400
400
  ---
401
401
 
402
- ## Production checklist
402
+ ## Production checklist
403
403
 
404
404
  - [ ] **Limit file size** aggressively (`maxFileSizeBytes`).
405
405
  - [ ] **Restrict extensions & MIME** to what your app truly needs.
@@ -414,7 +414,7 @@ failClosed: true,
414
414
 
415
415
  ---
416
416
 
417
- ## YARA Getting Started
417
+ ## 🧬 YARA Getting Started
418
418
 
419
419
  YARA lets you detect suspicious or malicious content using pattern‑matching rules.
420
420
  **pompelmi** treats YARA matches as signals that you can map to your own verdicts
@@ -532,7 +532,7 @@ export const scanner = composeScanners(
532
532
 
533
533
  Combine YARA with MIME sniffing, ZIP safety limits, and strict size/time caps.
534
534
 
535
- ## Quick test (no EICAR)
535
+ ## 🧪 Quick test (no EICAR)
536
536
 
537
537
  Use the examples above, then send a **minimal PDF** that contains risky tokens (this triggers the built‑in heuristics).
538
538
 
@@ -559,7 +559,7 @@ You should see an HTTP **422 Unprocessable Entity** (blocked by policy). Clean f
559
559
 
560
560
  ---
561
561
 
562
- ## Security notes
562
+ ## 🔒 Security notes
563
563
 
564
564
  - The library **reads** bytes; it never executes files.
565
565
  - YARA detections depend on the **rules you provide**; expect some false positives/negatives.
@@ -568,13 +568,13 @@ You should see an HTTP **422 Unprocessable Entity** (blocked by policy). Clean f
568
568
 
569
569
  ---
570
570
 
571
- ## Star history
571
+ ## Star history
572
572
 
573
573
  [![Star History Chart](https://api.star-history.com/svg?repos=pompelmi/pompelmi&type=Date)](https://star-history.com/#pompelmi/pompelmi&Date)
574
574
 
575
575
  ---
576
576
 
577
- ## FAQ
577
+ ## 💬 FAQ
578
578
 
579
579
  **Do I need YARA?**
580
580
  No. `scanner` is pluggable. The examples use a minimal scanner for clarity; you can call out to a YARA engine or any other detector you prefer.
@@ -590,7 +590,7 @@ Archives are traversed with limits to reduce archive‑bomb risk. Keep your size
590
590
 
591
591
  ---
592
592
 
593
- ## Tests & Coverage
593
+ ## 🧪 Tests & Coverage
594
594
 
595
595
  Run tests locally with coverage:
596
596
 
@@ -606,7 +606,7 @@ If you integrate Codecov in CI, upload `coverage/lcov.info` and you can use this
606
606
  [![codecov](https://codecov.io/gh/pompelmi/pompelmi/branch/main/graph/badge.svg?flag=core)](https://codecov.io/gh/pompelmi/pompelmi)
607
607
  ```
608
608
 
609
- ## Contributing
609
+ ## 🤝 Contributing
610
610
 
611
611
  PRs and issues welcome! Start with:
612
612
 
@@ -617,6 +617,8 @@ pnpm -r lint
617
617
 
618
618
  ---
619
619
 
620
- ## License
620
+ <p align="right"><a href="#pompelmi">↑ Back to top</a></p>
621
+
622
+ ## 📜 License
621
623
 
622
624
  [MIT](./LICENSE) © 2025‑present pompelmi contributors
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pompelmi",
3
- "version": "0.15.1",
3
+ "version": "0.15.2",
4
4
  "description": "RFI-safe file uploads for Node.js — Express/Koa/Next.js middleware with deep ZIP inspection, MIME/size checks, and optional YARA scanning.",
5
5
  "main": "./dist/pompelmi.cjs",
6
6
  "module": "./dist/pompelmi.esm.js",