pompelmi 0.34.9 → 0.35.0
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/README.md +26 -14
- package/dist/pompelmi.audit.cjs +13 -15
- package/dist/pompelmi.audit.cjs.map +1 -1
- package/dist/pompelmi.audit.esm.js +13 -15
- package/dist/pompelmi.audit.esm.js.map +1 -1
- package/dist/pompelmi.browser.cjs +585 -534
- package/dist/pompelmi.browser.cjs.map +1 -1
- package/dist/pompelmi.browser.esm.js +585 -534
- package/dist/pompelmi.browser.esm.js.map +1 -1
- package/dist/pompelmi.cjs +2066 -2016
- package/dist/pompelmi.cjs.map +1 -1
- package/dist/pompelmi.esm.js +2066 -2016
- package/dist/pompelmi.esm.js.map +1 -1
- package/dist/pompelmi.hooks.cjs +2 -2
- package/dist/pompelmi.hooks.cjs.map +1 -1
- package/dist/pompelmi.hooks.esm.js +2 -2
- package/dist/pompelmi.hooks.esm.js.map +1 -1
- package/dist/pompelmi.policy-packs.cjs +74 -73
- package/dist/pompelmi.policy-packs.cjs.map +1 -1
- package/dist/pompelmi.policy-packs.esm.js +74 -73
- package/dist/pompelmi.policy-packs.esm.js.map +1 -1
- package/dist/pompelmi.quarantine.cjs +135 -133
- package/dist/pompelmi.quarantine.cjs.map +1 -1
- package/dist/pompelmi.quarantine.esm.js +135 -133
- package/dist/pompelmi.quarantine.esm.js.map +1 -1
- package/dist/pompelmi.react.cjs +585 -534
- package/dist/pompelmi.react.cjs.map +1 -1
- package/dist/pompelmi.react.esm.js +585 -534
- package/dist/pompelmi.react.esm.js.map +1 -1
- package/dist/types/audit.d.ts +12 -12
- package/dist/types/browser-index.d.ts +12 -12
- package/dist/types/config.d.ts +4 -4
- package/dist/types/engines/dynamic-taint.d.ts +1 -1
- package/dist/types/engines/hybrid-orchestrator.d.ts +1 -1
- package/dist/types/engines/hybrid-taint-integration.d.ts +6 -6
- package/dist/types/engines/taint-policies.d.ts +4 -4
- package/dist/types/hipaa-compliance.d.ts +2 -2
- package/dist/types/hooks.d.ts +2 -2
- package/dist/types/index.d.ts +20 -20
- package/dist/types/node/scanDir.d.ts +5 -5
- package/dist/types/policy-packs.d.ts +2 -2
- package/dist/types/presets.d.ts +3 -3
- package/dist/types/quarantine/index.d.ts +3 -3
- package/dist/types/quarantine/storage.d.ts +1 -1
- package/dist/types/quarantine/types.d.ts +3 -3
- package/dist/types/quarantine/workflow.d.ts +4 -4
- package/dist/types/react-index.d.ts +2 -2
- package/dist/types/risk.d.ts +1 -1
- package/dist/types/scan/remote.d.ts +2 -2
- package/dist/types/scan.d.ts +5 -5
- package/dist/types/scanners/common-heuristics.d.ts +1 -1
- package/dist/types/scanners/zip-bomb-guard.d.ts +1 -1
- package/dist/types/src/audit.d.ts +84 -0
- package/dist/types/src/browser-index.d.ts +29 -0
- package/dist/types/src/config.d.ts +143 -0
- package/dist/types/src/engines/dynamic-taint.d.ts +102 -0
- package/dist/types/src/engines/hybrid-orchestrator.d.ts +65 -0
- package/dist/types/src/engines/hybrid-taint-integration.d.ts +129 -0
- package/dist/types/src/engines/taint-policies.d.ts +84 -0
- package/dist/types/src/hipaa-compliance.d.ts +110 -0
- package/dist/types/src/hooks.d.ts +89 -0
- package/dist/types/src/index.d.ts +29 -0
- package/dist/types/src/magic.d.ts +7 -0
- package/dist/types/src/node/scanDir.d.ts +30 -0
- package/dist/types/src/policy-packs.d.ts +98 -0
- package/dist/types/src/policy.d.ts +12 -0
- package/dist/types/src/presets.d.ts +72 -0
- package/dist/types/src/quarantine/index.d.ts +18 -0
- package/dist/types/src/quarantine/storage.d.ts +77 -0
- package/dist/types/src/quarantine/types.d.ts +78 -0
- package/dist/types/src/quarantine/workflow.d.ts +97 -0
- package/dist/types/src/react-index.d.ts +13 -0
- package/dist/types/src/risk.d.ts +18 -0
- package/dist/types/src/scan/remote.d.ts +12 -0
- package/dist/types/src/scan.d.ts +17 -0
- package/dist/types/src/scanners/common-heuristics.d.ts +14 -0
- package/dist/types/src/scanners/zip-bomb-guard.d.ts +9 -0
- package/dist/types/src/scanners/zipTraversalGuard.d.ts +19 -0
- package/dist/types/src/stream.d.ts +10 -0
- package/dist/types/src/types/decompilation.d.ts +96 -0
- package/dist/types/src/types/taint-tracking.d.ts +495 -0
- package/dist/types/src/types.d.ts +48 -0
- package/dist/types/src/useFileScanner.d.ts +15 -0
- package/dist/types/src/utils/advanced-detection.d.ts +21 -0
- package/dist/types/src/utils/batch-scanner.d.ts +62 -0
- package/dist/types/src/utils/cache-manager.d.ts +95 -0
- package/dist/types/src/utils/export.d.ts +51 -0
- package/dist/types/src/utils/performance-metrics.d.ts +68 -0
- package/dist/types/src/utils/threat-intelligence.d.ts +96 -0
- package/dist/types/src/validate.d.ts +7 -0
- package/dist/types/src/verdict.d.ts +2 -0
- package/dist/types/src/yara/browser.d.ts +7 -0
- package/dist/types/src/yara/index.d.ts +17 -0
- package/dist/types/src/yara/node.d.ts +2 -0
- package/dist/types/src/yara/remote.d.ts +10 -0
- package/dist/types/src/yara-bridge.d.ts +3 -0
- package/dist/types/src/zip.d.ts +13 -0
- package/dist/types/types/decompilation.d.ts +4 -4
- package/dist/types/types/taint-tracking.d.ts +19 -19
- package/dist/types/types.d.ts +3 -3
- package/dist/types/useFileScanner.d.ts +1 -1
- package/dist/types/utils/advanced-detection.d.ts +1 -1
- package/dist/types/utils/batch-scanner.d.ts +3 -3
- package/dist/types/utils/cache-manager.d.ts +1 -1
- package/dist/types/utils/export.d.ts +2 -2
- package/dist/types/utils/threat-intelligence.d.ts +4 -4
- package/dist/types/verdict.d.ts +1 -1
- package/dist/types/yara/browser.d.ts +1 -1
- package/dist/types/yara/index.d.ts +1 -1
- package/dist/types/yara/node.d.ts +1 -1
- package/dist/types/yara/remote.d.ts +2 -2
- package/package.json +6 -6
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
/**
|
|
8
8
|
* Taint source types indicating where tainted data originates
|
|
9
9
|
*/
|
|
10
|
-
export type TaintSource =
|
|
10
|
+
export type TaintSource = "user_input" | "file_read" | "network_recv" | "registry_read" | "environment" | "crypto_weak" | "external_api" | "memory_leak" | "time_source" | "custom";
|
|
11
11
|
/**
|
|
12
12
|
* Taint sink types indicating where tainted data should not flow
|
|
13
13
|
*/
|
|
14
|
-
export type TaintSink =
|
|
14
|
+
export type TaintSink = "exec_function" | "file_write" | "network_send" | "registry_write" | "sql_query" | "format_string" | "memory_alloc" | "crypto_key" | "auth_check" | "log_output" | "custom";
|
|
15
15
|
/**
|
|
16
16
|
* Taint propagation operations that affect taint flow
|
|
17
17
|
*/
|
|
18
|
-
export type TaintOperation =
|
|
18
|
+
export type TaintOperation = "copy" | "arithmetic" | "bitwise" | "comparison" | "concatenation" | "substring" | "conversion" | "encryption" | "hash" | "sanitization" | "validation" | "encoding" | "custom";
|
|
19
19
|
/**
|
|
20
20
|
* Taint label with metadata for tracking
|
|
21
21
|
*/
|
|
@@ -35,7 +35,7 @@ export interface TaintLabel {
|
|
|
35
35
|
confidence: number;
|
|
36
36
|
/** Optional metadata for custom analysis */
|
|
37
37
|
metadata?: {
|
|
38
|
-
severity?:
|
|
38
|
+
severity?: "low" | "medium" | "high" | "critical";
|
|
39
39
|
description?: string;
|
|
40
40
|
tags?: string[];
|
|
41
41
|
[key: string]: unknown;
|
|
@@ -136,7 +136,7 @@ export interface TaintConfig {
|
|
|
136
136
|
hipaaCompliance?: {
|
|
137
137
|
enabled: boolean;
|
|
138
138
|
sanitizeAddresses?: boolean;
|
|
139
|
-
auditLevel?:
|
|
139
|
+
auditLevel?: "minimal" | "standard" | "comprehensive";
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
142
|
/**
|
|
@@ -169,7 +169,7 @@ export interface TaintFlow {
|
|
|
169
169
|
/** Overall confidence of this flow */
|
|
170
170
|
confidence: number;
|
|
171
171
|
/** Severity assessment */
|
|
172
|
-
severity:
|
|
172
|
+
severity: "low" | "medium" | "high" | "critical";
|
|
173
173
|
/** Whether this represents a security vulnerability */
|
|
174
174
|
isVulnerability: boolean;
|
|
175
175
|
/** Additional metadata */
|
|
@@ -185,7 +185,7 @@ export interface TaintFlow {
|
|
|
185
185
|
*/
|
|
186
186
|
export interface TaintAnalysisResult {
|
|
187
187
|
/** Analysis engine identifier */
|
|
188
|
-
engine:
|
|
188
|
+
engine: "dynamic-taint" | "hybrid-taint";
|
|
189
189
|
/** Analysis success status */
|
|
190
190
|
success: boolean;
|
|
191
191
|
/** Total analysis time in milliseconds */
|
|
@@ -220,11 +220,11 @@ export interface TaintAnalysisResult {
|
|
|
220
220
|
/**
|
|
221
221
|
* Analysis engine types supported by the orchestrator
|
|
222
222
|
*/
|
|
223
|
-
export type AnalysisEngine =
|
|
223
|
+
export type AnalysisEngine = "binaryninja-hlil" | "ghidra-pcode" | "dynamic-taint" | "static-analysis" | "symbolic-execution" | "fuzzing" | "custom";
|
|
224
224
|
/**
|
|
225
225
|
* Analysis phase in the hybrid orchestration pipeline
|
|
226
226
|
*/
|
|
227
|
-
export type AnalysisPhase =
|
|
227
|
+
export type AnalysisPhase = "preprocessing" | "static" | "dynamic" | "taint" | "correlation" | "postprocessing" | "reporting";
|
|
228
228
|
/**
|
|
229
229
|
* Engine capability descriptor
|
|
230
230
|
*/
|
|
@@ -232,16 +232,16 @@ export interface EngineCapability {
|
|
|
232
232
|
/** Engine identifier */
|
|
233
233
|
engine: AnalysisEngine;
|
|
234
234
|
/** Supported analysis types */
|
|
235
|
-
capabilities: Array<
|
|
235
|
+
capabilities: Array<"decompilation" | "disassembly" | "taint_tracking" | "control_flow" | "data_flow" | "symbolic_execution" | "vulnerability_detection" | "obfuscation_analysis" | "crypto_analysis" | "api_analysis">;
|
|
236
236
|
/** Supported file formats */
|
|
237
237
|
supportedFormats: string[];
|
|
238
238
|
/** Supported architectures */
|
|
239
239
|
supportedArchitectures: string[];
|
|
240
240
|
/** Performance characteristics */
|
|
241
241
|
performance: {
|
|
242
|
-
speed:
|
|
243
|
-
accuracy:
|
|
244
|
-
memoryUsage:
|
|
242
|
+
speed: "fast" | "medium" | "slow";
|
|
243
|
+
accuracy: "low" | "medium" | "high";
|
|
244
|
+
memoryUsage: "low" | "medium" | "high";
|
|
245
245
|
};
|
|
246
246
|
/** Resource requirements */
|
|
247
247
|
requirements: {
|
|
@@ -290,7 +290,7 @@ export interface TaskResult {
|
|
|
290
290
|
/** Engine that executed the task */
|
|
291
291
|
engine: AnalysisEngine;
|
|
292
292
|
/** Execution status */
|
|
293
|
-
status:
|
|
293
|
+
status: "success" | "failed" | "timeout" | "cancelled";
|
|
294
294
|
/** Result data */
|
|
295
295
|
result?: any;
|
|
296
296
|
/** Execution metrics */
|
|
@@ -348,7 +348,7 @@ export interface OrchestrationStrategy {
|
|
|
348
348
|
/** Enable cross-engine result correlation */
|
|
349
349
|
enabled: boolean;
|
|
350
350
|
/** Correlation algorithms to use */
|
|
351
|
-
algorithms: Array<
|
|
351
|
+
algorithms: Array<"similarity" | "overlap" | "consensus" | "weighted">;
|
|
352
352
|
/** Confidence weighting by engine */
|
|
353
353
|
engineWeights: {
|
|
354
354
|
[engine in AnalysisEngine]?: number;
|
|
@@ -389,7 +389,7 @@ export interface HybridConfig {
|
|
|
389
389
|
/** Result aggregation settings */
|
|
390
390
|
aggregation: {
|
|
391
391
|
/** How to combine results from multiple engines */
|
|
392
|
-
method:
|
|
392
|
+
method: "union" | "intersection" | "weighted" | "consensus";
|
|
393
393
|
/** Minimum confidence threshold for final results */
|
|
394
394
|
confidenceThreshold: number;
|
|
395
395
|
/** Whether to include intermediate results */
|
|
@@ -439,8 +439,8 @@ export interface HybridAnalysisResult {
|
|
|
439
439
|
};
|
|
440
440
|
/** Recommendations based on analysis */
|
|
441
441
|
recommendations?: Array<{
|
|
442
|
-
type:
|
|
443
|
-
severity:
|
|
442
|
+
type: "security" | "performance" | "analysis";
|
|
443
|
+
severity: "info" | "warning" | "critical";
|
|
444
444
|
message: string;
|
|
445
445
|
evidence?: any;
|
|
446
446
|
}>;
|
|
@@ -492,4 +492,4 @@ export interface HybridOrchestrator {
|
|
|
492
492
|
estimatedTimeRemaining: number;
|
|
493
493
|
}>;
|
|
494
494
|
}
|
|
495
|
-
export {
|
|
495
|
+
export type { BinaryNinjaOptions, DecompilationMatch, DecompilationResult, DecompilationScanner, FunctionAnalysis, GhidraOptions, } from "./decompilation";
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/** Shared types for Pompelmi */
|
|
2
|
-
export type Verdict =
|
|
2
|
+
export type Verdict = "clean" | "suspicious" | "malicious";
|
|
3
3
|
export interface YaraMatch {
|
|
4
4
|
rule: string;
|
|
5
5
|
namespace?: string;
|
|
6
6
|
tags?: string[];
|
|
7
7
|
meta?: Record<string, unknown>;
|
|
8
8
|
}
|
|
9
|
-
export * from
|
|
9
|
+
export * from "./types/decompilation";
|
|
10
10
|
export interface Match {
|
|
11
11
|
rule: string;
|
|
12
|
-
severity?:
|
|
12
|
+
severity?: "info" | "low" | "medium" | "high" | "critical" | "suspicious" | "malicious";
|
|
13
13
|
meta?: Record<string, unknown>;
|
|
14
14
|
}
|
|
15
15
|
export interface FileInfo {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Advanced threat detection utilities
|
|
3
3
|
* @module utils/advanced-detection
|
|
4
4
|
*/
|
|
5
|
-
import type { Match } from
|
|
5
|
+
import type { Match } from "../types";
|
|
6
6
|
/**
|
|
7
7
|
* Enhanced polyglot file detection
|
|
8
8
|
* Detects files that can be interpreted as multiple formats
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Batch scanning with concurrency control
|
|
3
3
|
* @module utils/batch-scanner
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
export interface BatchScanOptions extends Omit<ScanOptions,
|
|
5
|
+
import { type ScanOptions } from "../scan";
|
|
6
|
+
import type { ScanContext, ScanReport } from "../types";
|
|
7
|
+
export interface BatchScanOptions extends Omit<ScanOptions, "ctx"> {
|
|
8
8
|
/** Maximum concurrent scans (default: 5) */
|
|
9
9
|
concurrency?: number;
|
|
10
10
|
/** Callback for individual scan completion */
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Export utilities for scan results
|
|
3
3
|
* @module utils/export
|
|
4
4
|
*/
|
|
5
|
-
import type { ScanReport } from
|
|
6
|
-
export type ExportFormat =
|
|
5
|
+
import type { ScanReport } from "../types";
|
|
6
|
+
export type ExportFormat = "json" | "csv" | "markdown" | "html" | "sarif";
|
|
7
7
|
export interface ExportOptions {
|
|
8
8
|
/** Include detailed match information */
|
|
9
9
|
includeDetails?: boolean;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Threat intelligence integration and enhanced detection
|
|
3
3
|
* @module utils/threat-intelligence
|
|
4
4
|
*/
|
|
5
|
-
import type { ScanReport } from
|
|
5
|
+
import type { ScanReport } from "../types";
|
|
6
6
|
export interface ThreatIntelligenceSource {
|
|
7
7
|
/** Source name */
|
|
8
8
|
name: string;
|
|
@@ -29,10 +29,10 @@ export interface EnhancedScanReport {
|
|
|
29
29
|
/** Risk score (0-100) */
|
|
30
30
|
riskScore?: number;
|
|
31
31
|
/** Include all properties from ScanReport */
|
|
32
|
-
verdict: import(
|
|
33
|
-
matches: import(
|
|
32
|
+
verdict: import("../types").Verdict;
|
|
33
|
+
matches: import("../types").YaraMatch[];
|
|
34
34
|
reasons?: string[];
|
|
35
|
-
file?: import(
|
|
35
|
+
file?: import("../types").FileInfo;
|
|
36
36
|
durationMs?: number;
|
|
37
37
|
error?: string;
|
|
38
38
|
ok: boolean;
|
package/dist/types/verdict.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Verdict, YaraMatch } from "./types";
|
|
2
2
|
export declare function mapMatchesToVerdict(matches?: YaraMatch[]): Verdict;
|
|
@@ -14,4 +14,4 @@ export interface YaraEngine {
|
|
|
14
14
|
export declare function createYaraEngine(): Promise<YaraEngine>;
|
|
15
15
|
export declare function createYaraScannerFromRules(rulesSource: string): Promise<YaraCompiled>;
|
|
16
16
|
export declare function createYaraScannerFromFile(rulesPath: string): Promise<YaraCompiled>;
|
|
17
|
-
export { createRemoteEngine } from
|
|
17
|
+
export { createRemoteEngine } from "./remote";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { YaraEngine } from
|
|
1
|
+
import type { YaraEngine } from "./index";
|
|
2
2
|
export declare function createNodeEngine(): Promise<YaraEngine>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { YaraEngine } from
|
|
1
|
+
import type { YaraEngine } from "./index";
|
|
2
2
|
export interface RemoteEngineOptions {
|
|
3
3
|
endpoint: string;
|
|
4
4
|
headers?: Record<string, string>;
|
|
5
5
|
rulesField?: string;
|
|
6
6
|
fileField?: string;
|
|
7
|
-
mode?:
|
|
7
|
+
mode?: "multipart" | "json-base64";
|
|
8
8
|
rulesAsBase64?: boolean;
|
|
9
9
|
}
|
|
10
10
|
export declare function createRemoteEngine(opts: RemoteEngineOptions): Promise<YaraEngine>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pompelmi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"description": "Secure file uploads for Node.js. Scan untrusted files before storage with in-process, local-first checks for MIME spoofing, archive bombs, risky document structures, and optional YARA.",
|
|
5
5
|
"main": "./dist/pompelmi.cjs",
|
|
6
6
|
"module": "./dist/pompelmi.esm.js",
|
|
@@ -120,21 +120,21 @@
|
|
|
120
120
|
"@pompelmi/core": "workspace:*",
|
|
121
121
|
"@pompelmi/engine": "workspace:*",
|
|
122
122
|
"@pompelmi/engine-heuristics": "workspace:^0.2.0",
|
|
123
|
-
"@rollup/plugin-commonjs": "^
|
|
123
|
+
"@rollup/plugin-commonjs": "^29.0.2",
|
|
124
124
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
125
125
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
126
126
|
"@types/cors": "^2.8.19",
|
|
127
127
|
"@types/express": "^5.0.3",
|
|
128
128
|
"@types/multer": "^2.0.0",
|
|
129
|
-
"@types/node": "^
|
|
129
|
+
"@types/node": "^25.5.0",
|
|
130
130
|
"@types/react": "^19.1.8",
|
|
131
131
|
"@types/unzipper": "^0.10.11",
|
|
132
|
-
"@vitest/coverage-v8": "^
|
|
132
|
+
"@vitest/coverage-v8": "^4",
|
|
133
133
|
"cors": "^2.8.5",
|
|
134
134
|
"depcheck": "^1.4.7",
|
|
135
135
|
"express": "^5.1.0",
|
|
136
136
|
"gh-pages": "^6.3.0",
|
|
137
|
-
"knip": "^
|
|
137
|
+
"knip": "^6.1.1",
|
|
138
138
|
"multer": "^2.0.2",
|
|
139
139
|
"react": "^19.2.0",
|
|
140
140
|
"rollup": "^4.x",
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"tslib": "^2.8.1",
|
|
143
143
|
"tsup": "^8",
|
|
144
144
|
"tsx": "^4.20.3",
|
|
145
|
-
"typescript": "^
|
|
145
|
+
"typescript": "^6.0.2",
|
|
146
146
|
"vitest": "2.1.9"
|
|
147
147
|
},
|
|
148
148
|
"peerDependencies": {
|