nox-openclaw-hunter 1.0.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 (211) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +140 -0
  3. package/bin/nox.js +2 -0
  4. package/dist/branding.d.ts +39 -0
  5. package/dist/branding.d.ts.map +1 -0
  6. package/dist/branding.js +66 -0
  7. package/dist/branding.js.map +1 -0
  8. package/dist/cli.d.ts +15 -0
  9. package/dist/cli.d.ts.map +1 -0
  10. package/dist/cli.js +94 -0
  11. package/dist/cli.js.map +1 -0
  12. package/dist/commands/export.d.ts +21 -0
  13. package/dist/commands/export.d.ts.map +1 -0
  14. package/dist/commands/export.js +616 -0
  15. package/dist/commands/export.js.map +1 -0
  16. package/dist/commands/index.d.ts +8 -0
  17. package/dist/commands/index.d.ts.map +1 -0
  18. package/dist/commands/index.js +8 -0
  19. package/dist/commands/index.js.map +1 -0
  20. package/dist/commands/isolate.d.ts +30 -0
  21. package/dist/commands/isolate.d.ts.map +1 -0
  22. package/dist/commands/isolate.js +547 -0
  23. package/dist/commands/isolate.js.map +1 -0
  24. package/dist/commands/purge.d.ts +22 -0
  25. package/dist/commands/purge.d.ts.map +1 -0
  26. package/dist/commands/purge.js +295 -0
  27. package/dist/commands/purge.js.map +1 -0
  28. package/dist/commands/scan.d.ts +23 -0
  29. package/dist/commands/scan.d.ts.map +1 -0
  30. package/dist/commands/scan.js +155 -0
  31. package/dist/commands/scan.js.map +1 -0
  32. package/dist/detector/app-bundle.d.ts +13 -0
  33. package/dist/detector/app-bundle.d.ts.map +1 -0
  34. package/dist/detector/app-bundle.js +27 -0
  35. package/dist/detector/app-bundle.js.map +1 -0
  36. package/dist/detector/cli-binary.d.ts +12 -0
  37. package/dist/detector/cli-binary.d.ts.map +1 -0
  38. package/dist/detector/cli-binary.js +66 -0
  39. package/dist/detector/cli-binary.js.map +1 -0
  40. package/dist/detector/config.d.ts +21 -0
  41. package/dist/detector/config.d.ts.map +1 -0
  42. package/dist/detector/config.js +337 -0
  43. package/dist/detector/config.js.map +1 -0
  44. package/dist/detector/detection-config.d.ts +24 -0
  45. package/dist/detector/detection-config.d.ts.map +1 -0
  46. package/dist/detector/detection-config.js +242 -0
  47. package/dist/detector/detection-config.js.map +1 -0
  48. package/dist/detector/docker.d.ts +10 -0
  49. package/dist/detector/docker.d.ts.map +1 -0
  50. package/dist/detector/docker.js +94 -0
  51. package/dist/detector/docker.js.map +1 -0
  52. package/dist/detector/index.d.ts +50 -0
  53. package/dist/detector/index.d.ts.map +1 -0
  54. package/dist/detector/index.js +155 -0
  55. package/dist/detector/index.js.map +1 -0
  56. package/dist/detector/network.d.ts +34 -0
  57. package/dist/detector/network.d.ts.map +1 -0
  58. package/dist/detector/network.js +205 -0
  59. package/dist/detector/network.js.map +1 -0
  60. package/dist/detector/process.d.ts +16 -0
  61. package/dist/detector/process.d.ts.map +1 -0
  62. package/dist/detector/process.js +47 -0
  63. package/dist/detector/process.js.map +1 -0
  64. package/dist/detector/service.d.ts +17 -0
  65. package/dist/detector/service.d.ts.map +1 -0
  66. package/dist/detector/service.js +51 -0
  67. package/dist/detector/service.js.map +1 -0
  68. package/dist/enforcer/docker-cleaner.d.ts +30 -0
  69. package/dist/enforcer/docker-cleaner.d.ts.map +1 -0
  70. package/dist/enforcer/docker-cleaner.js +163 -0
  71. package/dist/enforcer/docker-cleaner.js.map +1 -0
  72. package/dist/enforcer/file-remover.d.ts +34 -0
  73. package/dist/enforcer/file-remover.d.ts.map +1 -0
  74. package/dist/enforcer/file-remover.js +137 -0
  75. package/dist/enforcer/file-remover.js.map +1 -0
  76. package/dist/enforcer/index.d.ts +33 -0
  77. package/dist/enforcer/index.d.ts.map +1 -0
  78. package/dist/enforcer/index.js +142 -0
  79. package/dist/enforcer/index.js.map +1 -0
  80. package/dist/enforcer/process-killer.d.ts +18 -0
  81. package/dist/enforcer/process-killer.d.ts.map +1 -0
  82. package/dist/enforcer/process-killer.js +80 -0
  83. package/dist/enforcer/process-killer.js.map +1 -0
  84. package/dist/enforcer/service-stopper.d.ts +23 -0
  85. package/dist/enforcer/service-stopper.d.ts.map +1 -0
  86. package/dist/enforcer/service-stopper.js +95 -0
  87. package/dist/enforcer/service-stopper.js.map +1 -0
  88. package/dist/index.d.ts +6 -0
  89. package/dist/index.d.ts.map +1 -0
  90. package/dist/index.js +10 -0
  91. package/dist/index.js.map +1 -0
  92. package/dist/isolator/firewall.d.ts +25 -0
  93. package/dist/isolator/firewall.d.ts.map +1 -0
  94. package/dist/isolator/firewall.js +114 -0
  95. package/dist/isolator/firewall.js.map +1 -0
  96. package/dist/isolator/index.d.ts +63 -0
  97. package/dist/isolator/index.d.ts.map +1 -0
  98. package/dist/isolator/index.js +201 -0
  99. package/dist/isolator/index.js.map +1 -0
  100. package/dist/isolator/lockdown.d.ts +22 -0
  101. package/dist/isolator/lockdown.d.ts.map +1 -0
  102. package/dist/isolator/lockdown.js +401 -0
  103. package/dist/isolator/lockdown.js.map +1 -0
  104. package/dist/isolator/quarantine.d.ts +39 -0
  105. package/dist/isolator/quarantine.d.ts.map +1 -0
  106. package/dist/isolator/quarantine.js +364 -0
  107. package/dist/isolator/quarantine.js.map +1 -0
  108. package/dist/mdm/index.d.ts +93 -0
  109. package/dist/mdm/index.d.ts.map +1 -0
  110. package/dist/mdm/index.js +414 -0
  111. package/dist/mdm/index.js.map +1 -0
  112. package/dist/mdm/intune.d.ts +69 -0
  113. package/dist/mdm/intune.d.ts.map +1 -0
  114. package/dist/mdm/intune.js +409 -0
  115. package/dist/mdm/intune.js.map +1 -0
  116. package/dist/mdm/jamf.d.ts +58 -0
  117. package/dist/mdm/jamf.d.ts.map +1 -0
  118. package/dist/mdm/jamf.js +441 -0
  119. package/dist/mdm/jamf.js.map +1 -0
  120. package/dist/mdm/jumpcloud.d.ts +73 -0
  121. package/dist/mdm/jumpcloud.d.ts.map +1 -0
  122. package/dist/mdm/jumpcloud.js +470 -0
  123. package/dist/mdm/jumpcloud.js.map +1 -0
  124. package/dist/mdm/templates/detect.ps1.d.ts +30 -0
  125. package/dist/mdm/templates/detect.ps1.d.ts.map +1 -0
  126. package/dist/mdm/templates/detect.ps1.js +463 -0
  127. package/dist/mdm/templates/detect.ps1.js.map +1 -0
  128. package/dist/mdm/templates/detect.sh.d.ts +30 -0
  129. package/dist/mdm/templates/detect.sh.d.ts.map +1 -0
  130. package/dist/mdm/templates/detect.sh.js +474 -0
  131. package/dist/mdm/templates/detect.sh.js.map +1 -0
  132. package/dist/mdm/templates/enforce.ps1.d.ts +33 -0
  133. package/dist/mdm/templates/enforce.ps1.d.ts.map +1 -0
  134. package/dist/mdm/templates/enforce.ps1.js +681 -0
  135. package/dist/mdm/templates/enforce.ps1.js.map +1 -0
  136. package/dist/mdm/templates/enforce.sh.d.ts +33 -0
  137. package/dist/mdm/templates/enforce.sh.d.ts.map +1 -0
  138. package/dist/mdm/templates/enforce.sh.js +591 -0
  139. package/dist/mdm/templates/enforce.sh.js.map +1 -0
  140. package/dist/platform/darwin.d.ts +6 -0
  141. package/dist/platform/darwin.d.ts.map +1 -0
  142. package/dist/platform/darwin.js +192 -0
  143. package/dist/platform/darwin.js.map +1 -0
  144. package/dist/platform/index.d.ts +43 -0
  145. package/dist/platform/index.d.ts.map +1 -0
  146. package/dist/platform/index.js +27 -0
  147. package/dist/platform/index.js.map +1 -0
  148. package/dist/platform/linux.d.ts +6 -0
  149. package/dist/platform/linux.d.ts.map +1 -0
  150. package/dist/platform/linux.js +134 -0
  151. package/dist/platform/linux.js.map +1 -0
  152. package/dist/platform/windows.d.ts +6 -0
  153. package/dist/platform/windows.d.ts.map +1 -0
  154. package/dist/platform/windows.js +134 -0
  155. package/dist/platform/windows.js.map +1 -0
  156. package/dist/reporter/console.d.ts +27 -0
  157. package/dist/reporter/console.d.ts.map +1 -0
  158. package/dist/reporter/console.js +431 -0
  159. package/dist/reporter/console.js.map +1 -0
  160. package/dist/reporter/index.d.ts +11 -0
  161. package/dist/reporter/index.d.ts.map +1 -0
  162. package/dist/reporter/index.js +13 -0
  163. package/dist/reporter/index.js.map +1 -0
  164. package/dist/reporter/json.d.ts +61 -0
  165. package/dist/reporter/json.d.ts.map +1 -0
  166. package/dist/reporter/json.js +75 -0
  167. package/dist/reporter/json.js.map +1 -0
  168. package/dist/reporter/webhook.d.ts +57 -0
  169. package/dist/reporter/webhook.d.ts.map +1 -0
  170. package/dist/reporter/webhook.js +230 -0
  171. package/dist/reporter/webhook.js.map +1 -0
  172. package/dist/types/config.d.ts +116 -0
  173. package/dist/types/config.d.ts.map +1 -0
  174. package/dist/types/config.js +6 -0
  175. package/dist/types/config.js.map +1 -0
  176. package/dist/types/detection.d.ts +85 -0
  177. package/dist/types/detection.d.ts.map +1 -0
  178. package/dist/types/detection.js +5 -0
  179. package/dist/types/detection.js.map +1 -0
  180. package/dist/types/enforcement.d.ts +33 -0
  181. package/dist/types/enforcement.d.ts.map +1 -0
  182. package/dist/types/enforcement.js +5 -0
  183. package/dist/types/enforcement.js.map +1 -0
  184. package/dist/types/index.d.ts +8 -0
  185. package/dist/types/index.d.ts.map +1 -0
  186. package/dist/types/index.js +8 -0
  187. package/dist/types/index.js.map +1 -0
  188. package/dist/types/isolation.d.ts +55 -0
  189. package/dist/types/isolation.d.ts.map +1 -0
  190. package/dist/types/isolation.js +5 -0
  191. package/dist/types/isolation.js.map +1 -0
  192. package/dist/utils/exec.d.ts +48 -0
  193. package/dist/utils/exec.d.ts.map +1 -0
  194. package/dist/utils/exec.js +103 -0
  195. package/dist/utils/exec.js.map +1 -0
  196. package/dist/utils/fs.d.ts +34 -0
  197. package/dist/utils/fs.d.ts.map +1 -0
  198. package/dist/utils/fs.js +111 -0
  199. package/dist/utils/fs.js.map +1 -0
  200. package/dist/utils/index.d.ts +7 -0
  201. package/dist/utils/index.d.ts.map +1 -0
  202. package/dist/utils/index.js +7 -0
  203. package/dist/utils/index.js.map +1 -0
  204. package/dist/utils/logger.d.ts +14 -0
  205. package/dist/utils/logger.d.ts.map +1 -0
  206. package/dist/utils/logger.js +48 -0
  207. package/dist/utils/logger.js.map +1 -0
  208. package/docs/intune.md +390 -0
  209. package/docs/jamf.md +400 -0
  210. package/docs/jumpcloud.md +510 -0
  211. package/package.json +65 -0
