agentaudit 3.12.7 → 3.12.9
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/README.md +9 -9
- package/cli.mjs +35 -17
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
Scan MCP servers, AI skills, and packages for vulnerabilities, prompt injection,
|
|
12
12
|
and supply chain attacks. Powered by regex static analysis and deep LLM audits.
|
|
13
13
|
|
|
14
|
-
[](https://www.agentaudit.dev/
|
|
14
|
+
[](https://www.agentaudit.dev/packages/agentaudit-mcp)
|
|
15
15
|
[](https://www.npmjs.com/package/agentaudit)
|
|
16
16
|
[](https://agentaudit.dev)
|
|
17
17
|
[](LICENSE)
|
|
@@ -77,7 +77,7 @@ agentaudit lookup fastmcp
|
|
|
77
77
|
|
|
78
78
|
**Example output:**
|
|
79
79
|
```
|
|
80
|
-
⛨ AgentAudit v3.
|
|
80
|
+
⛨ AgentAudit v3.12.9 │ my-scanner #3 · 280pts · 19 audits
|
|
81
81
|
|
|
82
82
|
Discovering MCP servers in your AI editors...
|
|
83
83
|
|
|
@@ -227,7 +227,7 @@ Then ask your agent: *"Check which MCP servers I have installed and audit any un
|
|
|
227
227
|
| Command | Alias | Description |
|
|
228
228
|
|---------|-------|-------------|
|
|
229
229
|
| `agentaudit model` | — | Interactive LLM provider + model configuration |
|
|
230
|
-
| `agentaudit setup` |
|
|
230
|
+
| `agentaudit setup` | `login` | Sign in with GitHub OAuth or paste API key manually |
|
|
231
231
|
| `agentaudit status` | `whoami` | Show current config, API keys, and personal stats |
|
|
232
232
|
|
|
233
233
|
### Global Flags
|
|
@@ -481,7 +481,7 @@ agentaudit search fastmcp --json # Machine-readable search results
|
|
|
481
481
|
|
|
482
482
|
AgentAudit stores credentials in `~/.config/agentaudit/credentials.json` (or `$XDG_CONFIG_HOME/agentaudit/credentials.json`).
|
|
483
483
|
|
|
484
|
-
Run `agentaudit setup` to
|
|
484
|
+
Run `agentaudit setup` to sign in with GitHub or paste an API key, or set via environment:
|
|
485
485
|
|
|
486
486
|
```bash
|
|
487
487
|
export AGENTAUDIT_API_KEY=asf_your_key_here
|
|
@@ -595,10 +595,10 @@ It checks standard config file locations for Claude Desktop, Cursor, VS Code, an
|
|
|
595
595
|
| | Project | Description |
|
|
596
596
|
|---|---------|-------------|
|
|
597
597
|
| 🌐 | [agentaudit.dev](https://agentaudit.dev) | Trust Registry -- browse packages, findings, leaderboard |
|
|
598
|
-
| 🛡️ | [agentaudit-skill](https://github.com/
|
|
599
|
-
| ⚡ | [agentaudit-github-action](https://github.com/
|
|
600
|
-
| 📚 | [agentaudit-
|
|
601
|
-
| 🐛 | [Report Issues](https://github.com/
|
|
598
|
+
| 🛡️ | [agentaudit-skill](https://github.com/agentaudit-dev/agentaudit-skill) | Agent Skill -- pre-install security gate for Claude Code, Cursor, Windsurf |
|
|
599
|
+
| ⚡ | [agentaudit-github-action](https://github.com/agentaudit-dev/agentaudit-github-action) | GitHub Action -- CI/CD security scanning |
|
|
600
|
+
| 📚 | [agentaudit-cli](https://github.com/agentaudit-dev/agentaudit-cli) | This repo -- CLI + MCP server source |
|
|
601
|
+
| 🐛 | [Report Issues](https://github.com/agentaudit-dev/agentaudit-cli/issues) | Bug reports and feature requests |
|
|
602
602
|
|
|
603
603
|
---
|
|
604
604
|
|
|
@@ -612,6 +612,6 @@ It checks standard config file locations for Claude Desktop, Cursor, VS Code, an
|
|
|
612
612
|
|
|
613
613
|
**Protect your AI stack. Scan before you trust.**
|
|
614
614
|
|
|
615
|
-
[Trust Registry](https://agentaudit.dev) · [Leaderboard](https://agentaudit.dev/leaderboard) · [Report Issues](https://github.com/
|
|
615
|
+
[Trust Registry](https://agentaudit.dev) · [Leaderboard](https://agentaudit.dev/leaderboard) · [Report Issues](https://github.com/agentaudit-dev/agentaudit-cli/issues)
|
|
616
616
|
|
|
617
617
|
</div>
|
package/cli.mjs
CHANGED
|
@@ -516,12 +516,12 @@ async function validateApiKey(apiKey) {
|
|
|
516
516
|
|
|
517
517
|
async function setupCommand() {
|
|
518
518
|
console.log(` ${c.bold}AgentAudit Setup${c.reset}`);
|
|
519
|
-
console.log(` ${c.dim}
|
|
519
|
+
console.log(` ${c.dim}Sign in to upload audit reports to agentaudit.dev${c.reset}`);
|
|
520
520
|
console.log();
|
|
521
521
|
|
|
522
522
|
const existing = loadCredentials();
|
|
523
523
|
if (existing) {
|
|
524
|
-
console.log(` ${icons.safe} Already
|
|
524
|
+
console.log(` ${icons.safe} Already logged in as ${c.bold}${existing.agent_name}${c.reset}`);
|
|
525
525
|
console.log(` ${c.dim}Key: ${existing.api_key.slice(0, 12)}...${c.reset}`);
|
|
526
526
|
console.log();
|
|
527
527
|
const answer = await askQuestion(` Reconfigure? ${c.dim}(y/N)${c.reset} `);
|
|
@@ -532,6 +532,25 @@ async function setupCommand() {
|
|
|
532
532
|
console.log();
|
|
533
533
|
}
|
|
534
534
|
|
|
535
|
+
// Offer choice: GitHub OAuth (recommended) or manual API key
|
|
536
|
+
console.log(` ${c.bold}How do you want to sign in?${c.reset}`);
|
|
537
|
+
console.log();
|
|
538
|
+
console.log(` ${c.cyan}1${c.reset} Sign in with GitHub ${c.dim}(recommended — opens browser)${c.reset}`);
|
|
539
|
+
console.log(` ${c.cyan}2${c.reset} Paste an API key manually ${c.dim}(from ${REGISTRY_URL}/profile)${c.reset}`);
|
|
540
|
+
console.log();
|
|
541
|
+
const choice = await askQuestion(` Choice ${c.dim}(1/2, default: 1):${c.reset} `);
|
|
542
|
+
console.log();
|
|
543
|
+
|
|
544
|
+
if (choice.trim() === '2') {
|
|
545
|
+
// ── Manual API key flow ──
|
|
546
|
+
await setupManualKey();
|
|
547
|
+
} else {
|
|
548
|
+
// ── GitHub OAuth Device Flow (default) ──
|
|
549
|
+
await loginCommand();
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
async function setupManualKey() {
|
|
535
554
|
console.log(` ${c.bold}Step 1:${c.reset} Create an API key at ${c.cyan}${REGISTRY_URL}/profile${c.reset}`);
|
|
536
555
|
console.log(` ${c.dim}Sign in with GitHub, then click "Create API Key".${c.reset}`);
|
|
537
556
|
console.log();
|
|
@@ -556,6 +575,10 @@ async function setupCommand() {
|
|
|
556
575
|
return;
|
|
557
576
|
}
|
|
558
577
|
|
|
578
|
+
setupReadyMessage();
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
function setupReadyMessage() {
|
|
559
582
|
console.log();
|
|
560
583
|
|
|
561
584
|
// ── LLM configuration hint ──
|
|
@@ -633,9 +656,14 @@ async function loginCommand() {
|
|
|
633
656
|
|
|
634
657
|
// Try to auto-open browser
|
|
635
658
|
try {
|
|
636
|
-
const openCmd = process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'start' : 'xdg-open';
|
|
637
659
|
const { exec } = await import('child_process');
|
|
638
|
-
|
|
660
|
+
if (process.platform === 'darwin') {
|
|
661
|
+
exec(`open "${verifyUrl}"`);
|
|
662
|
+
} else if (process.platform === 'win32') {
|
|
663
|
+
exec(`start "" "${verifyUrl}"`);
|
|
664
|
+
} else {
|
|
665
|
+
exec(`xdg-open "${verifyUrl}"`);
|
|
666
|
+
}
|
|
639
667
|
console.log(` ${c.dim}(Browser should open automatically)${c.reset}`);
|
|
640
668
|
} catch {}
|
|
641
669
|
|
|
@@ -658,14 +686,9 @@ async function loginCommand() {
|
|
|
658
686
|
if (res.ok && data.api_key) {
|
|
659
687
|
// Success!
|
|
660
688
|
saveCredentials({ api_key: data.api_key, agent_name: data.agent_name });
|
|
661
|
-
console.log(
|
|
689
|
+
console.log(`\r ${c.green}${icons.safe} Logged in as ${c.bold}${data.agent_name}${c.reset} `);
|
|
662
690
|
console.log(` ${c.dim}Key saved to: ${USER_CRED_FILE}${c.reset}`);
|
|
663
|
-
|
|
664
|
-
console.log(` ${c.bold}Ready!${c.reset} You can now:`);
|
|
665
|
-
console.log(` ${c.dim}•${c.reset} Audit packages: ${c.cyan}agentaudit audit <repo-url>${c.reset}`);
|
|
666
|
-
console.log(` ${c.dim}•${c.reset} Quick scan: ${c.cyan}agentaudit scan <repo-url>${c.reset}`);
|
|
667
|
-
console.log(` ${c.dim}•${c.reset} Check registry: ${c.cyan}agentaudit check <name>${c.reset}`);
|
|
668
|
-
console.log();
|
|
691
|
+
setupReadyMessage();
|
|
669
692
|
return;
|
|
670
693
|
}
|
|
671
694
|
|
|
@@ -4734,16 +4757,11 @@ async function main() {
|
|
|
4734
4757
|
|
|
4735
4758
|
banner();
|
|
4736
4759
|
|
|
4737
|
-
if (command === 'setup') {
|
|
4760
|
+
if (command === 'setup' || command === 'login') {
|
|
4738
4761
|
await setupCommand();
|
|
4739
4762
|
return;
|
|
4740
4763
|
}
|
|
4741
4764
|
|
|
4742
|
-
if (command === 'login') {
|
|
4743
|
-
await loginCommand();
|
|
4744
|
-
return;
|
|
4745
|
-
}
|
|
4746
|
-
|
|
4747
4765
|
if (command === 'status' || command === 'whoami') {
|
|
4748
4766
|
// ── Status / diagnostic overview ──
|
|
4749
4767
|
const config = loadLlmConfig();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentaudit",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.9",
|
|
4
4
|
"description": "Security scanner for AI packages — MCP server + CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"license": "AGPL-3.0",
|
|
40
40
|
"repository": {
|
|
41
41
|
"type": "git",
|
|
42
|
-
"url": "git+https://github.com/agentaudit-dev/agentaudit-
|
|
42
|
+
"url": "git+https://github.com/agentaudit-dev/agentaudit-cli.git"
|
|
43
43
|
},
|
|
44
44
|
"homepage": "https://agentaudit.dev",
|
|
45
45
|
"engines": {
|