@ayurak/aribot-cli 1.0.9 → 1.0.10
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 +21 -22
- package/package.json +1 -1
- package/src/cli.ts +21 -24
package/dist/cli.js
CHANGED
|
@@ -37,7 +37,7 @@ const program = new commander_1.Command();
|
|
|
37
37
|
program
|
|
38
38
|
.name('aribot')
|
|
39
39
|
.description('Aribot - Economic, Regulatory & Security APIs for Modern Applications')
|
|
40
|
-
.version('1.0.
|
|
40
|
+
.version('1.0.10');
|
|
41
41
|
// Helper to get auth headers
|
|
42
42
|
function getHeaders() {
|
|
43
43
|
const apiKey = config.get('apiKey');
|
|
@@ -977,36 +977,35 @@ program
|
|
|
977
977
|
const data = await apiRequest(`/v2/threat-modeling/diagrams/${fullId}/generate-ai-insights/`, {
|
|
978
978
|
method: 'POST',
|
|
979
979
|
body: JSON.stringify({
|
|
980
|
-
include_recommendations: true
|
|
981
|
-
include_cost_analysis: true
|
|
980
|
+
include_recommendations: true
|
|
982
981
|
})
|
|
983
982
|
});
|
|
984
983
|
spinner.succeed('AI insights generated!');
|
|
985
984
|
console.log(chalk_1.default.bold('\nAI Architecture Insights:\n'));
|
|
986
|
-
|
|
987
|
-
console.log(`
|
|
988
|
-
console.log(`
|
|
989
|
-
console.log(`
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
985
|
+
console.log(` Diagram: ${chalk_1.default.cyan(data.diagram_name || 'N/A')}`);
|
|
986
|
+
console.log(` Components: ${chalk_1.default.white(data.component_count || 0)}`);
|
|
987
|
+
console.log(` AI Provider: ${chalk_1.default.green(data.provider || 'ai_agent')}`);
|
|
988
|
+
console.log(` Generated: ${chalk_1.default.gray(data.generated_at || 'now')}`);
|
|
989
|
+
const threats = data.threats || [];
|
|
990
|
+
if (threats.length > 0) {
|
|
991
|
+
console.log(chalk_1.default.bold('\nPredicted Threats:\n'));
|
|
992
|
+
threats.slice(0, 5).forEach((t) => {
|
|
993
|
+
const severity = t.severity || 'medium';
|
|
994
|
+
const severityColor = severity === 'critical' || severity === 'high' ? chalk_1.default.red : chalk_1.default.yellow;
|
|
995
|
+
console.log(` ${severityColor('!')} ${t.name || t.threat_id}: ${t.description || ''}`);
|
|
996
|
+
if (t.probability) {
|
|
997
|
+
console.log(` ${chalk_1.default.gray(`Probability: ${(t.probability * 100).toFixed(0)}%`)}`);
|
|
998
|
+
}
|
|
996
999
|
});
|
|
997
1000
|
}
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
console.log(chalk_1.default.bold('\nWeaknesses:\n'));
|
|
1001
|
-
weaknesses.slice(0, 3).forEach((w) => {
|
|
1002
|
-
console.log(` ${chalk_1.default.red('✗')} ${w.title || w.description || w}`);
|
|
1003
|
-
});
|
|
1001
|
+
else {
|
|
1002
|
+
console.log(chalk_1.default.green('\n No critical threats identified.'));
|
|
1004
1003
|
}
|
|
1005
|
-
const recommendations =
|
|
1004
|
+
const recommendations = data.recommendations || [];
|
|
1006
1005
|
if (recommendations.length > 0) {
|
|
1007
1006
|
console.log(chalk_1.default.bold('\nAI Recommendations:\n'));
|
|
1008
|
-
recommendations.slice(0,
|
|
1009
|
-
console.log(` ${chalk_1.default.cyan('→')} ${r.title || r.description || r}`);
|
|
1007
|
+
recommendations.slice(0, 5).forEach((r) => {
|
|
1008
|
+
console.log(` ${chalk_1.default.cyan('→')} ${typeof r === 'string' ? r : (r.title || r.description || r)}`);
|
|
1010
1009
|
});
|
|
1011
1010
|
}
|
|
1012
1011
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ayurak/aribot-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"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.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
package/src/cli.ts
CHANGED
|
@@ -36,7 +36,7 @@ const program = new Command();
|
|
|
36
36
|
program
|
|
37
37
|
.name('aribot')
|
|
38
38
|
.description('Aribot - Economic, Regulatory & Security APIs for Modern Applications')
|
|
39
|
-
.version('1.0.
|
|
39
|
+
.version('1.0.10');
|
|
40
40
|
|
|
41
41
|
// Helper to get auth headers
|
|
42
42
|
function getHeaders(): Record<string, string> {
|
|
@@ -1095,8 +1095,7 @@ program
|
|
|
1095
1095
|
const data = await apiRequest(`/v2/threat-modeling/diagrams/${fullId}/generate-ai-insights/`, {
|
|
1096
1096
|
method: 'POST',
|
|
1097
1097
|
body: JSON.stringify({
|
|
1098
|
-
include_recommendations: true
|
|
1099
|
-
include_cost_analysis: true
|
|
1098
|
+
include_recommendations: true
|
|
1100
1099
|
})
|
|
1101
1100
|
});
|
|
1102
1101
|
|
|
@@ -1104,33 +1103,31 @@ program
|
|
|
1104
1103
|
|
|
1105
1104
|
console.log(chalk.bold('\nAI Architecture Insights:\n'));
|
|
1106
1105
|
|
|
1107
|
-
|
|
1108
|
-
console.log(`
|
|
1109
|
-
console.log(`
|
|
1110
|
-
console.log(`
|
|
1111
|
-
console.log(` AI Confidence: ${chalk.green((insights.confidence || 0.88) * 100 + '%')}`);
|
|
1112
|
-
|
|
1113
|
-
const strengths = insights.strengths || [];
|
|
1114
|
-
if (strengths.length > 0) {
|
|
1115
|
-
console.log(chalk.bold('\nStrengths:\n'));
|
|
1116
|
-
strengths.slice(0, 3).forEach((s: any) => {
|
|
1117
|
-
console.log(` ${chalk.green('✓')} ${s.title || s.description || s}`);
|
|
1118
|
-
});
|
|
1119
|
-
}
|
|
1106
|
+
console.log(` Diagram: ${chalk.cyan(data.diagram_name || 'N/A')}`);
|
|
1107
|
+
console.log(` Components: ${chalk.white(data.component_count || 0)}`);
|
|
1108
|
+
console.log(` AI Provider: ${chalk.green(data.provider || 'ai_agent')}`);
|
|
1109
|
+
console.log(` Generated: ${chalk.gray(data.generated_at || 'now')}`);
|
|
1120
1110
|
|
|
1121
|
-
const
|
|
1122
|
-
if (
|
|
1123
|
-
console.log(chalk.bold('\
|
|
1124
|
-
|
|
1125
|
-
|
|
1111
|
+
const threats = data.threats || [];
|
|
1112
|
+
if (threats.length > 0) {
|
|
1113
|
+
console.log(chalk.bold('\nPredicted Threats:\n'));
|
|
1114
|
+
threats.slice(0, 5).forEach((t: any) => {
|
|
1115
|
+
const severity = t.severity || 'medium';
|
|
1116
|
+
const severityColor = severity === 'critical' || severity === 'high' ? chalk.red : chalk.yellow;
|
|
1117
|
+
console.log(` ${severityColor('!')} ${t.name || t.threat_id}: ${t.description || ''}`);
|
|
1118
|
+
if (t.probability) {
|
|
1119
|
+
console.log(` ${chalk.gray(`Probability: ${(t.probability * 100).toFixed(0)}%`)}`);
|
|
1120
|
+
}
|
|
1126
1121
|
});
|
|
1122
|
+
} else {
|
|
1123
|
+
console.log(chalk.green('\n No critical threats identified.'));
|
|
1127
1124
|
}
|
|
1128
1125
|
|
|
1129
|
-
const recommendations =
|
|
1126
|
+
const recommendations = data.recommendations || [];
|
|
1130
1127
|
if (recommendations.length > 0) {
|
|
1131
1128
|
console.log(chalk.bold('\nAI Recommendations:\n'));
|
|
1132
|
-
recommendations.slice(0,
|
|
1133
|
-
console.log(` ${chalk.cyan('→')} ${r.title || r.description || r}`);
|
|
1129
|
+
recommendations.slice(0, 5).forEach((r: any) => {
|
|
1130
|
+
console.log(` ${chalk.cyan('→')} ${typeof r === 'string' ? r : (r.title || r.description || r)}`);
|
|
1134
1131
|
});
|
|
1135
1132
|
}
|
|
1136
1133
|
} catch (error) {
|