ferret-scan 2.2.0 → 2.3.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.
Files changed (159) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +15 -11
  3. package/bin/ferret.js +104 -8
  4. package/dist/__tests__/AgentMonitor.test.d.ts +6 -0
  5. package/dist/__tests__/AgentMonitor.test.js +235 -0
  6. package/dist/__tests__/AtlasNavigatorReporter.test.d.ts +6 -0
  7. package/dist/__tests__/AtlasNavigatorReporter.test.js +193 -0
  8. package/dist/__tests__/CorrelationAnalyzer.test.d.ts +6 -0
  9. package/dist/__tests__/CorrelationAnalyzer.test.js +211 -0
  10. package/dist/__tests__/IndicatorMatcher.test.d.ts +6 -0
  11. package/dist/__tests__/IndicatorMatcher.test.js +245 -0
  12. package/dist/__tests__/MarketplaceScanner.test.d.ts +5 -0
  13. package/dist/__tests__/MarketplaceScanner.test.js +212 -0
  14. package/dist/__tests__/RuleGenerator.test.d.ts +6 -0
  15. package/dist/__tests__/RuleGenerator.test.js +207 -0
  16. package/dist/__tests__/ThreatFeed.test.d.ts +6 -0
  17. package/dist/__tests__/ThreatFeed.test.js +359 -0
  18. package/dist/__tests__/WatchMode.test.d.ts +6 -0
  19. package/dist/__tests__/WatchMode.test.js +104 -0
  20. package/dist/__tests__/astAnalyzerExtra.test.d.ts +6 -0
  21. package/dist/__tests__/astAnalyzerExtra.test.js +67 -0
  22. package/dist/__tests__/astAnalyzerFull.test.d.ts +6 -0
  23. package/dist/__tests__/astAnalyzerFull.test.js +138 -0
  24. package/dist/__tests__/astAnalyzerPatterns.test.d.ts +6 -0
  25. package/dist/__tests__/astAnalyzerPatterns.test.js +143 -0
  26. package/dist/__tests__/atlas.test.d.ts +6 -0
  27. package/dist/__tests__/atlas.test.js +319 -0
  28. package/dist/__tests__/atlasCatalog.test.d.ts +6 -0
  29. package/dist/__tests__/atlasCatalog.test.js +200 -0
  30. package/dist/__tests__/atlasCatalogExtra.test.d.ts +6 -0
  31. package/dist/__tests__/atlasCatalogExtra.test.js +215 -0
  32. package/dist/__tests__/baseline.test.d.ts +6 -0
  33. package/dist/__tests__/baseline.test.js +321 -0
  34. package/dist/__tests__/baselineExtra.test.d.ts +6 -0
  35. package/dist/__tests__/baselineExtra.test.js +317 -0
  36. package/dist/__tests__/capabilityMapping.test.d.ts +5 -0
  37. package/dist/__tests__/capabilityMapping.test.js +49 -0
  38. package/dist/__tests__/capabilityMappingExtra.test.d.ts +5 -0
  39. package/dist/__tests__/capabilityMappingExtra.test.js +200 -0
  40. package/dist/__tests__/complianceExtra.test.d.ts +6 -0
  41. package/dist/__tests__/complianceExtra.test.js +121 -0
  42. package/dist/__tests__/config.test.js +1 -1
  43. package/dist/__tests__/configLoader.test.d.ts +6 -0
  44. package/dist/__tests__/configLoader.test.js +225 -0
  45. package/dist/__tests__/configLoaderExtra.test.d.ts +6 -0
  46. package/dist/__tests__/configLoaderExtra.test.js +186 -0
  47. package/dist/__tests__/correlationAnalyzerExtra.test.d.ts +5 -0
  48. package/dist/__tests__/correlationAnalyzerExtra.test.js +98 -0
  49. package/dist/__tests__/correlationAnalyzerFull.test.d.ts +6 -0
  50. package/dist/__tests__/correlationAnalyzerFull.test.js +154 -0
  51. package/dist/__tests__/customRules.extra.test.d.ts +6 -0
  52. package/dist/__tests__/customRules.extra.test.js +245 -0
  53. package/dist/__tests__/customRules.test.d.ts +7 -0
  54. package/dist/__tests__/customRules.test.js +347 -0
  55. package/dist/__tests__/dependencyRisk.test.d.ts +5 -0
  56. package/dist/__tests__/dependencyRisk.test.js +248 -0
  57. package/dist/__tests__/dependencyRiskExtra.test.d.ts +6 -0
  58. package/dist/__tests__/dependencyRiskExtra.test.js +177 -0
  59. package/dist/__tests__/featureExitCodes.test.d.ts +7 -0
  60. package/dist/__tests__/featureExitCodes.test.js +332 -0
  61. package/dist/__tests__/fileDiscoveryConfigOnly.test.d.ts +6 -0
  62. package/dist/__tests__/fileDiscoveryConfigOnly.test.js +195 -0
  63. package/dist/__tests__/fileDiscoveryExtra.test.d.ts +6 -0
  64. package/dist/__tests__/fileDiscoveryExtra.test.js +149 -0
  65. package/dist/__tests__/fixer.extra.test.d.ts +6 -0
  66. package/dist/__tests__/fixer.extra.test.js +135 -0
  67. package/dist/__tests__/fixerApply.test.d.ts +6 -0
  68. package/dist/__tests__/fixerApply.test.js +132 -0
  69. package/dist/__tests__/gitHooks.test.d.ts +7 -0
  70. package/dist/__tests__/gitHooks.test.js +188 -0
  71. package/dist/__tests__/htmlReporter.extra.test.d.ts +5 -0
  72. package/dist/__tests__/htmlReporter.extra.test.js +126 -0
  73. package/dist/__tests__/interactiveTui.test.d.ts +6 -0
  74. package/dist/__tests__/interactiveTui.test.js +180 -0
  75. package/dist/__tests__/interactiveTuiCommands.test.d.ts +6 -0
  76. package/dist/__tests__/interactiveTuiCommands.test.js +187 -0
  77. package/dist/__tests__/interactiveTuiMore.test.d.ts +6 -0
  78. package/dist/__tests__/interactiveTuiMore.test.js +194 -0
  79. package/dist/__tests__/interactiveTuiSession.test.d.ts +6 -0
  80. package/dist/__tests__/interactiveTuiSession.test.js +173 -0
  81. package/dist/__tests__/llmAnalysis.test.d.ts +6 -0
  82. package/dist/__tests__/llmAnalysis.test.js +229 -0
  83. package/dist/__tests__/llmAnalysisBuildExcerpt.test.d.ts +6 -0
  84. package/dist/__tests__/llmAnalysisBuildExcerpt.test.js +132 -0
  85. package/dist/__tests__/llmAnalysisExtra.test.d.ts +6 -0
  86. package/dist/__tests__/llmAnalysisExtra.test.js +214 -0
  87. package/dist/__tests__/llmAnalysisFilters.test.d.ts +6 -0
  88. package/dist/__tests__/llmAnalysisFilters.test.js +181 -0
  89. package/dist/__tests__/llmAnalysisMitre.test.d.ts +6 -0
  90. package/dist/__tests__/llmAnalysisMitre.test.js +192 -0
  91. package/dist/__tests__/llmGroqTPM.test.d.ts +6 -0
  92. package/dist/__tests__/llmGroqTPM.test.js +89 -0
  93. package/dist/__tests__/llmProviderRetry.test.d.ts +6 -0
  94. package/dist/__tests__/llmProviderRetry.test.js +172 -0
  95. package/dist/__tests__/mcpValidator.extra.test.d.ts +5 -0
  96. package/dist/__tests__/mcpValidator.extra.test.js +270 -0
  97. package/dist/__tests__/patternMatcherExtra.test.d.ts +7 -0
  98. package/dist/__tests__/patternMatcherExtra.test.js +198 -0
  99. package/dist/__tests__/patternsCommon.test.d.ts +6 -0
  100. package/dist/__tests__/patternsCommon.test.js +107 -0
  101. package/dist/__tests__/policyEnforcement.test.d.ts +5 -0
  102. package/dist/__tests__/policyEnforcement.test.js +510 -0
  103. package/dist/__tests__/quarantineExtra.test.d.ts +5 -0
  104. package/dist/__tests__/quarantineExtra.test.js +214 -0
  105. package/dist/__tests__/redactionExtra.test.d.ts +6 -0
  106. package/dist/__tests__/redactionExtra.test.js +228 -0
  107. package/dist/__tests__/scanDiff.test.d.ts +7 -0
  108. package/dist/__tests__/scanDiff.test.js +266 -0
  109. package/dist/__tests__/scanFull.test.d.ts +6 -0
  110. package/dist/__tests__/scanFull.test.js +158 -0
  111. package/dist/__tests__/scannerDampening.test.d.ts +6 -0
  112. package/dist/__tests__/scannerDampening.test.js +160 -0
  113. package/dist/__tests__/scannerExtra.test.d.ts +6 -0
  114. package/dist/__tests__/scannerExtra.test.js +194 -0
  115. package/dist/__tests__/scannerMitre.test.d.ts +5 -0
  116. package/dist/__tests__/scannerMitre.test.js +141 -0
  117. package/dist/__tests__/scannerSSRF.test.d.ts +5 -0
  118. package/dist/__tests__/scannerSSRF.test.js +149 -0
  119. package/dist/__tests__/schemas.test.d.ts +6 -0
  120. package/dist/__tests__/schemas.test.js +125 -0
  121. package/dist/__tests__/webhooks.extra.test.d.ts +6 -0
  122. package/dist/__tests__/webhooks.extra.test.js +144 -0
  123. package/dist/__tests__/webhooks.test.d.ts +6 -0
  124. package/dist/__tests__/webhooks.test.js +154 -0
  125. package/dist/features/customRules.js +22 -29
  126. package/dist/features/mcpTrustScore.d.ts +17 -0
  127. package/dist/features/mcpTrustScore.js +74 -0
  128. package/dist/features/mcpValidator.d.ts +2 -0
  129. package/dist/features/mcpValidator.js +13 -0
  130. package/dist/features/policyEnforcement.d.ts +22 -22
  131. package/dist/intelligence/ThreatFeed.js +207 -62
  132. package/dist/remediation/Quarantine.js +24 -6
  133. package/dist/reporters/ConsoleReporter.js +10 -0
  134. package/dist/reporters/HtmlReporter.js +5 -0
  135. package/dist/reporters/SarifReporter.d.ts +1 -0
  136. package/dist/reporters/SarifReporter.js +1 -0
  137. package/dist/scanner/IAnalyzer.d.ts +19 -0
  138. package/dist/scanner/IAnalyzer.js +5 -0
  139. package/dist/scanner/Scanner.js +64 -125
  140. package/dist/scanner/analyzers/CapabilityAnalyzer.d.ts +8 -0
  141. package/dist/scanner/analyzers/CapabilityAnalyzer.js +19 -0
  142. package/dist/scanner/analyzers/DependencyAnalyzer.d.ts +8 -0
  143. package/dist/scanner/analyzers/DependencyAnalyzer.js +18 -0
  144. package/dist/scanner/analyzers/EntropyAnalyzer.d.ts +8 -0
  145. package/dist/scanner/analyzers/EntropyAnalyzer.js +12 -0
  146. package/dist/scanner/analyzers/LlmAnalyzer.d.ts +17 -0
  147. package/dist/scanner/analyzers/LlmAnalyzer.js +36 -0
  148. package/dist/scanner/analyzers/McpAnalyzer.d.ts +8 -0
  149. package/dist/scanner/analyzers/McpAnalyzer.js +19 -0
  150. package/dist/scanner/analyzers/SemanticAnalyzer.d.ts +8 -0
  151. package/dist/scanner/analyzers/SemanticAnalyzer.js +21 -0
  152. package/dist/scanner/analyzers/ThreatIntelAnalyzer.d.ts +8 -0
  153. package/dist/scanner/analyzers/ThreatIntelAnalyzer.js +21 -0
  154. package/dist/types.d.ts +17 -0
  155. package/dist/types.js +1 -1
  156. package/dist/utils/safeRegex.d.ts +12 -51
  157. package/dist/utils/safeRegex.js +45 -62
  158. package/dist/utils/schemas.d.ts +64 -64
  159. package/package.json +24 -18
