Pompelmi offers fast file-upload malware scanning tailored for Node.js with features including optional YARA integration, ZIP deep-inspection, and support for Express, Koa, and Next.js. Designed for privacy and efficiency, it provides a lightweight solution for securing file uploads in applications.
pompelmi is a powerful, open-source file scanning tool tailored specifically for Node.js applications, ensuring that untrusted file uploads are thoroughly scanned before they are ever written to disk. Leveraging TypeScript, pompelmi operates entirely in-process, ensuring that no data is shared externally, making it a privacy-focused solution.
Integrating pompelmi into an Express application is straightforward:
import express from 'express';
import multer from 'multer';
import { createUploadGuard } from '@pompelmi/express-middleware';
import { policy, scanner } from './security';
const app = express();
const upload = multer({ storage: multer.memoryStorage(), limits: { fileSize: policy.maxFileSizeBytes } });
app.post('/upload', upload.any(), createUploadGuard({ ...policy, scanner }), (req, res) => {
res.json({ ok: true, scan: (req as any).pompelmi ?? null });
});
app.listen(3000, () => console.log('Server running on http://localhost:3000'));
| Framework | Status |
|---|---|
| Express | alpha |
| Koa | alpha |
| Next.js | alpha |
| Fastify | planned |
| NestJS | planned |
| Remix | planned |
| hapi | planned |
| SvelteKit | planned |
pompelmi stands as a robust choice for developers seeking an effective and customizable file scanning solution, enhancing the security of file uploads while maintaining a focus on privacy and performance.
No comments yet.
Sign in to be the first to comment.