@annexfour/cli 1.0.1 → 1.0.3
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/bin/index.js +20 -4
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -83,6 +83,22 @@ program
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
// 3. Project Name (Required for authenticated scans)
|
|
87
|
+
const projectName = options.projectName;
|
|
88
|
+
let finalProjectName = projectName;
|
|
89
|
+
|
|
90
|
+
if (!finalProjectName) {
|
|
91
|
+
const projectAnswer = await inquirer.prompt([
|
|
92
|
+
{
|
|
93
|
+
type: 'input',
|
|
94
|
+
name: 'name',
|
|
95
|
+
message: 'Project Name:',
|
|
96
|
+
default: path.basename(scanPath)
|
|
97
|
+
}
|
|
98
|
+
]);
|
|
99
|
+
finalProjectName = projectAnswer.name;
|
|
100
|
+
}
|
|
101
|
+
|
|
86
102
|
const scanPath = targetPath ? path.resolve(targetPath) : process.cwd();
|
|
87
103
|
|
|
88
104
|
// Construct Docker arguments
|
|
@@ -94,7 +110,7 @@ program
|
|
|
94
110
|
// Forward Env Vars if present
|
|
95
111
|
process.env.ANNEXFOUR_API_URL ? '-e' : '',
|
|
96
112
|
process.env.ANNEXFOUR_API_URL ? `ANNEXFOUR_API_URL=${process.env.ANNEXFOUR_API_URL}` : '',
|
|
97
|
-
'
|
|
113
|
+
'svenj06/ai-act-check',
|
|
98
114
|
'scan', '/code'
|
|
99
115
|
].filter(Boolean); // Remove empty strings
|
|
100
116
|
|
|
@@ -102,9 +118,9 @@ program
|
|
|
102
118
|
if (options.token) {
|
|
103
119
|
dockerArgs.push('--token', options.token);
|
|
104
120
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
121
|
+
|
|
122
|
+
// Always pass project name now that we've ensured we have one
|
|
123
|
+
dockerArgs.push('--project-name', finalProjectName);
|
|
108
124
|
|
|
109
125
|
console.log(`[*] Launching Scanner via Docker...`);
|
|
110
126
|
// console.log(`DEBUG: docker ${dockerArgs.join(' ')}`);
|