@@ -1,29 +1,58 @@
1
1
  /**
2
- * Safe regex runtime utilities with bounded runtime and match limits
2
+ * Safe regex runtime utilities with bounded runtime and match limits.
3
3
  *
4
+ * Uses Google RE2 (linear-time engine) when available for categorically
5
+ * safe pattern execution. Falls back to the screened native JS engine.
4
6
  * Prevents ReDoS attacks and runaway regex matching in user-controlled patterns.
5
7
  */
8
+ // Lazy-load RE2 so the module is still usable when re2 is not installed.
9
+ let RE2 = null;
10
+ let re2Attempted = false;
11
+ function getRE2() {
12
+ if (re2Attempted)
13
+ return RE2;
14
+ re2Attempted = true;
15
+ try {
16
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
17
+ RE2 = require('re2');
18
+ }
19
+ catch {
20
+ RE2 = null;
21
+ }
22
+ return RE2;
23
+ }
6
24
  /**
7
- * Compile a pattern string into a RegExp, rejecting obviously dangerous patterns.
25
+ * Compile a pattern string into a RegExp (or RE2 instance when available).
8
26
  *
9
- * This function screens for common ReDoS patterns and syntax errors before
10
- * compilation, returning null for unsafe inputs.
27
+ * Tries RE2 first it is a linear-time engine that categorically eliminates
28
+ * ReDoS. If RE2 is unavailable or rejects the pattern (e.g. lookaheads), falls
29
+ * back to the static ReDoS screener + native RegExp.
11
30
  *
12
31
  * @param raw The raw pattern string
13
32
  * @param flags Regex flags (default: 'gi')
14
- * @returns Compiled RegExp or null if pattern is unsafe
33
+ * @returns Compiled RegExp/RE2 or null if pattern is unsafe/invalid
15
34
  *
16
35
  * @example
17
36
  * ```typescript
18
37
  * const safe = compileSafePattern('test\\d+'); // OK
19
- * const unsafe = compileSafePattern('(a+)+b'); // null - ReDoS risk
20
38
  * const invalid = compileSafePattern('[unclosed'); // null - syntax error
21
39
  * ```
22
40
  */
