pompelmi
Version:
RFI-safe file uploads for Node.js — Express/Koa/Next.js middleware with deep ZIP inspection, MIME/size checks, and optional YARA scanning.
11 lines (10 loc) • 418 B
TypeScript
import type { ScanReport, YaraMatch } from "./types";
export type ScanOptions = {
maxBytes?: number;
timeoutMs?: number;
detectMime?: boolean;
computeSha256?: boolean;
scanChunk?: (chunk: Uint8Array) => Promise<void> | void;
scanAll: (bytes: Uint8Array) => Promise<YaraMatch[]>;
};
export declare function scanStream(readable: NodeJS.ReadableStream, options: ScanOptions): Promise<ScanReport>;