fullcourtdefense-cli 1.7.18 → 1.7.19
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/commands/agentCi.d.ts +1 -0
- package/dist/commands/agentCi.js +15 -7
- package/dist/index.js +2 -0
- package/dist/version.json +1 -1
- package/package.json +1 -1
package/dist/commands/agentCi.js
CHANGED
|
@@ -286,16 +286,24 @@ async function agentCiCommand(args, config) {
|
|
|
286
286
|
else {
|
|
287
287
|
printSummary(report, failed, failOn);
|
|
288
288
|
}
|
|
289
|
-
|
|
289
|
+
const uploadRequested = args.upload === 'true' || args.requireUpload === 'true';
|
|
290
|
+
if (uploadRequested) {
|
|
290
291
|
const creds = (0, config_1.resolveCliCredentials)(config, { apiKey: args.apiKey, apiUrl: args.apiUrl });
|
|
291
292
|
if (creds.apiKey || (creds.shieldId && creds.shieldKey)) {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}
|
|
293
|
+
try {
|
|
294
|
+
await (0, discover_1.runDiscoverUpload)({ apiKey: args.apiKey, apiUrl: args.apiUrl, silent: true }, config);
|
|
295
|
+
console.error('AgentGuard evidence upload: uploaded to AI Fleet / discovery posture inventory.');
|
|
296
|
+
}
|
|
297
|
+
catch (error) {
|
|
298
|
+
console.error(`AgentGuard evidence upload: failed (${error instanceof Error ? error.message : String(error)})`);
|
|
299
|
+
if (args.requireUpload === 'true')
|
|
300
|
+
process.exit(1);
|
|
301
|
+
}
|
|
296
302
|
}
|
|
297
|
-
else
|
|
298
|
-
console.error('
|
|
303
|
+
else {
|
|
304
|
+
console.error('AgentGuard evidence upload: missing credentials. Run fullcourtdefense login or pass FULLCOURTDEFENSE_API_KEY.');
|
|
305
|
+
if (args.requireUpload === 'true')
|
|
306
|
+
process.exit(1);
|
|
299
307
|
}
|
|
300
308
|
}
|
|
301
309
|
if (failed)
|
package/dist/index.js
CHANGED
|
@@ -264,6 +264,7 @@ function printHelp() {
|
|
|
264
264
|
--fail-on <severity> agent-ci fail threshold: critical, high, medium, low
|
|
265
265
|
--require-gateway agent-ci requires risky MCP servers to use FCD gateway
|
|
266
266
|
--require-approval-for agent-ci risky controls list, e.g. payment,delete,shell,secrets
|
|
267
|
+
--require-upload agent-ci fails if evidence cannot upload to AgentGuard UI
|
|
267
268
|
--method <GET|POST> Local endpoint method
|
|
268
269
|
--request-format <fmt> Local endpoint request format: custom or openai
|
|
269
270
|
--auth-type <type> none, bearer, basic, api-key
|
|
@@ -502,6 +503,7 @@ async function main() {
|
|
|
502
503
|
failOn: flags['fail-on'],
|
|
503
504
|
format: flags.format,
|
|
504
505
|
upload: flags.upload,
|
|
506
|
+
requireUpload: flags['require-upload'],
|
|
505
507
|
requireGateway: flags['require-gateway'],
|
|
506
508
|
requireApprovalFor: flags['require-approval-for'],
|
|
507
509
|
extraPath: flags.path,
|
package/dist/version.json
CHANGED