23
41
  export function compileSafePattern(raw, flags = 'gi') {
24
- // Screen for obvious ReDoS triggers.
25
- // We only block patterns where the quantifier structure can cause exponential
26
- // backtracking simple multi-alternative strings like (foo|bar|baz) are safe.
42
+ const RE2Ctor = getRE2();
43
+ if (RE2Ctor !== null) {
44
+ // RE2 is linear-time no static ReDoS screening needed.
45
+ // If RE2 rejects the pattern (lookaheads, backreferences) it throws;
46
+ // we fall through to the native screener below.
47
+ try {
48
+ return new RE2Ctor(raw, flags);
49
+ }
50
+ catch {
51
+ // Pattern uses features RE2 does not support — fall through.
52
+ }
53
+ }
54
+ // Fallback: static screen for exponential-backtracking structures before
55
+ // handing the pattern to the native JS engine.
27
56
  const redosPatterns = [
28
57
  /(\?\+)/, // Possessive quantifier abuse: a+?+
29
58
  /(\+\+)/, // Double plus: a++
@@ -40,34 +69,18 @@ export function compileSafePattern(raw, flags = 'gi') {
40
69
  return null;
41
70
  }
42
71
  }
43
- // Attempt compilation
44
72
  try {
45
73
  return new RegExp(raw, flags);
46
74
  }
47
75
  catch {
48
- // Invalid syntax
49
76
  return null;
50
77
  }
51
78
  }
