pompelmi 0.16.2 → 0.16.3
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.
- package/package.json +9 -5
- package/dist/pompelmi.cjs +0 -3280
- package/dist/pompelmi.cjs.map +0 -1
- package/dist/types/magic.d.ts +0 -7
- package/dist/types/policy.d.ts +0 -12
- package/dist/types/presets.d.ts +0 -7
- package/dist/types/risk.d.ts +0 -18
- package/dist/types/scanners/common-heuristics.d.ts +0 -14
- package/dist/types/scanners/zip-bomb-guard.d.ts +0 -9
- package/dist/types/scanners/zipTraversalGuard.d.ts +0 -19
- package/dist/types/stream.d.ts +0 -10
- package/dist/types/types.d.ts +0 -48
- package/dist/types/verdict.d.ts +0 -2
- package/dist/types/yara-bridge.d.ts +0 -3
- package/dist/types/zip.d.ts +0 -13
package/dist/types/stream.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ScanReport, YaraMatch } from "./types";
|
|
2
|
-
export type ScanOptions = {
|
|
3
|
-
maxBytes?: number;
|
|
4
|
-
timeoutMs?: number;
|
|
5
|
-
detectMime?: boolean;
|
|
6
|
-
computeSha256?: boolean;
|
|
7
|
-
scanChunk?: (chunk: Uint8Array) => Promise<void> | void;
|
|
8
|
-
scanAll: (bytes: Uint8Array) => Promise<YaraMatch[]>;
|
|
9
|
-
};
|
|
10
|
-
export declare function scanStream(readable: NodeJS.ReadableStream, options: ScanOptions): Promise<ScanReport>;
|
package/dist/types/types.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/** Shared types for Pompelmi */
|
|
2
|
-
export type Verdict = 'clean' | 'suspicious' | 'malicious';
|
|
3
|
-
export interface YaraMatch {
|
|
4
|
-
rule: string;
|
|
5
|
-
namespace?: string;
|
|
6
|
-
tags?: string[];
|
|
7
|
-
meta?: Record<string, unknown>;
|
|
8
|
-
}
|
|
9
|
-
export interface Match {
|
|
10
|
-
rule: string;
|
|
11
|
-
severity?: 'low' | 'medium' | 'high' | 'critical' | 'suspicious';
|
|
12
|
-
meta?: Record<string, unknown>;
|
|
13
|
-
}
|
|
14
|
-
export interface FileInfo {
|
|
15
|
-
name?: string;
|
|
16
|
-
mimeType?: string;
|
|
17
|
-
size?: number;
|
|
18
|
-
sha256?: string;
|
|
19
|
-
}
|
|
20
|
-
export type ScanContext = {
|
|
21
|
-
filename?: string;
|
|
22
|
-
mimeType?: string;
|
|
23
|
-
size?: number;
|
|
24
|
-
};
|
|
25
|
-
export type ScanFn = (input: Uint8Array, ctx?: ScanContext) => Promise<Match[]> | Match[];
|
|
26
|
-
export type Scanner = ScanFn | {
|
|
27
|
-
name?: string;
|
|
28
|
-
scan: ScanFn;
|
|
29
|
-
};
|
|
30
|
-
interface BaseReport {
|
|
31
|
-
verdict: Verdict;
|
|
32
|
-
matches: YaraMatch[];
|
|
33
|
-
reasons?: string[];
|
|
34
|
-
file?: FileInfo;
|
|
35
|
-
durationMs?: number;
|
|
36
|
-
error?: string;
|
|
37
|
-
ok: boolean;
|
|
38
|
-
truncated?: boolean;
|
|
39
|
-
timedOut?: boolean;
|
|
40
|
-
engine?: string;
|
|
41
|
-
}
|
|
42
|
-
export interface NormalScanReport extends BaseReport {
|
|
43
|
-
}
|
|
44
|
-
export interface StreamScanReport extends BaseReport {
|
|
45
|
-
}
|
|
46
|
-
export type ScanReport = NormalScanReport | StreamScanReport;
|
|
47
|
-
export type Uint8ArrayLike = Uint8Array | ArrayBufferView;
|
|
48
|
-
export {};
|
package/dist/types/verdict.d.ts
DELETED
package/dist/types/zip.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type ZipBudget = {
|
|
2
|
-
maxEntries: number;
|
|
3
|
-
maxDepth: number;
|
|
4
|
-
maxTotalUncompressed: number;
|
|
5
|
-
maxPerEntryUncompressed: number;
|
|
6
|
-
maxCompressionRatio: number;
|
|
7
|
-
};
|
|
8
|
-
export type ZipEntry = {
|
|
9
|
-
path: string;
|
|
10
|
-
depth: number;
|
|
11
|
-
data: Uint8Array;
|
|
12
|
-
};
|
|
13
|
-
export declare function iterateZip(buffer: Uint8Array, budget: ZipBudget, depth?: number): AsyncGenerator<ZipEntry>;
|