agentaudit 3.9.12 โ 3.9.14
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 +37 -8
- package/cli.mjs +30 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
+
<img src="https://www.agentaudit.dev/banner-chameleon.png" alt="AgentAudit -- Security scanner for AI packages" width="100%">
|
|
4
|
+
|
|
5
|
+
<br>
|
|
6
|
+
|
|
3
7
|
# ๐ก๏ธ AgentAudit
|
|
4
8
|
|
|
5
9
|
**Security scanner for AI packages โ MCP server + CLI**
|
|
@@ -7,6 +11,7 @@
|
|
|
7
11
|
Scan MCP servers, AI skills, and packages for vulnerabilities, prompt injection,
|
|
8
12
|
and supply chain attacks. Powered by regex static analysis and deep LLM audits.
|
|
9
13
|
|
|
14
|
+
[](https://www.agentaudit.dev/skills/agentaudit-mcp)
|
|
10
15
|
[](https://www.npmjs.com/package/agentaudit)
|
|
11
16
|
[](https://agentaudit.dev)
|
|
12
17
|
[](LICENSE)
|
|
@@ -454,10 +459,32 @@ Or use without installing: `npx agentaudit`
|
|
|
454
459
|
### Do I need an API key?
|
|
455
460
|
|
|
456
461
|
- **Quick scan** (`scan`): No API key needed โ runs locally with regex
|
|
457
|
-
- **Deep audit** (`audit`): Needs
|
|
462
|
+
- **Deep audit** (`audit`): Needs an LLM API key (see below)
|
|
458
463
|
- **Registry lookup** (`lookup`): No key needed for reading; key needed for uploading reports
|
|
459
464
|
- **MCP server**: No extra key needed โ uses the host editor's LLM
|
|
460
465
|
|
|
466
|
+
### Setting up your LLM key for deep audits
|
|
467
|
+
|
|
468
|
+
The `audit` command supports **Anthropic (Claude)** and **OpenAI (GPT-4o)**. Set one of these environment variables:
|
|
469
|
+
|
|
470
|
+
```bash
|
|
471
|
+
# Linux / macOS
|
|
472
|
+
export ANTHROPIC_API_KEY=sk-ant-... # Recommended
|
|
473
|
+
export OPENAI_API_KEY=sk-... # Alternative
|
|
474
|
+
|
|
475
|
+
# Windows (PowerShell)
|
|
476
|
+
$env:ANTHROPIC_API_KEY = "sk-ant-..."
|
|
477
|
+
$env:OPENAI_API_KEY = "sk-..."
|
|
478
|
+
|
|
479
|
+
# Windows (CMD)
|
|
480
|
+
set ANTHROPIC_API_KEY=sk-ant-...
|
|
481
|
+
set OPENAI_API_KEY=sk-...
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
**Priority:** If both are set, Anthropic is used. The active provider is shown during the audit.
|
|
485
|
+
|
|
486
|
+
**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.
|
|
487
|
+
|
|
461
488
|
### What data is sent externally?
|
|
462
489
|
|
|
463
490
|
- **Registry lookups**: Package name/slug is sent to `agentaudit.dev` to check for existing audits
|
|
@@ -479,13 +506,15 @@ It checks standard config file locations for Claude Desktop, Cursor, VS Code, an
|
|
|
479
506
|
|
|
480
507
|
---
|
|
481
508
|
|
|
482
|
-
## ๐ Related
|
|
509
|
+
## ๐ Related
|
|
483
510
|
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
511
|
+
| | Project | Description |
|
|
512
|
+
|---|---------|-------------|
|
|
513
|
+
| ๐ | [agentaudit.dev](https://agentaudit.dev) | Trust Registry -- browse packages, findings, leaderboard |
|
|
514
|
+
| ๐ก๏ธ | [agentaudit-skill](https://github.com/starbuck100/agentaudit-skill) | Agent Skill -- pre-install security gate for Claude Code, Cursor, Windsurf |
|
|
515
|
+
| โก | [agentaudit-github-action](https://github.com/ecap0-ai/agentaudit-github-action) | GitHub Action -- CI/CD security scanning |
|
|
516
|
+
| ๐ | [agentaudit-mcp](https://github.com/ecap0-ai/agentaudit-mcp) | This repo -- CLI + MCP server source |
|
|
517
|
+
| ๐ | [Report Issues](https://github.com/ecap0-ai/agentaudit-mcp/issues) | Bug reports and feature requests |
|
|
489
518
|
|
|
490
519
|
---
|
|
491
520
|
|
|
@@ -499,6 +528,6 @@ It checks standard config file locations for Claude Desktop, Cursor, VS Code, an
|
|
|
499
528
|
|
|
500
529
|
**Protect your AI stack. Scan before you trust.**
|
|
501
530
|
|
|
502
|
-
[Trust Registry](https://agentaudit.dev) ยท [Leaderboard](https://agentaudit.dev/leaderboard) ยท [Report Issues](https://github.com/
|
|
531
|
+
[Trust Registry](https://agentaudit.dev) ยท [Leaderboard](https://agentaudit.dev/leaderboard) ยท [Report Issues](https://github.com/ecap0-ai/agentaudit-mcp/issues)
|
|
503
532
|
|
|
504
533
|
</div>
|
package/cli.mjs
CHANGED
|
@@ -1543,11 +1543,37 @@ async function checkPackage(name) {
|
|
|
1543
1543
|
|
|
1544
1544
|
if (!jsonMode) {
|
|
1545
1545
|
const riskScore = data.risk_score ?? data.latest_risk_score ?? 0;
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1546
|
+
const trustScore = data.trust_score ?? (100 - riskScore);
|
|
1547
|
+
const totalFindings = data.total_findings ?? 0;
|
|
1548
|
+
const totalReports = data.total_reports ?? 0;
|
|
1549
|
+
|
|
1550
|
+
// Package name + verdict
|
|
1551
|
+
console.log(` ${c.bold}${data.display_name || name}${c.reset} ${riskBadge(riskScore)}`);
|
|
1552
|
+
if (data.description) console.log(` ${c.dim}${data.description}${c.reset}`);
|
|
1553
|
+
console.log();
|
|
1554
|
+
|
|
1555
|
+
// Trust Score (the main metric)
|
|
1556
|
+
const trustColor = trustScore >= 70 ? c.green : trustScore >= 40 ? c.yellow : c.red;
|
|
1557
|
+
const trustLabel = trustScore >= 70 ? 'SAFE' : trustScore >= 40 ? 'CAUTION' : 'UNSAFE';
|
|
1558
|
+
console.log(` ${trustColor}${c.bold}${trustLabel}${c.reset} ${trustColor}Trust Score: ${trustScore}/100${c.reset} ${c.dim}(Risk: ${riskScore}/100)${c.reset}`);
|
|
1559
|
+
|
|
1560
|
+
// Findings summary
|
|
1561
|
+
if (totalFindings > 0) {
|
|
1562
|
+
const maxSev = data.latest_max_severity;
|
|
1563
|
+
const sevStr = maxSev ? `max severity: ${severityColor(maxSev)}${maxSev}${c.reset}` : '';
|
|
1564
|
+
console.log(` ${c.dim}Findings: ${totalFindings}${sevStr ? ` (${sevStr}${c.dim})` : ''}${c.reset}`);
|
|
1565
|
+
} else {
|
|
1566
|
+
console.log(` ${c.dim}Findings: 0 (clean)${c.reset}`);
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
// Audit info
|
|
1570
|
+
console.log(` ${c.dim}Reports: ${totalReports} | Last audited: ${data.last_audited_at ? new Date(data.last_audited_at).toLocaleDateString() : 'unknown'}${c.reset}`);
|
|
1550
1571
|
if (data.has_official_audit) console.log(` ${c.green}โ Officially audited${c.reset}`);
|
|
1572
|
+
|
|
1573
|
+
// Links
|
|
1574
|
+
console.log();
|
|
1575
|
+
if (data.source_url) console.log(` ${c.dim}Source: ${data.source_url}${c.reset}`);
|
|
1576
|
+
console.log(` ${c.dim}Registry: ${REGISTRY_URL}/skills/${encodeURIComponent(name)}${c.reset}`);
|
|
1551
1577
|
console.log();
|
|
1552
1578
|
}
|
|
1553
1579
|
return data;
|