52
79
  /**
53
80
  * Run a regex against content with bounded runtime and match limits.
54
81
  *
55
- * This function wraps RegExp for each step with timeout and match count protection
56
- * to prevent runaway regex operations from hanging the application.
57
- *
58
- * @param pattern The compiled RegExp to run
59
- * @param content The content to search
60
- * @param options Runtime limits
61
- * @returns Result containing matches and truncation status
62
- *
63
- * @example
64
- * ```typescript
65
- * const pattern = /test\d+/g;
66
- * const { matches, truncated } = runBounded(pattern, content, { maxMs: 500 });
67
- * if (truncated) {
68
- * console.warn('Regex operation was truncated');
69
- * }
70
- * ```
82
+ * When RE2 is active the time budget is largely redundant (RE2 is linear),
83
+ * but the match-count ceiling still prevents unbounded result arrays.
71
84
  */
72
85
  export function runBounded(pattern, content, options = {}) {
73
86
  const maxMs = options.maxMs ?? 1000;
@@ -76,20 +89,16 @@ export function runBounded(pattern, content, options = {}) {
76
89
  const matches = [];
77
90
  let match;
78
91
  while ((match = pattern.exec(content)) !== null) {
79
- // Check time limit
80
92
  if (Date.now() > deadline) {
81
93
  return { matches, truncated: true };
82
94
  }
83
- // Check match count limit
84
95
  if (matches.length >= maxMatches) {
85
96
  return { matches, truncated: true };
86
97
  }
87
98
  matches.push(match);
88
- // For non-global patterns, break after first match to avoid infinite loop
89
99
  if (!pattern.global) {
90
100
  break;
91
101
  }
92
- // Prevent infinite loop on zero-length matches for global patterns
93
102
  if (match[0].length === 0) {
94
103
  pattern.lastIndex++;
95
104
  }
@@ -98,27 +107,6 @@ export function runBounded(pattern, content, options = {}) {
98
107
  }
99
108
  /**
100
109
  * Safe pattern matching that combines compilation and bounded runtime.
101
- *
102
- * This is a convenience wrapper that safely compiles a pattern and runs
103
- * it with bounds, handling both compilation failures and runtime limits.
104
- *
105
- * @param rawPattern The raw pattern string
106
- * @param content The content to search
107
- * @param flags Regex flags (default: 'gi')
108
- * @param options Runtime limits
109
- * @returns Match result or null if pattern is unsafe
110
- *
111
- * @example
112
- * ```typescript
113
- * const result = safeMatch('test\\d+', content);
114
- * if (result === null) {
115
- * console.warn('Unsafe or invalid pattern');
116
- * } else if (result.truncated) {
117
- * console.warn('Pattern operation was bounded');
118
- * } else {
119
- * console.log(`Found ${result.matches.length} matches`);
120
- * }
121
- * ```
122
110
  */
123
111
  export function safeMatch(rawPattern, content, flags = 'gi', options = {}) {
124
112
  const pattern = compileSafePattern(rawPattern, flags);
@@ -129,19 +117,14 @@ export function safeMatch(rawPattern, content, flags = 'gi', options = {}) {
129
117
  }
130
118
  /**
131
119
  * Test if a pattern matches content safely, returning boolean result.
132
- *
133
- * This is equivalent to RegExp.test() but with safety checks and bounds.
134
- * Returns false for unsafe patterns or bounded operations.
135
- *
136
- * @param rawPattern The raw pattern string
137
- * @param content The content to test
138
- * @param flags Regex flags (default: 'i')
139
- * @returns True if pattern matches safely, false otherwise
140
120
  */
141
121
  export function safeTest(rawPattern, content, flags = 'i') {
142
- // For test, we want to check if there's ANY match, so use non-global flags
143
- const testFlags = flags.replace(/g/g, ''); // Remove global flag for test behavior
122
+ const testFlags = flags.replace(/g/g, '');
144
123
  const result = safeMatch(rawPattern, content, testFlags, { maxMatches: 1 });
145
124
  return result !== null && result.matches.length > 0 && !result.truncated;
146
125
  }
126
+ /** Returns true when RE2 is active (linear-time engine). */
127
+ export function isRE2Active() {
128
+ return getRE2() !== null;
129
+ }
147
130
  //# sourceMappingURL=safeRegex.js.map
@@ -18,8 +18,8 @@ export declare const ThreatIndicatorSchema: z.ZodObject<{
18
18
  }, "strip", z.ZodTypeAny, {
19
19
  category: string;
20
20
  value: string;
21
- type: "domain" | "url" | "ip" | "hash" | "email" | "filename" | "package" | "pattern" | "signature";
22
- severity: "critical" | "high" | "medium" | "low";
21
+ type: "url" | "pattern" | "domain" | "ip" | "hash" | "email" | "filename" | "package" | "signature";
22
+ severity: "high" | "medium" | "low" | "critical";
23
23
  description: string;
24
24
  confidence: number;
25
25
  source: string;
@@ -30,8 +30,8 @@ export declare const ThreatIndicatorSchema: z.ZodObject<{
30
30
  }, {
31
31
  category: string;
32
32
  value: string;
33
- type: "domain" | "url" | "ip" | "hash" | "email" | "filename" | "package" | "pattern" | "signature";
34
- severity: "critical" | "high" | "medium" | "low";
33
+ type: "url" | "pattern" | "domain" | "ip" | "hash" | "email" | "filename" | "package" | "signature";
34
+ severity: "high" | "medium" | "low" | "critical";
35
35
  description: string;
36
36
  confidence: number;
37
37
  source: string;
@@ -102,8 +102,8 @@ export declare const ThreatDatabaseSchema: z.ZodObject<{
102
102
  }, "strip", z.ZodTypeAny, {
103
103
  category: string;
104
104
  value: string;
105
- type: "domain" | "url" | "ip" | "hash" | "email" | "filename" | "package" | "pattern" | "signature";
106
- severity: "critical" | "high" | "medium" | "low";
105
+ type: "url" | "pattern" | "domain" | "ip" | "hash" | "email" | "filename" | "package" | "signature";
106
+ severity: "high" | "medium" | "low" | "critical";
107
107
  description: string;
108
108
  confidence: number;
109
109
  source: string;
@@ -114,8 +114,8 @@ export declare const ThreatDatabaseSchema: z.ZodObject<{
114
114
  }, {
115
115
  category: string;
116
116
  value: string;
117
- type: "domain" | "url" | "ip" | "hash" | "email" | "filename" | "package" | "pattern" | "signature";
118
- severity: "critical" | "high" | "medium" | "low";
117
+ type: "url" | "pattern" | "domain" | "ip" | "hash" | "email" | "filename" | "package" | "signature";
118
+ severity: "high" | "medium" | "low" | "critical";
119
119
  description: string;
120
120
  confidence: number;
121
121
  source: string;
@@ -154,8 +154,8 @@ export declare const ThreatDatabaseSchema: z.ZodObject<{
154
154
  indicators: {
155
155
  category: string;
156
156
  value: string;
157
- type: "domain" | "url" | "ip" | "hash" | "email" | "filename" | "package" | "pattern" | "signature";
158
- severity: "critical" | "high" | "medium" | "low";
157
+ type: "url" | "pattern" | "domain" | "ip" | "hash" | "email" | "filename" | "package" | "signature";
158
+ severity: "high" | "medium" | "low" | "critical";
159
159
  description: string;
160
160
  confidence: number;
161
161
  source: string;
@@ -184,8 +184,8 @@ export declare const ThreatDatabaseSchema: z.ZodObject<{
184
184
  indicators: {
185
185
  category: string;
186
186
  value: string;
187
- type: "domain" | "url" | "ip" | "hash" | "email" | "filename" | "package" | "pattern" | "signature";
188
- severity: "critical" | "high" | "medium" | "low";
187
+ type: "url" | "pattern" | "domain" | "ip" | "hash" | "email" | "filename" | "package" | "signature";
188
+ severity: "high" | "medium" | "low" | "critical";
189
189
  description: string;
190
190
  confidence: number;
191
191
  source: string;
@@ -246,16 +246,16 @@ export declare const QuarantineEntrySchema: z.ZodObject<{
246
246
  }>;
247
247
  }, "strip", z.ZodTypeAny, {
248
248
  id: string;
249
+ reason: string;
249
250
  metadata: {
250
251
  category: string;
251
252
  severity: string;
252
253
  riskScore: number;
253
254
  originalPermissions?: string | undefined;
254
255
  };
256
+ findings: any[];
255
257
  originalPath: string;
256
258
  quarantinePath: string;
257
- reason: string;
258
- findings: any[];
259
259
  quarantineDate: string;
260
260
  fileSize: number;
261
261
  fileHash: string;
@@ -263,16 +263,16 @@ export declare const QuarantineEntrySchema: z.ZodObject<{
263
263
  restoredDate?: string | undefined;
264
264
  }, {
265
265
  id: string;
266
+ reason: string;
266
267
  metadata: {
267
268
  category: string;
268
269
  severity: string;
269
270
  riskScore: number;
270
271
  originalPermissions?: string | undefined;
271
272
  };
273
+ findings: any[];
272
274
  originalPath: string;
273
275
  quarantinePath: string;
274
- reason: string;
275
- findings: any[];
276
276
  quarantineDate: string;
277
277
  fileSize: number;
278
278
  fileHash: string;
@@ -312,16 +312,16 @@ export declare const QuarantineDatabaseSchema: z.ZodObject<{
312
312
  }>;
313
313
  }, "strip", z.ZodTypeAny, {
314
314
  id: string;
315
+ reason: string;
315
316
  metadata: {
316
317
  category: string;
317
318
  severity: string;
318
319
  riskScore: number;
319
320
  originalPermissions?: string | undefined;
320
321
  };
322
+ findings: any[];
321
323
  originalPath: string;
322
324
  quarantinePath: string;
323
- reason: string;
324
- findings: any[];
325
325
  quarantineDate: string;
326
326
  fileSize: number;
327
327
  fileHash: string;
@@ -329,16 +329,16 @@ export declare const QuarantineDatabaseSchema: z.ZodObject<{
329
329
  restoredDate?: string | undefined;
330
330
  }, {
331
331
  id: string;
332
+ reason: string;
332
333
  metadata: {
333
334
  category: string;
334
335
  severity: string;
335
336
  riskScore: number;
336
337
  originalPermissions?: string | undefined;
337
338
  };
339
+ findings: any[];
338
340
  originalPath: string;
339
341
  quarantinePath: string;
340
- reason: string;
341
- findings: any[];
342
342
  quarantineDate: string;
343
343
  fileSize: number;
344
344
  fileHash: string;
@@ -364,16 +364,16 @@ export declare const QuarantineDatabaseSchema: z.ZodObject<{
364
364
  }, "strip", z.ZodTypeAny, {
365
365
  entries: {
366
366
  id: string;
367
+ reason: string;
367
368
  metadata: {
368
369
  category: string;
369
370
  severity: string;
370
371
  riskScore: number;
371
372
  originalPermissions?: string | undefined;
372
373
  };
374
+ findings: any[];
373
375
  originalPath: string;
374
376
  quarantinePath: string;
375
- reason: string;
376
- findings: any[];
377
377
  quarantineDate: string;
378
378
  fileSize: number;
379
379
  fileHash: string;
@@ -392,16 +392,16 @@ export declare const QuarantineDatabaseSchema: z.ZodObject<{
392
392
  }, {
393
393
  entries: {
394
394
  id: string;
395
+ reason: string;
395
396
  metadata: {
396
397
  category: string;
397
398
  severity: string;
398
399
  riskScore: number;
399
400
  originalPermissions?: string | undefined;
400
401
  };
402
+ findings: any[];
401
403
  originalPath: string;
402
404
  quarantinePath: string;
403
- reason: string;
404
- findings: any[];
405
405
  quarantineDate: string;
406
406
  fileSize: number;
407
407
  fileHash: string;
@@ -968,18 +968,18 @@ export declare const BaselineFindingSchema: z.ZodObject<{
968
968
  }, "strip", z.ZodTypeAny, {
969
969
  match: string;
970
970
  line: number;
971
- hash: string;
972
971
  ruleId: string;
973
972
  file: string;
973
+ hash: string;
974
974
  acceptedDate: string;
975
975
  reason?: string | undefined;
976
976
  expiresDate?: string | undefined;
977
977
  }, {
978
978
  match: string;
979
979
  line: number;
980
- hash: string;
981
980
  ruleId: string;
982
981
  file: string;
982
+ hash: string;
983
983
  acceptedDate: string;
984
984
  reason?: string | undefined;
985
985
  expiresDate?: string | undefined;
@@ -1001,18 +1001,18 @@ export declare const BaselineSchema: z.ZodObject<{
1001
1001
  }, "strip", z.ZodTypeAny, {
1002
1002
  match: string;
1003
1003
  line: number;
1004
- hash: string;
1005
1004
  ruleId: string;
1006
1005
  file: string;
1006
+ hash: string;
1007
1007
  acceptedDate: string;
1008
1008
  reason?: string | undefined;
1009
1009
  expiresDate?: string | undefined;
1010
1010
  }, {
1011
1011
  match: string;
1012
1012
  line: number;
1013
- hash: string;
1014
1013
  ruleId: string;
1015
1014
  file: string;
1015
+ hash: string;
1016
1016
  acceptedDate: string;
1017
1017
  reason?: string | undefined;
1018
1018
  expiresDate?: string | undefined;
@@ -1020,33 +1020,33 @@ export declare const BaselineSchema: z.ZodObject<{
1020
1020
  checksum: z.ZodOptional<z.ZodString>;
1021
1021
  }, "strip", z.ZodTypeAny, {
1022
1022
  version: string;
1023
- lastUpdated: string;
1024
1023
  findings: {
1025
1024
  match: string;
1026
1025
  line: number;
1027
- hash: string;
1028
1026
  ruleId: string;
1029
1027
  file: string;
1028
+ hash: string;
1030
1029
  acceptedDate: string;
1031
1030
  reason?: string | undefined;
1032
1031
  expiresDate?: string | undefined;
1033
1032
  }[];
1033
+ lastUpdated: string;
1034
1034
  createdDate: string;
1035
1035
  description?: string | undefined;
1036
1036
  checksum?: string | undefined;
1037
1037
  }, {
1038
1038
  version: string;
1039
- lastUpdated: string;
1040
1039
  findings: {
1041
1040
  match: string;
1042
1041
  line: number;
1043
- hash: string;
1044
1042
  ruleId: string;
1045
1043
  file: string;
1044
+ hash: string;
1046
1045
  acceptedDate: string;
1047
1046
  reason?: string | undefined;
1048
1047
  expiresDate?: string | undefined;
1049
1048
  }[];
1049
+ lastUpdated: string;
1050
1050
  createdDate: string;
1051
1051
  description?: string | undefined;
1052
1052
  checksum?: string | undefined;
@@ -1091,8 +1091,8 @@ declare const _default: {
1091
1091
  }, "strip", z.ZodTypeAny, {
1092
1092
  category: string;
1093
1093
  value: string;
1094
- type: "domain" | "url" | "ip" | "hash" | "email" | "filename" | "package" | "pattern" | "signature";
1095
- severity: "critical" | "high" | "medium" | "low";
1094
+ type: "url" | "pattern" | "domain" | "ip" | "hash" | "email" | "filename" | "package" | "signature";
1095
+ severity: "high" | "medium" | "low" | "critical";
1096
1096
  description: string;
1097
1097
  confidence: number;
1098
1098
  source: string;
@@ -1103,8 +1103,8 @@ declare const _default: {
1103
1103
  }, {
1104
1104
  category: string;
1105
1105
  value: string;
1106
- type: "domain" | "url" | "ip" | "hash" | "email" | "filename" | "package" | "pattern" | "signature";
1107
- severity: "critical" | "high" | "medium" | "low";
1106
+ type: "url" | "pattern" | "domain" | "ip" | "hash" | "email" | "filename" | "package" | "signature";
1107
+ severity: "high" | "medium" | "low" | "critical";
1108
1108
  description: string;
1109
1109
  confidence: number;
1110
1110
  source: string;
@@ -1175,8 +1175,8 @@ declare const _default: {
1175
1175
  }, "strip", z.ZodTypeAny, {
1176
1176
  category: string;
1177
1177
  value: string;
1178
- type: "domain" | "url" | "ip" | "hash" | "email" | "filename" | "package" | "pattern" | "signature";
1179
- severity: "critical" | "high" | "medium" | "low";
1178
+ type: "url" | "pattern" | "domain" | "ip" | "hash" | "email" | "filename" | "package" | "signature";
1179
+ severity: "high" | "medium" | "low" | "critical";
1180
1180
  description: string;
1181
1181
  confidence: number;
1182
1182
  source: string;
@@ -1187,8 +1187,8 @@ declare const _default: {
1187
1187
  }, {
1188
1188
  category: string;
1189
1189
  value: string;
1190
- type: "domain" | "url" | "ip" | "hash" | "email" | "filename" | "package" | "pattern" | "signature";
1191
- severity: "critical" | "high" | "medium" | "low";
1190
+ type: "url" | "pattern" | "domain" | "ip" | "hash" | "email" | "filename" | "package" | "signature";
1191
+ severity: "high" | "medium" | "low" | "critical";
1192
1192
  description: string;
1193
1193
  confidence: number;
1194
1194
  source: string;
@@ -1227,8 +1227,8 @@ declare const _default: {
1227
1227
  indicators: {
1228
1228
  category: string;
1229
1229
  value: string;
1230
- type: "domain" | "url" | "ip" | "hash" | "email" | "filename" | "package" | "pattern" | "signature";
1231
- severity: "critical" | "high" | "medium" | "low";
1230
+ type: "url" | "pattern" | "domain" | "ip" | "hash" | "email" | "filename" | "package" | "signature";
1231
+ severity: "high" | "medium" | "low" | "critical";
1232
1232
  description: string;
1233
1233
  confidence: number;
1234
1234
  source: string;
@@ -1257,8 +1257,8 @@ declare const _default: {
1257
1257
  indicators: {
1258
1258
  category: string;
1259
1259
  value: string;
1260
- type: "domain" | "url" | "ip" | "hash" | "email" | "filename" | "package" | "pattern" | "signature";
1261
- severity: "critical" | "high" | "medium" | "low";
1260
+ type: "url" | "pattern" | "domain" | "ip" | "hash" | "email" | "filename" | "package" | "signature";
1261
+ severity: "high" | "medium" | "low" | "critical";
1262
1262
  description: string;
1263
1263
  confidence: number;
1264
1264
  source: string;
@@ -1303,16 +1303,16 @@ declare const _default: {
1303
1303
  }>;
1304
1304
  }, "strip", z.ZodTypeAny, {
1305
1305
  id: string;
1306
+ reason: string;
1306
1307
  metadata: {
1307
1308
  category: string;
1308
1309
  severity: string;
1309
1310
  riskScore: number;
1310
1311
  originalPermissions?: string | undefined;
1311
1312
  };
1313
+ findings: any[];
1312
1314
  originalPath: string;
1313
1315
  quarantinePath: string;
1314
- reason: string;
1315
- findings: any[];
1316
1316
  quarantineDate: string;
1317
1317
  fileSize: number;
1318
1318
  fileHash: string;
@@ -1320,16 +1320,16 @@ declare const _default: {
1320
1320
  restoredDate?: string | undefined;
1321
1321
  }, {
1322
1322
  id: string;
1323
+ reason: string;
1323
1324
  metadata: {
1324
1325
  category: string;
1325
1326
  severity: string;
1326
1327
  riskScore: number;
1327
1328
  originalPermissions?: string | undefined;
1328
1329
  };
1330
+ findings: any[];
1329
1331
  originalPath: string;
1330
1332
  quarantinePath: string;
1331
- reason: string;
1332
- findings: any[];
1333
1333
  quarantineDate: string;
1334
1334
  fileSize: number;
1335
1335
  fileHash: string;
@@ -1369,16 +1369,16 @@ declare const _default: {
1369
1369
  }>;
1370
1370
  }, "strip", z.ZodTypeAny, {
1371
1371
  id: string;
1372
+ reason: string;
1372
1373
  metadata: {
1373
1374
  category: string;
1374
1375
  severity: string;
1375
1376
  riskScore: number;
1376
1377
  originalPermissions?: string | undefined;
1377
1378
  };
1379
+ findings: any[];
1378
1380
  originalPath: string;
1379
1381
  quarantinePath: string;
1380
- reason: string;
1381
- findings: any[];
1382
1382
  quarantineDate: string;
1383
1383
  fileSize: number;
1384
1384
  fileHash: string;
@@ -1386,16 +1386,16 @@ declare const _default: {
1386
1386
  restoredDate?: string | undefined;
1387
1387
  }, {
1388
1388
  id: string;
1389
+ reason: string;
1389
1390
  metadata: {
1390
1391
  category: string;
1391
1392
  severity: string;
1392
1393
  riskScore: number;
1393
1394
  originalPermissions?: string | undefined;
1394
1395
  };
1396
+ findings: any[];
1395
1397
  originalPath: string;
1396
1398
  quarantinePath: string;
1397
- reason: string;
1398
- findings: any[];
1399
1399
  quarantineDate: string;
1400
1400
  fileSize: number;
1401
1401
  fileHash: string;
@@ -1421,16 +1421,16 @@ declare const _default: {
1421
1421
  }, "strip", z.ZodTypeAny, {
1422
1422
  entries: {
1423
1423
  id: string;
1424
+ reason: string;
1424
1425
  metadata: {
1425
1426
  category: string;
1426
1427
  severity: string;
1427
1428
  riskScore: number;
1428
1429
  originalPermissions?: string | undefined;
1429
1430
  };
1431
+ findings: any[];
1430
1432
  originalPath: string;
1431
1433
  quarantinePath: string;
1432
- reason: string;
1433
- findings: any[];
1434
1434
  quarantineDate: string;
1435
1435
  fileSize: number;
1436
1436
  fileHash: string;
@@ -1449,16 +1449,16 @@ declare const _default: {
1449
1449
  }, {
1450
1450
  entries: {
1451
1451
  id: string;
1452
+ reason: string;
1452
1453
  metadata: {
1453
1454
  category: string;
1454
1455
  severity: string;
1455
1456
  riskScore: number;
1456
1457
  originalPermissions?: string | undefined;
1457
1458
  };
1459
+ findings: any[];
1458
1460
  originalPath: string;
1459
1461
  quarantinePath: string;
1460
- reason: string;
1461
- findings: any[];
1462
1462
  quarantineDate: string;
1463
1463
  fileSize: number;
1464
1464
  fileHash: string;
@@ -2025,18 +2025,18 @@ declare const _default: {
2025
2025
  }, "strip", z.ZodTypeAny, {
2026
2026
  match: string;
2027
2027
  line: number;
2028
- hash: string;
2029
2028
  ruleId: string;
2030
2029
  file: string;
2030
+ hash: string;
2031
2031
  acceptedDate: string;
2032
2032
  reason?: string | undefined;
2033
2033
  expiresDate?: string | undefined;
2034
2034
  }, {
2035
2035
  match: string;
2036
2036
  line: number;
2037
- hash: string;
2038
2037
  ruleId: string;
2039
2038
  file: string;
2039
+ hash: string;
2040
2040
  acceptedDate: string;
2041
2041
  reason?: string | undefined;
2042
2042
  expiresDate?: string | undefined;
@@ -2058,18 +2058,18 @@ declare const _default: {
2058
2058
  }, "strip", z.ZodTypeAny, {
2059
2059
  match: string;
2060
2060
  line: number;
2061
- hash: string;
2062
2061
  ruleId: string;
2063
2062
  file: string;
2063
+ hash: string;
2064
2064
  acceptedDate: string;
2065
2065
  reason?: string | undefined;
2066
2066
  expiresDate?: string | undefined;
2067
2067
  }, {
2068
2068
  match: string;
2069
2069
  line: number;
2070
- hash: string;
2071
2070
  ruleId: string;
2072
2071
  file: string;
2072
+ hash: string;
2073
2073
  acceptedDate: string;
2074
2074
  reason?: string | undefined;
2075
2075
  expiresDate?: string | undefined;
@@ -2077,33 +2077,33 @@ declare const _default: {
2077
2077
  checksum: z.ZodOptional<z.ZodString>;
2078
2078
  }, "strip", z.ZodTypeAny, {
2079
2079
  version: string;
2080
- lastUpdated: string;
2081
2080
  findings: {
2082
2081
  match: string;
2083
2082
  line: number;
2084
- hash: string;
2085
2083
  ruleId: string;
2086
2084
  file: string;
2085
+ hash: string;
2087
2086
  acceptedDate: string;
2088
2087
  reason?: string | undefined;
2089
2088
  expiresDate?: string | undefined;
2090
2089
  }[];
2090
+ lastUpdated: string;
2091
2091
  createdDate: string;
2092
2092
  description?: string | undefined;
2093
2093
  checksum?: string | undefined;
2094
2094
  }, {
2095
2095
  version: string;
2096
- lastUpdated: string;
2097
2096
  findings: {
2098
2097
  match: string;
2099
2098
  line: number;
2100
- hash: string;
2101
2099
  ruleId: string;
2102
2100
  file: string;
2101
+ hash: string;
2103
2102
  acceptedDate: string;
2104
2103
  reason?: string | undefined;
2105
2104
  expiresDate?: string | undefined;
2106
2105
  }[];
2106
+ lastUpdated: string;
2107
2107
  createdDate: string;
2108
2108
  description?: string | undefined;
2109
2109
  checksum?: string | undefined;