agentaudit 3.10.2 → 3.10.4

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.
Files changed (3) hide show
  1. package/README.md +99 -54
  2. package/cli.mjs +1151 -14
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -30,6 +30,7 @@ and supply chain attacks. Powered by regex static analysis and deep LLM audits.
30
30
  - [What It Detects](#-what-it-detects)
31
31
  - [How the 3-Pass Audit Works](#-how-the-3-pass-audit-works)
32
32
  - [CI/CD Integration](#-cicd-integration)
33
+ - [Dashboard & Community](#-dashboard--community)
33
34
  - [Configuration](#-configuration)
34
35
  - [Requirements](#-requirements)
35
36
  - [FAQ](#-faq)
@@ -76,8 +77,7 @@ agentaudit lookup fastmcp
76
77
 
77
78
  **Example output:**
78
79
  ```
79
- AgentAudit v3.9.8
80
- Security scanner for AI packages
80
+ AgentAudit v3.10.4 │ my-scanner #3 · 280pts · 19 audits
81
81
 
82
82
  Discovering MCP servers in your AI editors...
83
83
 
@@ -93,6 +93,8 @@ agentaudit lookup fastmcp
93
93
  Looking for general package scanning? Try `pip audit` or `npm audit`.
94
94
  ```
95
95
 
96
+ > **Enhanced banner:** When logged in, the banner shows your agent name, rank, points, and audit count. Run `agentaudit setup` to create an account.
97
+
96
98
  ### Option B: MCP Server in your AI editor
97
99
 
98
100
  Add AgentAudit as an MCP server — your AI agent can then discover, scan, and audit packages using its own LLM. **No extra API key needed.**
@@ -197,6 +199,8 @@ Then ask your agent: *"Check which MCP servers I have installed and audit any un
197
199
 
198
200
  ## 📋 Commands Reference
199
201
 
202
+ ### Scan & Audit
203
+
200
204
  | Command | Description | Example |
201
205
  |---------|-------------|---------|
202
206
  | `agentaudit` | Discover MCP servers (default, same as `discover`) | `agentaudit` |
@@ -207,18 +211,36 @@ Then ask your agent: *"Check which MCP servers I have installed and audit any un
207
211
  | `agentaudit scan <url> --deep` | Deep audit (same as `audit`) | `agentaudit scan https://github.com/owner/repo --deep` |
208
212
  | `agentaudit audit <url>` | Deep LLM-powered 3-pass audit (~30s) | `agentaudit audit https://github.com/owner/repo` |
209
213
  | `agentaudit lookup <name>` | Look up package in trust registry | `agentaudit lookup fastmcp` |
210
- | `agentaudit check <name\|url>` | Lookup + auto-audit if not found | `agentaudit check https://github.com/owner/repo` |
211
- | `agentaudit status` | Check API keys + active LLM provider | `agentaudit status` |
212
- | `agentaudit setup` | Register agent + configure API key | `agentaudit setup` |
214
+
215
+ ### Community
216
+
217
+ | Command | Alias | Description |
218
+ |---------|-------|-------------|
219
+ | `agentaudit dashboard` | `dash` | Interactive full-screen TUI with 5 tabs (Overview, Leaderboard, Benchmark, Activity, Search) |
220
+ | `agentaudit leaderboard` | `lb` | Top contributors ranking (pipe-friendly) |
221
+ | `agentaudit benchmark` | `bench` | LLM model audit performance comparison |
222
+ | `agentaudit activity` | `my` | Your recent audits & findings |
223
+ | `agentaudit search <query>` | `find` | Search packages in the registry by name, ASF-ID, or hash |
224
+
225
+ ### Configuration
226
+
227
+ | Command | Alias | Description |
228
+ |---------|-------|-------------|
229
+ | `agentaudit model` | — | Interactive LLM provider + model configuration |
230
+ | `agentaudit setup` | — | Register agent + configure API key for registry uploads |
231
+ | `agentaudit status` | `whoami` | Show current config, API keys, and personal stats |
213
232
 
214
233
  ### Global Flags
215
234
 
216
235
  | Flag | Description |
217
236
  |------|-------------|
218
237
  | `--json` | Output machine-readable JSON to stdout |
219
- | `--quiet` / `-q` | Suppress banner and decorative output (show findings only) |
238
+ | `--quiet` / `-q` | Suppress banner and decorative output |
220
239
  | `--no-color` | Disable ANSI colors (also respects `NO_COLOR` env var) |
221
- | `--provider <name>` | Force LLM provider (`anthropic`, `openai`, `openrouter`, `ollama`, `custom`) |
240
+ | `--model <name>` | Override LLM model for this run |
241
+ | `--no-upload` | Skip uploading report to registry |
242
+ | `--export` | Export audit payload as markdown |
243
+ | `--debug` | Show raw LLM response on parse errors |
222
244
  | `--help` / `-h` | Show help text |
223
245
  | `-v` / `--version` | Show version |
224
246
 
@@ -418,6 +440,41 @@ agentaudit lookup fastmcp --json
418
440
 
419
441
  ---
420
442
 
443
+ ## 📊 Dashboard & Community
444
+
445
+ AgentAudit includes a full-screen interactive dashboard and standalone community commands.
446
+
447
+ ### Interactive Dashboard
448
+
449
+ ```bash
450
+ agentaudit dashboard # or: agentaudit dash
451
+ ```
452
+
453
+ 5-tab TUI with keyboard navigation (←→ tabs, ↑↓ scroll, 1-5 jump, q quit):
454
+
455
+ | Tab | Content |
456
+ |-----|---------|
457
+ | **[1] Overview** | Your profile (rank, points, audits, severity breakdown) + registry stats |
458
+ | **[2] Leaderboard** | Top contributors with medal rankings and bar charts |
459
+ | **[3] Benchmark** | LLM model audit performance comparison |
460
+ | **[4] Activity** | Your recent audits and findings |
461
+ | **[5] Search** | Interactive package search (type to search, Enter to submit) |
462
+
463
+ ### Standalone Commands
464
+
465
+ All community commands work without the dashboard (pipe-friendly, supports `--json`):
466
+
467
+ ```bash
468
+ agentaudit leaderboard # Top contributors
469
+ agentaudit leaderboard --tab monthly --json # Monthly rankings as JSON
470
+ agentaudit benchmark # Model comparison
471
+ agentaudit activity # Your recent audits & findings
472
+ agentaudit search fastmcp # Search registry by name/ASF-ID
473
+ agentaudit search fastmcp --json # Machine-readable search results
474
+ ```
475
+
476
+ ---
477
+
421
478
  ## ⚙️ Configuration
422
479
 
423
480
  ### Credentials
@@ -430,23 +487,34 @@ Run `agentaudit setup` to configure interactively, or set via environment:
430
487
  export AGENTAUDIT_API_KEY=asf_your_key_here
431
488
  ```
432
489
 
433
- ### Environment Variables
490
+ ### LLM Providers (13 supported)
491
+
492
+ AgentAudit supports 13 LLM providers for deep audits. Set one API key — the CLI auto-detects it. Use `agentaudit model` to choose provider + model interactively, or `agentaudit status` to check your setup.
493
+
494
+ | Variable | Provider | Default Model |
495
+ |----------|----------|---------------|
496
+ | `ANTHROPIC_API_KEY` | Anthropic (Claude) | `claude-sonnet-4-20250514` |
497
+ | `GEMINI_API_KEY` | Google (Gemini) | `gemini-2.5-flash` |
498
+ | `OPENAI_API_KEY` | OpenAI (GPT-4o) | `gpt-4o` |
499
+ | `DEEPSEEK_API_KEY` | DeepSeek | `deepseek-chat` |
500
+ | `MISTRAL_API_KEY` | Mistral | `mistral-large-latest` |
501
+ | `GROQ_API_KEY` | Groq | `llama-3.3-70b-versatile` |
502
+ | `XAI_API_KEY` | xAI (Grok) | `grok-3` |
503
+ | `TOGETHER_API_KEY` | Together AI | `Llama-3.3-70B-Instruct-Turbo` |
504
+ | `FIREWORKS_API_KEY` | Fireworks AI | `llama-v3p3-70b-instruct` |
505
+ | `CEREBRAS_API_KEY` | Cerebras | `llama-3.3-70b` |
506
+ | `ZAI_API_KEY` | Zhipu AI (GLM) | `glm-4.7` |
507
+ | `OPENROUTER_API_KEY` | OpenRouter | `anthropic/claude-sonnet-4` |
508
+
509
+ ### Other Environment Variables
434
510
 
435
511
  | Variable | Description |
436
512
  |----------|-------------|
437
- | `AGENTAUDIT_API_KEY` | API key for registry access |
438
- | `ANTHROPIC_API_KEY` | Anthropic API key for deep audits (Claude) -- recommended |
439
- | `OPENAI_API_KEY` | OpenAI API key for deep audits (GPT-4o) |
440
- | `OPENROUTER_API_KEY` | OpenRouter API key (access 200+ models) |
441
- | `OPENROUTER_MODEL` | Model to use via OpenRouter (default: `anthropic/claude-sonnet-4`) |
442
- | `OLLAMA_MODEL` | Ollama model name for local audits (e.g. `llama3.1`, `qwen2.5-coder`) |
443
- | `OLLAMA_HOST` | Ollama server URL (default: `http://localhost:11434`) |
444
- | `LLM_API_URL` | Any OpenAI-compatible API endpoint (e.g. LM Studio, vLLM, Together, Groq) |
445
- | `LLM_API_KEY` | API key for custom endpoint (optional if no auth needed) |
446
- | `LLM_MODEL` | Model name for custom endpoint |
513
+ | `AGENTAUDIT_API_KEY` | API key for registry uploads (or use `agentaudit setup`) |
514
+ | `AGENTAUDIT_MODEL` | Override LLM model (same as `--model` flag) |
447
515
  | `NO_COLOR` | Disable ANSI colors ([no-color.org](https://no-color.org)) |
448
516
 
449
- > **Provider priority:** Anthropic > OpenAI > OpenRouter > Custom > Ollama. Override with `--provider=ollama` etc.
517
+ > **Provider priority:** Set `preferred_provider` via `agentaudit model`, or the CLI picks the first available key. Override per-run with `--model <name>`.
450
518
 
451
519
  ---
452
520
 
@@ -477,49 +545,26 @@ Or use without installing: `npx agentaudit`
477
545
 
478
546
  ### Setting up your LLM key for deep audits
479
547
 
480
- The `audit` command supports **any LLM provider**. Set one of these environment variables:
481
-
482
- ```bash
483
- # Linux / macOS
484
- export ANTHROPIC_API_KEY=sk-ant-... # Recommended (Claude Sonnet)
485
- export OPENAI_API_KEY=sk-... # Alternative (GPT-4o)
486
- export OPENROUTER_API_KEY=sk-or-... # 200+ models via OpenRouter
487
-
488
- # Windows (PowerShell)
489
- $env:ANTHROPIC_API_KEY = "sk-ant-..."
490
- $env:OPENAI_API_KEY = "sk-..."
491
- $env:OPENROUTER_API_KEY = "sk-or-..."
492
-
493
- # Windows (CMD)
494
- set ANTHROPIC_API_KEY=sk-ant-...
495
- set OPENAI_API_KEY=sk-...
496
- set OPENROUTER_API_KEY=sk-or-...
497
- ```
498
-
499
- **Provider priority:** Anthropic > OpenAI > OpenRouter > Custom > Ollama. Override with `--provider=<name>`.
500
-
501
- **OpenRouter model selection:** By default uses `anthropic/claude-sonnet-4`. Override with:
502
- ```bash
503
- export OPENROUTER_MODEL=google/gemini-2.5-pro # or any model on openrouter.ai
504
- ```
548
+ The `audit` command supports **13 LLM providers**. Set one API key and AgentAudit auto-detects it:
505
549
 
506
- **Local with Ollama (free, no API key):**
507
550
  ```bash
508
- export OLLAMA_MODEL=llama3.1 # or qwen2.5-coder, deepseek-r1, etc.
509
- agentaudit audit https://github.com/owner/repo
551
+ # Set any one of these (Anthropic recommended)
552
+ export ANTHROPIC_API_KEY=sk-ant-...
553
+ export OPENAI_API_KEY=sk-...
554
+ export GEMINI_API_KEY=...
555
+ export DEEPSEEK_API_KEY=...
556
+ # ... or any of the 13 supported providers (see Configuration section)
510
557
  ```
511
- > Note: Local models produce lower quality audits than Claude/GPT-4o. Use for quick checks, not production security audits.
512
558
 
513
- **Any OpenAI-compatible API:**
559
+ **Interactive setup:**
514
560
  ```bash
515
- export LLM_API_URL=http://localhost:1234/v1 # LM Studio, vLLM, etc.
516
- export LLM_MODEL=my-model
517
- agentaudit audit https://github.com/owner/repo
561
+ agentaudit model # 2-step menu: pick provider → pick model
562
+ agentaudit status # check which keys are set + current config
518
563
  ```
519
564
 
520
- **Check your setup:**
565
+ **Override per-run:**
521
566
  ```bash
522
- agentaudit status # validates all configured API keys
567
+ agentaudit audit https://github.com/owner/repo --model gpt-4o
523
568
  ```
524
569
 
525
570
  **Troubleshooting:** If you see `API error: Incorrect API key`, double-check your key is valid and has credits. Use `--debug` to see the full API response.