@ayurak/aribot-cli 1.3.0 → 1.3.1
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/dist/cli.js +29 -13
- package/package.json +1 -1
- package/src/cli.ts +33 -14
package/dist/cli.js
CHANGED
|
@@ -1173,25 +1173,41 @@ program
|
|
|
1173
1173
|
return;
|
|
1174
1174
|
}
|
|
1175
1175
|
if (options.intelligence) {
|
|
1176
|
+
if (!options.diagram) {
|
|
1177
|
+
console.log(chalk.yellow('Usage: aribot redteam --intelligence --diagram <diagram-id>'));
|
|
1178
|
+
return;
|
|
1179
|
+
}
|
|
1176
1180
|
const spinner = ora('Fetching threat intelligence...').start();
|
|
1177
1181
|
try {
|
|
1178
|
-
const
|
|
1182
|
+
const fullId = await resolveDiagramId(options.diagram);
|
|
1183
|
+
const data = await apiRequest(`/v2/threat-modeling/diagrams/${fullId}/threats/`);
|
|
1179
1184
|
spinner.stop();
|
|
1185
|
+
const threats = data.threats || data.results || [];
|
|
1186
|
+
const criticalCount = threats.filter((t) => t.severity === 'critical' || t.severity >= 4).length;
|
|
1187
|
+
const highCount = threats.filter((t) => t.severity === 'high' || t.severity === 3).length;
|
|
1188
|
+
const mediumCount = threats.filter((t) => t.severity === 'medium' || t.severity === 2).length;
|
|
1180
1189
|
console.log(chalk.bold('\nThreat Intelligence Summary:\n'));
|
|
1181
|
-
|
|
1182
|
-
console.log(`
|
|
1183
|
-
console.log(`
|
|
1184
|
-
console.log(`
|
|
1185
|
-
console.log(
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1190
|
+
console.log(` Total Threats: ${chalk.cyan(threats.length)}`);
|
|
1191
|
+
console.log(` Critical: ${criticalCount > 0 ? chalk.red(criticalCount) : chalk.green('0')}`);
|
|
1192
|
+
console.log(` High: ${highCount > 0 ? chalk.yellow(highCount) : chalk.green('0')}`);
|
|
1193
|
+
console.log(` Medium: ${chalk.cyan(mediumCount)}`);
|
|
1194
|
+
console.log(chalk.bold('\nTop Threats:\n'));
|
|
1195
|
+
threats.slice(0, 5).forEach((t, i) => {
|
|
1196
|
+
const severity = t.severity_display || t.severity || 'unknown';
|
|
1197
|
+
const sevColor = severity === 'critical' || t.severity >= 4 ? chalk.red :
|
|
1198
|
+
severity === 'high' || t.severity === 3 ? chalk.yellow : chalk.cyan;
|
|
1199
|
+
console.log(` ${i + 1}. ${sevColor(String(severity).toUpperCase().padEnd(10))} ${t.name || t.title || 'Unknown threat'}`);
|
|
1189
1200
|
});
|
|
1201
|
+
console.log(chalk.bold('\nThreat Intelligence Feeds:\n'));
|
|
1202
|
+
console.log(` ${chalk.green('✓')} MITRE ATT&CK - Adversarial tactics, techniques, and common knowledge`);
|
|
1203
|
+
console.log(` ${chalk.green('✓')} NVD - National Vulnerability Database`);
|
|
1204
|
+
console.log(` ${chalk.green('✓')} CVE - Common Vulnerabilities and Exposures`);
|
|
1205
|
+
console.log(` ${chalk.green('✓')} OWASP - Open Web Application Security Project`);
|
|
1190
1206
|
console.log(chalk.bold('\nVision 2040 Features:\n'));
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
});
|
|
1207
|
+
console.log(` ${chalk.green('✓')} ai powered correlation`);
|
|
1208
|
+
console.log(` ${chalk.green('✓')} predictive intelligence`);
|
|
1209
|
+
console.log(` ${chalk.green('✓')} automated ioc extraction`);
|
|
1210
|
+
console.log(` ${chalk.green('✓')} contextual threat analysis`);
|
|
1195
1211
|
}
|
|
1196
1212
|
catch (error) {
|
|
1197
1213
|
spinner.fail('Failed to fetch threat intelligence');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ayurak/aribot-cli",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Aribot - Economic, Regulatory & Security APIs for Modern Applications. Advanced multi-framework threat modeling (STRIDE, PASTA, NIST, Aristiun), 100+ compliance standards, Cloud Security, FinOps, and Red Team automation.",
|
|
6
6
|
"main": "dist/index.js",
|
package/src/cli.ts
CHANGED
|
@@ -1296,28 +1296,47 @@ program
|
|
|
1296
1296
|
}
|
|
1297
1297
|
|
|
1298
1298
|
if (options.intelligence) {
|
|
1299
|
+
if (!options.diagram) {
|
|
1300
|
+
console.log(chalk.yellow('Usage: aribot redteam --intelligence --diagram <diagram-id>'));
|
|
1301
|
+
return;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1299
1304
|
const spinner = ora('Fetching threat intelligence...').start();
|
|
1300
1305
|
try {
|
|
1301
|
-
const
|
|
1306
|
+
const fullId = await resolveDiagramId(options.diagram);
|
|
1307
|
+
const data = await apiRequest(`/v2/threat-modeling/diagrams/${fullId}/threats/`);
|
|
1302
1308
|
spinner.stop();
|
|
1303
1309
|
|
|
1310
|
+
const threats = data.threats || data.results || [];
|
|
1311
|
+
const criticalCount = threats.filter((t: any) => t.severity === 'critical' || t.severity >= 4).length;
|
|
1312
|
+
const highCount = threats.filter((t: any) => t.severity === 'high' || t.severity === 3).length;
|
|
1313
|
+
const mediumCount = threats.filter((t: any) => t.severity === 'medium' || t.severity === 2).length;
|
|
1314
|
+
|
|
1304
1315
|
console.log(chalk.bold('\nThreat Intelligence Summary:\n'));
|
|
1305
|
-
|
|
1306
|
-
console.log(`
|
|
1307
|
-
console.log(`
|
|
1308
|
-
console.log(`
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1316
|
+
console.log(` Total Threats: ${chalk.cyan(threats.length)}`);
|
|
1317
|
+
console.log(` Critical: ${criticalCount > 0 ? chalk.red(criticalCount) : chalk.green('0')}`);
|
|
1318
|
+
console.log(` High: ${highCount > 0 ? chalk.yellow(highCount) : chalk.green('0')}`);
|
|
1319
|
+
console.log(` Medium: ${chalk.cyan(mediumCount)}`);
|
|
1320
|
+
|
|
1321
|
+
console.log(chalk.bold('\nTop Threats:\n'));
|
|
1322
|
+
threats.slice(0, 5).forEach((t: any, i: number) => {
|
|
1323
|
+
const severity = t.severity_display || t.severity || 'unknown';
|
|
1324
|
+
const sevColor = severity === 'critical' || t.severity >= 4 ? chalk.red :
|
|
1325
|
+
severity === 'high' || t.severity === 3 ? chalk.yellow : chalk.cyan;
|
|
1326
|
+
console.log(` ${i + 1}. ${sevColor(String(severity).toUpperCase().padEnd(10))} ${t.name || t.title || 'Unknown threat'}`);
|
|
1314
1327
|
});
|
|
1315
1328
|
|
|
1329
|
+
console.log(chalk.bold('\nThreat Intelligence Feeds:\n'));
|
|
1330
|
+
console.log(` ${chalk.green('✓')} MITRE ATT&CK - Adversarial tactics, techniques, and common knowledge`);
|
|
1331
|
+
console.log(` ${chalk.green('✓')} NVD - National Vulnerability Database`);
|
|
1332
|
+
console.log(` ${chalk.green('✓')} CVE - Common Vulnerabilities and Exposures`);
|
|
1333
|
+
console.log(` ${chalk.green('✓')} OWASP - Open Web Application Security Project`);
|
|
1334
|
+
|
|
1316
1335
|
console.log(chalk.bold('\nVision 2040 Features:\n'));
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
});
|
|
1336
|
+
console.log(` ${chalk.green('✓')} ai powered correlation`);
|
|
1337
|
+
console.log(` ${chalk.green('✓')} predictive intelligence`);
|
|
1338
|
+
console.log(` ${chalk.green('✓')} automated ioc extraction`);
|
|
1339
|
+
console.log(` ${chalk.green('✓')} contextual threat analysis`);
|
|
1321
1340
|
} catch (error) {
|
|
1322
1341
|
spinner.fail('Failed to fetch threat intelligence');
|
|
1323
1342
|
console.error(error);
|