@@ -0,0 +1,431 @@
1
+ /**
2
+ * Console output formatting with branding and tables.
3
+ */
4
+ import chalk from 'chalk';
5
+ import Table from 'cli-table3';
6
+ import { printBanner } from '../branding.js';
7
+ import { getDetectionConfig } from '../detector/detection-config.js';
8
+ // Re-export printBanner from branding for backward compatibility
9
+ export { printBanner };
10
+ /**
11
+ * Format bytes to human-readable string.
12
+ */
13
+ function formatBytes(bytes) {
14
+ if (bytes < 1024)
15
+ return `${bytes}B`;
16
+ if (bytes < 1024 * 1024)
17
+ return `${(bytes / 1024).toFixed(1)}KB`;
18
+ return `${(bytes / (1024 * 1024)).toFixed(1)}MB`;
19
+ }
20
+ /**
21
+ * Get status indicator for detection summary.
22
+ */
23
+ function getStatusIndicator(summary, hasQuarantined = false) {
24
+ if (hasQuarantined) {
25
+ return chalk.cyan('🔒 QUARANTINED');
26
+ }
27
+ switch (summary) {
28
+ case 'not-installed':
29
+ return chalk.green('✓ CLEAN');
30
+ case 'installed-not-running':
31
+ return chalk.yellow('⚠ INSTALLED (not running)');
32
+ case 'installed-and-running':
33
+ return chalk.red('✖ INSTALLED & RUNNING');
34
+ }
35
+ }
36
+ /**
37
+ * Get colored status text.
38
+ */
39
+ function getStatusText(summary, hasQuarantined = false) {
40
+ if (hasQuarantined) {
41
+ return chalk.cyan('Quarantined');
42
+ }
43
+ switch (summary) {
44
+ case 'not-installed':
45
+ return chalk.green('Not installed');
46
+ case 'installed-not-running':
47
+ return chalk.yellow('Installed (not running)');
48
+ case 'installed-and-running':
49
+ return chalk.red('Installed & Running');
50
+ }
51
+ }
52
+ /**
53
+ * Print detection results to console.
54
+ */
55
+ export function printDetectionResult(result, quarantined = []) {
56
+ const hasQuarantined = quarantined.length > 0;
57
+ // Status header
58
+ console.log();
59
+ console.log(getStatusIndicator(result.summary, hasQuarantined));
60
+ console.log();
61
+ // Main status table
62
+ const mainTable = new Table({
63
+ chars: {
64
+ 'top': '─', 'top-mid': '┬', 'top-left': '┌', 'top-right': '┐',
65
+ 'bottom': '─', 'bottom-mid': '┴', 'bottom-left': '└', 'bottom-right': '┘',
66
+ 'left': '│', 'left-mid': '├', 'mid': '─', 'mid-mid': '┼',
67
+ 'right': '│', 'right-mid': '┤', 'middle': '│',
68
+ },
69
+ colWidths: [20, 50],
70
+ });
71
+ mainTable.push([chalk.bold('Status'), getStatusText(result.summary, hasQuarantined)], [chalk.bold('Hostname'), result.hostname], [chalk.bold('Platform'), result.platform], [chalk.bold('Timestamp'), result.timestamp]);
72
+ console.log(mainTable.toString());
73
+ console.log();
74
+ // Details table
75
+ if (result.summary !== 'not-installed') {
76
+ const detailsTable = new Table({
77
+ head: [chalk.bold('Component'), chalk.bold('Status'), chalk.bold('Details')],
78
+ chars: {
79
+ 'top': '─', 'top-mid': '┬', 'top-left': '┌', 'top-right': '┐',
80
+ 'bottom': '─', 'bottom-mid': '┴', 'bottom-left': '└', 'bottom-right': '┘',
81
+ 'left': '│', 'left-mid': '├', 'mid': '─', 'mid-mid': '┼',
82
+ 'right': '│', 'right-mid': '┤', 'middle': '│',
83
+ },
84
+ colWidths: [15, 15, 40],
85
+ });
86
+ // CLI Binary
87
+ detailsTable.push([
88
+ 'CLI Binary',
89
+ result.cli.found ? chalk.red('Found') : chalk.green('Not found'),
90
+ result.cli.found
91
+ ? `${result.cli.path}${result.cli.version ? ` (v${result.cli.version})` : ''}`
92
+ : '-',
93
+ ]);
94
+ // App Bundle
95
+ detailsTable.push([
96
+ 'App Bundle',
97
+ result.app.found ? chalk.red('Found') : chalk.green('Not found'),
98
+ result.app.found ? result.app.path ?? '-' : '-',
99
+ ]);
100
+ // State Dir
101
+ detailsTable.push([
102
+ 'State Dir',
103
+ result.stateDir.found ? chalk.red('Found') : chalk.green('Not found'),
104
+ result.stateDir.found ? result.stateDir.path ?? '-' : '-',
105
+ ]);
106
+ // Config
107
+ detailsTable.push([
108
+ 'Config',
109
+ result.config.found ? chalk.red('Found') : chalk.green('Not found'),
110
+ result.config.found ? result.config.path ?? '-' : '-',
111
+ ]);
112
+ // If config has details, show model info in the table
113
+ if (result.config.details?.model) {
114
+ detailsTable.push([
115
+ 'AI Model',
116
+ chalk.red('Configured'),
117
+ `${result.config.details.model}${result.config.details.apiProvider ? ` (${result.config.details.apiProvider})` : ''}`,
118
+ ]);
119
+ }
120
+ // Show autonomous mode if enabled
121
+ if (result.config.details?.autonomousMode) {
122
+ detailsTable.push([
123
+ 'Autonomous',
124
+ chalk.red('ENABLED'),
125
+ chalk.red('Agent has autonomous execution'),
126
+ ]);
127
+ }
128
+ // Service
129
+ detailsTable.push([
130
+ 'Service',
131
+ result.service.found
132
+ ? result.service.running
133
+ ? chalk.red('Running')
134
+ : chalk.yellow('Stopped')
135
+ : chalk.green('Not found'),
136
+ result.service.found ? result.service.name ?? '-' : '-',
137
+ ]);
138
+ // Gateway
139
+ detailsTable.push([
140
+ 'Gateway',
141
+ result.gateway.found
142
+ ? result.gateway.listening
143
+ ? chalk.red('Listening')
144
+ : chalk.yellow('Not listening')
145
+ : chalk.green('Not found'),
146
+ result.gateway.found ? `Port ${result.gateway.port}` : '-',
147
+ ]);
148
+ // Docker
149
+ detailsTable.push([
150
+ 'Docker',
151
+ result.docker.found ? chalk.red('Found') : chalk.green('Not found'),
152
+ result.docker.found
153
+ ? `${result.docker.containers?.length ?? 0} containers, ${result.docker.images?.length ?? 0} images`
154
+ : '-',
155
+ ]);
156
+ console.log(chalk.bold('Detection Details:'));
157
+ console.log(detailsTable.toString());
158
+ console.log();
159
+ // Configuration details section
160
+ if (result.config.found && result.config.details) {
161
+ const details = result.config.details;
162
+ const detectionConfig = getDetectionConfig();
163
+ // Build channel display name lookup from config
164
+ const channelDisplayNames = new Map();
165
+ for (const pattern of detectionConfig.channelPatterns) {
166
+ channelDisplayNames.set(pattern.id, pattern.displayName);
167
+ }
168
+ // Communication channels
169
+ if (details.channels) {
170
+ const enabledChannels = [];
171
+ // Process all channel keys dynamically
172
+ for (const [key, enabled] of Object.entries(details.channels)) {
173
+ if (key === 'other')
174
+ continue; // Handle separately
175
+ if (enabled) {
176
+ // Use display name from config, or capitalize the key
177
+ const displayName = channelDisplayNames.get(key) ??
178
+ key.charAt(0).toUpperCase() + key.slice(1);
179
+ enabledChannels.push(displayName);
180
+ }
181
+ }
182
+ // Add unknown/other channels
183
+ if (details.channels.other && Array.isArray(details.channels.other)) {
184
+ for (const channel of details.channels.other) {
185
+ // Capitalize unknown channels
186
+ const displayName = channel.charAt(0).toUpperCase() + channel.slice(1);
187
+ enabledChannels.push(displayName);
188
+ }
189
+ }
190
+ if (enabledChannels.length > 0) {
191
+ const channelTable = new Table({
192
+ chars: {
193
+ 'top': '─', 'top-mid': '┬', 'top-left': '┌', 'top-right': '┐',
194
+ 'bottom': '─', 'bottom-mid': '┴', 'bottom-left': '└', 'bottom-right': '┘',
195
+ 'left': '│', 'left-mid': '├', 'mid': '─', 'mid-mid': '┼',
196
+ 'right': '│', 'right-mid': '┤', 'middle': '│',
197
+ },
198
+ colWidths: [25, 45],
199
+ });
200
+ channelTable.push([
201
+ chalk.bold('Communication Channels'),
202
+ enabledChannels.map(c => chalk.red(c)).join(', '),
203
+ ]);
204
+ console.log(chalk.bold('Configuration Analysis:'));
205
+ console.log(channelTable.toString());
206
+ console.log();
207
+ }
208
+ }
209
+ // Permissions
210
+ if (details.permissions && details.permissions.length > 0) {
211
+ const permTable = new Table({
212
+ head: [chalk.bold('Granted Permissions')],
213
+ chars: {
214
+ 'top': '─', 'top-mid': '┬', 'top-left': '┌', 'top-right': '┐',
215
+ 'bottom': '─', 'bottom-mid': '┴', 'bottom-left': '└', 'bottom-right': '┘',
216
+ 'left': '│', 'left-mid': '├', 'mid': '─', 'mid-mid': '┼',
217
+ 'right': '│', 'right-mid': '┤', 'middle': '│',
218
+ },
219
+ colWidths: [50],
220
+ });
221
+ for (const perm of details.permissions) {
222
+ permTable.push([chalk.yellow(perm)]);
223
+ }
224
+ console.log(chalk.bold('Agent Permissions:'));
225
+ console.log(permTable.toString());
226
+ console.log();
227
+ }
228
+ }
229
+ }
230
+ // Processes table
231
+ if (result.processes.length > 0) {
232
+ const processTable = new Table({
233
+ head: [
234
+ chalk.bold('PID'),
235
+ chalk.bold('Name'),
236
+ chalk.bold('User'),
237
+ chalk.bold('Memory'),
238
+ ],
239
+ chars: {
240
+ 'top': '─', 'top-mid': '┬', 'top-left': '┌', 'top-right': '┐',
241
+ 'bottom': '─', 'bottom-mid': '┴', 'bottom-left': '└', 'bottom-right': '┘',
242
+ 'left': '│', 'left-mid': '├', 'mid': '─', 'mid-mid': '┼',
243
+ 'right': '│', 'right-mid': '┤', 'middle': '│',
244
+ },
245
+ });
246
+ for (const proc of result.processes) {
247
+ processTable.push([
248
+ String(proc.pid),
249
+ proc.name,
250
+ proc.user ?? '-',
251
+ proc.memory ? formatBytes(proc.memory) : '-',
252
+ ]);
253
+ }
254
+ console.log(chalk.bold('Running Processes:'));
255
+ console.log(processTable.toString());
256
+ console.log();
257
+ }
258
+ }
259
+ /**
260
+ * Print enforcement results to console.
261
+ */
262
+ export function printEnforcementResult(result) {
263
+ console.log();
264
+ console.log(chalk.bold('Enforcement Results:'));
265
+ console.log();
266
+ const table = new Table({
267
+ head: [
268
+ chalk.bold('Action'),
269
+ chalk.bold('Target'),
270
+ chalk.bold('Status'),
271
+ chalk.bold('Details'),
272
+ ],
273
+ chars: {
274
+ 'top': '─', 'top-mid': '┬', 'top-left': '┌', 'top-right': '┐',
275
+ 'bottom': '─', 'bottom-mid': '┴', 'bottom-left': '└', 'bottom-right': '┘',
276
+ 'left': '│', 'left-mid': '├', 'mid': '─', 'mid-mid': '┼',
277
+ 'right': '│', 'right-mid': '┤', 'middle': '│',
278
+ },
279
+ colWidths: [16, 32, 10, 40],
280
+ wordWrap: true,
281
+ });
282
+ for (const action of result.actions) {
283
+ let statusText;
284
+ switch (action.status) {
285
+ case 'success':
286
+ statusText = chalk.green('Success');
287
+ break;
288
+ case 'failed':
289
+ statusText = chalk.red('Failed');
290
+ break;
291
+ case 'skipped':
292
+ statusText = chalk.yellow('Skipped');
293
+ break;
294
+ case 'pending':
295
+ statusText = chalk.gray('Pending');
296
+ break;
297
+ }
298
+ const details = action.dryRun
299
+ ? chalk.dim('(dry-run)')
300
+ : action.error ?? '';
301
+ table.push([
302
+ action.type,
303
+ action.target,
304
+ statusText,
305
+ details,
306
+ ]);
307
+ }
308
+ console.log(table.toString());
309
+ console.log();
310
+ // Summary
311
+ const { summary } = result;
312
+ console.log(chalk.bold('Summary:'));
313
+ console.log(` Total: ${summary.total}`);
314
+ console.log(` ${chalk.green('Success:')} ${summary.success}`);
315
+ console.log(` ${chalk.red('Failed:')} ${summary.failed}`);
316
+ console.log(` ${chalk.yellow('Skipped:')} ${summary.skipped}`);
317
+ console.log();
318
+ }
319
+ /**
320
+ * Print isolation results to console.
321
+ */
322
+ export function printIsolationResult(result) {
323
+ console.log();
324
+ console.log(chalk.bold('Isolation Results:'));
325
+ console.log();
326
+ const table = new Table({
327
+ head: [
328
+ chalk.bold('Action'),
329
+ chalk.bold('Target'),
330
+ chalk.bold('Status'),
331
+ chalk.bold('Details'),
332
+ ],
333
+ chars: {
334
+ 'top': '─', 'top-mid': '┬', 'top-left': '┌', 'top-right': '┐',
335
+ 'bottom': '─', 'bottom-mid': '┴', 'bottom-left': '└', 'bottom-right': '┘',
336
+ 'left': '│', 'left-mid': '├', 'mid': '─', 'mid-mid': '┼',
337
+ 'right': '│', 'right-mid': '┤', 'middle': '│',
338
+ },
339
+ colWidths: [16, 32, 10, 40],
340
+ wordWrap: true,
341
+ });
342
+ for (const action of result.actions) {
343
+ let statusText;
344
+ switch (action.status) {
345
+ case 'success':
346
+ statusText = chalk.green('Success');
347
+ break;
348
+ case 'failed':
349
+ statusText = chalk.red('Failed');
350
+ break;
351
+ case 'pending':
352
+ statusText = chalk.gray('Pending');
353
+ break;
354
+ }
355
+ const details = action.quarantinePath ?? action.error ?? '';
356
+ table.push([
357
+ action.type,
358
+ action.target,
359
+ statusText,
360
+ details,
361
+ ]);
362
+ }
363
+ console.log(table.toString());
364
+ console.log();
365
+ // Quarantine info
366
+ if (result.quarantine) {
367
+ console.log(chalk.bold('Quarantine Info:'));
368
+ console.log(` ID: ${result.quarantine.id}`);
369
+ console.log(` Path: ${result.quarantine.path}`);
370
+ console.log(` Artifacts: ${result.quarantine.manifest.artifacts.length}`);
371
+ console.log();
372
+ }
373
+ }
374
+ /**
375
+ * Print a simple status message.
376
+ */
377
+ export function printStatus(message, type = 'info') {
378
+ const prefix = {
379
+ info: chalk.blue('ℹ'),
380
+ success: chalk.green('✓'),
381
+ warning: chalk.yellow('⚠'),
382
+ error: chalk.red('✖'),
383
+ };
384
+ console.log(`${prefix[type]} ${message}`);
385
+ }
386
+ /**
387
+ * Print quarantine notice box for scan results.
388
+ */
389
+ export function printQuarantineNotice(quarantined) {
390
+ if (quarantined.length === 0)
391
+ return;
392
+ // Create a distinctive box for quarantine notice
393
+ const boxWidth = 60;
394
+ const horizontalLine = '═'.repeat(boxWidth - 2);
395
+ const emptyLine = '║' + ' '.repeat(boxWidth - 2) + '║';
396
+ console.log();
397
+ console.log(chalk.cyan('╔' + horizontalLine + '╗'));
398
+ console.log(chalk.cyan(emptyLine));
399
+ // Title
400
+ const title = `🔒 ${quarantined.length} QUARANTINED ITEM${quarantined.length > 1 ? 'S' : ''} FOUND`;
401
+ const titlePadding = Math.floor((boxWidth - 2 - title.length) / 2);
402
+ console.log(chalk.cyan('║') + ' '.repeat(titlePadding) + chalk.bold.cyan(title) + ' '.repeat(boxWidth - 2 - titlePadding - title.length) + chalk.cyan('║'));
403
+ console.log(chalk.cyan(emptyLine));
404
+ // Show each quarantined item
405
+ for (const item of quarantined) {
406
+ const idLine = ` ID: ${item.id}`;
407
+ console.log(chalk.cyan('║') + chalk.white(idLine) + ' '.repeat(Math.max(0, boxWidth - 2 - idLine.length)) + chalk.cyan('║'));
408
+ const artifactLine = ` Artifacts: ${item.artifacts.length} quarantined`;
409
+ console.log(chalk.cyan('║') + chalk.dim(artifactLine) + ' '.repeat(Math.max(0, boxWidth - 2 - artifactLine.length)) + chalk.cyan('║'));
410
+ if (item.detection?.model) {
411
+ const modelLine = ` Model: ${item.detection.model}`;
412
+ const truncatedModel = modelLine.length > boxWidth - 4 ? modelLine.substring(0, boxWidth - 7) + '...' : modelLine;
413
+ console.log(chalk.cyan('║') + chalk.dim(truncatedModel) + ' '.repeat(Math.max(0, boxWidth - 2 - truncatedModel.length)) + chalk.cyan('║'));
414
+ }
415
+ if (quarantined.indexOf(item) < quarantined.length - 1) {
416
+ console.log(chalk.cyan('║') + chalk.dim(' ' + '─'.repeat(boxWidth - 6)) + ' ' + chalk.cyan('║'));
417
+ }
418
+ }
419
+ console.log(chalk.cyan(emptyLine));
420
+ // Footer hint
421
+ const hint1 = 'Use "nox isolate list" for details';
422
+ const hint1Padding = Math.floor((boxWidth - 2 - hint1.length) / 2);
423
+ console.log(chalk.cyan('║') + ' '.repeat(hint1Padding) + chalk.dim(hint1) + ' '.repeat(boxWidth - 2 - hint1Padding - hint1.length) + chalk.cyan('║'));
424
+ const hint2 = '"nox isolate revert" to restore, "nox purge" to delete';
425
+ const hint2Padding = Math.floor((boxWidth - 2 - hint2.length) / 2);
426
+ console.log(chalk.cyan('║') + ' '.repeat(hint2Padding) + chalk.dim(hint2) + ' '.repeat(boxWidth - 2 - hint2Padding - hint2.length) + chalk.cyan('║'));
427
+ console.log(chalk.cyan(emptyLine));
428
+ console.log(chalk.cyan('╚' + horizontalLine + '╝'));
429
+ console.log();
430
+ }
431
+ //# sourceMappingURL=console.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"console.js","sourceRoot":"","sources":["../../src/reporter/console.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,O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C;IACnC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,cAAc,GAAG,GAAG,CAAC,CAAC,CAAC;IACpD,OAAO,CAAC,GAAG,EAAE,CAAC;AAChB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Reporter module - output formatting and webhook delivery.
3
+ *
4
+ * Provides console, JSON, and webhook output for detection,
5
+ * enforcement, and isolation results.
6
+ */
7
+ export { printBanner, printDetectionResult, printEnforcementResult, printIsolationResult, printStatus, printQuarantineNotice, } from './console.js';
8
+ export { formatDetectionJson, formatEnforcementJson, formatIsolationJson, printDetectionJson, printEnforcementJson, printIsolationJson, type JsonDetectionOutput, type JsonEnforcementOutput, type JsonIsolationOutput, } from './json.js';
9
+ export { buildDetectionPayload, buildEnforcementPayload, buildIsolationPayload, sendWebhook, sendDetectionWebhook, sendEnforcementWebhook, sendIsolationWebhook, type WebhookEventType, type WebhookPayload, type WebhookResult, type WebhookSeverity, } from './webhook.js';
10
+ export type { WebhookOptions } from '../types/index.js';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reporter/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,WAAW,EACX,qBAAqB,GACtB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,GACzB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,WAAW,EACX,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,cAAc,CAAC;AAGtB,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Reporter module - output formatting and webhook delivery.
3
+ *
4
+ * Provides console, JSON, and webhook output for detection,
5
+ * enforcement, and isolation results.
6
+ */
7
+ // Console output
8
+ export { printBanner, printDetectionResult, printEnforcementResult, printIsolationResult, printStatus, printQuarantineNotice, } from './console.js';
9
+ // JSON output
10
+ export { formatDetectionJson, formatEnforcementJson, formatIsolationJson, printDetectionJson, printEnforcementJson, printIsolationJson, } from './json.js';
11
+ // Webhook delivery
12
+ export { buildDetectionPayload, buildEnforcementPayload, buildIsolationPayload, sendWebhook, sendDetectionWebhook, sendEnforcementWebhook, sendIsolationWebhook, } from './webhook.js';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reporter/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,iBAAiB;AACjB,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,WAAW,EACX,qBAAqB,GACtB,MAAM,cAAc,CAAC;AAEtB,cAAc;AACd,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,GAInB,MAAM,WAAW,CAAC;AAEnB,mBAAmB;AACnB,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,WAAW,EACX,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,GAKrB,MAAM,cAAc,CAAC"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * JSON output formatting for detection, enforcement, and isolation results.
3
+ */
4
+ import type { DetectionResult, EnforcementResult, IsolationResult, QuarantineManifest } from '../types/index.js';
5
+ export interface JsonDetectionOutput {
6
+ nox: {
7
+ version: string;
8
+ tool: string;
9
+ };
10
+ detection: DetectionResult;
11
+ quarantine?: {
12
+ count: number;
13
+ items: {
14
+ id: string;
15
+ timestamp: string;
16
+ artifacts: number;
17
+ }[];
18
+ };
19
+ }
20
+ export interface JsonEnforcementOutput {
21
+ nox: {
22
+ version: string;
23
+ tool: string;
24
+ };
25
+ detection: DetectionResult;
26
+ enforcement: EnforcementResult;
27
+ }
28
+ export interface JsonIsolationOutput {
29
+ nox: {
30
+ version: string;
31
+ tool: string;
32
+ };
33
+ detection: DetectionResult;
34
+ enforcement?: EnforcementResult;
35
+ isolation: IsolationResult;
36
+ }
37
+ /**
38
+ * Format detection result as JSON string.
39
+ */
40
+ export declare function formatDetectionJson(result: DetectionResult, quarantined?: QuarantineManifest[], pretty?: boolean): string;
41
+ /**
42
+ * Format enforcement result as JSON string.
43
+ */
44
+ export declare function formatEnforcementJson(detection: DetectionResult, enforcement: EnforcementResult, pretty?: boolean): string;
45
+ /**
46
+ * Format isolation result as JSON string.
47
+ */
48
+ export declare function formatIsolationJson(detection: DetectionResult, isolation: IsolationResult, enforcement?: EnforcementResult, pretty?: boolean): string;
49
+ /**
50
+ * Print detection result as JSON to stdout.
51
+ */
52
+ export declare function printDetectionJson(result: DetectionResult, quarantined?: QuarantineManifest[], pretty?: boolean): void;
53
+ /**
54
+ * Print enforcement result as JSON to stdout.
55
+ */
56
+ export declare function printEnforcementJson(detection: DetectionResult, enforcement: EnforcementResult, pretty?: boolean): void;
57
+ /**
58
+ * Print isolation result as JSON to stdout.
59
+ */
60
+ export declare function printIsolationJson(detection: DetectionResult, isolation: IsolationResult, enforcement?: EnforcementResult, pretty?: boolean): void;
61
+ //# sourceMappingURL=json.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/reporter/json.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EACn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W,GAAE,kBAAkB,EAAO,EACtC,MAAM,UAAO,GACZ,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,eAAe,EAC1B,WAAW,EAAE,iBAAiB,EAC9B,MAAM,UAAO,GACZ,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,eAAe,EAC1B,SAAS,EAAE,eAAe,EAC1B,WAAW,CAAC,EAAE,iBAAiB,EAC/B,MAAM,UAAO,GACZ,IAAI,CAEN"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * JSON output formatting for detection, enforcement, and isolation results.
3
+ */
4
+ import { VERSION, TOOL_NAME } from '../branding.js';
5
+ /**
6
+ * Format detection result as JSON string.
7
+ */
8
+ export function formatDetectionJson(result, quarantined = [], pretty = true) {
9
+ const output = {
10
+ nox: {
11
+ version: VERSION,
12
+ tool: TOOL_NAME,
13
+ },
14
+ detection: result,
15
+ ...(quarantined.length > 0 && {
16
+ quarantine: {
17
+ count: quarantined.length,
18
+ items: quarantined.map(q => ({
19
+ id: q.id,
20
+ timestamp: q.timestamp,
21
+ artifacts: q.artifacts.length,
22
+ })),
23
+ },
24
+ }),
25
+ };
26
+ return pretty ? JSON.stringify(output, null, 2) : JSON.stringify(output);
27
+ }
28
+ /**
29
+ * Format enforcement result as JSON string.
30
+ */
31
+ export function formatEnforcementJson(detection, enforcement, pretty = true) {
32
+ const output = {
33
+ nox: {
34
+ version: VERSION,
35
+ tool: TOOL_NAME,
36
+ },
37
+ detection,
38
+ enforcement,
39
+ };
40
+ return pretty ? JSON.stringify(output, null, 2) : JSON.stringify(output);
41
+ }
42
+ /**
43
+ * Format isolation result as JSON string.
44
+ */
45
+ export function formatIsolationJson(detection, isolation, enforcement, pretty = true) {
46
+ const output = {
47
+ nox: {
48
+ version: VERSION,
49
+ tool: TOOL_NAME,
50
+ },
51
+ detection,
52
+ ...(enforcement && { enforcement }),
53
+ isolation,
54
+ };
55
+ return pretty ? JSON.stringify(output, null, 2) : JSON.stringify(output);
56
+ }
57
+ /**
58
+ * Print detection result as JSON to stdout.
59
+ */
60
+ export function printDetectionJson(result, quarantined = [], pretty = true) {
61
+ console.log(formatDetectionJson(result, quarantined, pretty));
62
+ }
63
+ /**
64
+ * Print enforcement result as JSON to stdout.
65
+ */
66
+ export function printEnforcementJson(detection, enforcement, pretty = true) {
67
+ console.log(formatEnforcementJson(detection, enforcement, pretty));
68
+ }
69
+ /**
70
+ * Print isolation result as JSON to stdout.
71
+ */
72
+ export function printIsolationJson(detection, isolation, enforcement, pretty = true) {
73
+ console.log(formatIsolationJson(detection, isolation, enforcement, pretty));
74
+ }
75
+ //# sourceMappingURL=json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.js","sourceRoot":"","sources":["../../src/reporter/json.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAqCpD;;GAEG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAAuB,EACvB,cAAoC,EAAE,EACtC,MAAM,GAAG,IAAI;IAEb,MAAM,MAAM,GAAwB;QAClC,GAAG,EAAE;YACH,OAAO,EAAE,OAAO;YAChB,IAAI,EAAE,SAAS;SAChB;QACD,SAAS,EAAE,MAAM;QACjB,GAAG,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI;YAC5B,UAAU,EAAE;gBACV,KAAK,EAAE,WAAW,CAAC,MAAM;gBACzB,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;oBAC3B,EAAE,EAAE,CAAC,CAAC,EAAE;oBACR,SAAS,EAAE,CAAC,CAAC,SAAS;oBACtB,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM;iBAC9B,CAAC,CAAC;aACJ;SACF,CAAC;KACH,CAAC;IAEF,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC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