agent-security-scanner-mcp 4.1.1 → 4.2.0
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 +196 -0
- package/compliance/gdpr-technical-controls.json +112 -0
- package/compliance/soc2-technical-controls.json +148 -0
- package/index.js +9 -1
- package/package.json +1 -1
- package/src/lib/compliance-controls.js +100 -21
- package/src/lib/compliance-evaluator.js +150 -9
- package/src/lib/compliance-evidence.js +321 -0
- package/src/tools/compliance-controls.js +22 -12
- package/src/tools/evaluate-compliance.js +161 -0
package/README.md
CHANGED
|
@@ -63,6 +63,8 @@ Continue reading below for full version documentation →
|
|
|
63
63
|
|
|
64
64
|
---
|
|
65
65
|
|
|
66
|
+
> **New in v4.2.0:** Compliance evidence collection — evaluate projects against SOC2-Technical (8 controls) and GDPR-Technical (6 controls) frameworks. Collects evidence from code scans, SBOM, vulnerability checks, and hallucination detection, then evaluates controls with pass/partial/fail/not_evaluated status. Supports evidence persistence for audit trails. [See Compliance Evaluation](#-compliance-evaluation-new-in-v420).
|
|
67
|
+
>
|
|
66
68
|
> **New in v4.1.0:** SBOM generation and dependency vulnerability analysis — generates CycloneDX v1.5 SBOMs, scans against OSV.dev for CVEs, detects hallucinated packages, compares baselines, and generates HTML audit reports. Supports 8 lock file formats and 7 manifest formats across npm, Python, Go, Rust, Ruby, and Java ecosystems. [See SBOM Tools](#-sbom--supply-chain-analysis-new-in-v410).
|
|
67
69
|
>
|
|
68
70
|
> **New in v4.0.0:** LLM-powered semantic code review agent with intent profiling — understands what your project is supposed to do and flags patterns that violate that intent. Same `eval()` call = safe in a build tool, dangerous in an e-commerce app. Supports Claude CLI (no API key needed!), Anthropic, and OpenAI. [See code-review-agent](#-llm-powered-code-review-agent-new-in-v400).
|
|
@@ -94,6 +96,8 @@ Continue reading below for full version documentation →
|
|
|
94
96
|
| `sbom_check_hallucinations` | Verify all SBOM packages exist in official registries | Before deploying, to catch AI-invented packages |
|
|
95
97
|
| `sbom_diff` | Compare current SBOM against baseline, detect added/removed/changed packages | In CI/CD to track dependency drift |
|
|
96
98
|
| `sbom_export_report` | Generate HTML or JSON audit report from SBOM with vulnerability data | For PCI-DSS compliance, security reviews |
|
|
99
|
+
| `get_compliance_controls` | Look up compliance controls with evaluation criteria (AIUC-1, SOC2, GDPR) | To understand compliance requirements |
|
|
100
|
+
| `evaluate_compliance` | Evaluate project against compliance frameworks with evidence collection | For SOC2/GDPR technical compliance audits |
|
|
97
101
|
|
|
98
102
|
## Quick Start
|
|
99
103
|
|
|
@@ -424,6 +428,177 @@ sbom-report <dir> [--format html|json] [--output <path>] [--no-vulnerabilities]
|
|
|
424
428
|
|
|
425
429
|
---
|
|
426
430
|
|
|
431
|
+
## 📋 Compliance Evaluation (New in v4.2.0)
|
|
432
|
+
|
|
433
|
+
Evaluate projects against technical compliance frameworks with automated evidence collection from code scans, SBOM, vulnerability checks, and hallucination detection.
|
|
434
|
+
|
|
435
|
+
### Quick Start
|
|
436
|
+
|
|
437
|
+
```bash
|
|
438
|
+
# Evaluate against SOC2 technical controls
|
|
439
|
+
npx agent-security-scanner-mcp evaluate-compliance . --framework soc2-technical
|
|
440
|
+
|
|
441
|
+
# Evaluate against GDPR technical controls
|
|
442
|
+
npx agent-security-scanner-mcp evaluate-compliance . --framework gdpr-technical
|
|
443
|
+
|
|
444
|
+
# Evaluate with evidence persistence (for audit trails)
|
|
445
|
+
npx agent-security-scanner-mcp evaluate-compliance . --framework soc2-technical --save-evidence
|
|
446
|
+
|
|
447
|
+
# List available compliance frameworks
|
|
448
|
+
npx agent-security-scanner-mcp get-compliance-controls --verbosity full
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### Supported Frameworks
|
|
452
|
+
|
|
453
|
+
| Framework | Controls | Focus Areas |
|
|
454
|
+
|-----------|----------|-------------|
|
|
455
|
+
| **AIUC-1** | 16 | AI agent security, prompt injection, hallucination |
|
|
456
|
+
| **SOC2-Technical** | 8 | Supply chain, code security, crypto, auth, drift |
|
|
457
|
+
| **GDPR-Technical** | 6 | Data privacy, encryption, third-party risks |
|
|
458
|
+
|
|
459
|
+
> **Note:** These are technical controls only. SOC2-Technical does not cover organizational, administrative, or physical SOC 2 controls. GDPR-Technical does not cover DPIAs, data subject rights, or processor contracts.
|
|
460
|
+
|
|
461
|
+
### SOC2-Technical Controls
|
|
462
|
+
|
|
463
|
+
| Control ID | Title | What It Checks |
|
|
464
|
+
|------------|-------|----------------|
|
|
465
|
+
| SOC2-T001 | Software dependency inventory exists | SBOM has ≥1 component |
|
|
466
|
+
| SOC2-T002 | No critical dependency vulnerabilities | OSV.dev scan for critical/high CVEs |
|
|
467
|
+
| SOC2-T003 | No hallucinated packages | Package registry verification |
|
|
468
|
+
| SOC2-T004 | No critical code security findings | Static analysis for injection, deserialization |
|
|
469
|
+
| SOC2-T005 | Data exfiltration/exposure below threshold | Exfiltration patterns, info-exposure scan |
|
|
470
|
+
| SOC2-T006 | Cryptographic controls adequate | Weak algorithms, hardcoded keys |
|
|
471
|
+
| SOC2-T007 | Authentication/authorization adequate | Auth bypass, permissions issues |
|
|
472
|
+
| SOC2-T008 | Dependency drift tracked | SBOM baseline comparison |
|
|
473
|
+
|
|
474
|
+
### GDPR-Technical Controls
|
|
475
|
+
|
|
476
|
+
| Control ID | Title | What It Checks |
|
|
477
|
+
|------------|-------|----------------|
|
|
478
|
+
| GDPR-T001 | Sensitive data exposure below threshold | PII patterns, secrets, logging |
|
|
479
|
+
| GDPR-T002 | Data exfiltration below threshold | External data transfer patterns |
|
|
480
|
+
| GDPR-T003 | Encryption/transport adequate | Weak crypto, plaintext transport |
|
|
481
|
+
| GDPR-T004 | Third-party dependency inventory | SBOM component count |
|
|
482
|
+
| GDPR-T005 | No critical third-party vulnerabilities | OSV.dev vulnerability scan |
|
|
483
|
+
| GDPR-T006 | No hallucinated packages | Registry verification |
|
|
484
|
+
|
|
485
|
+
### MCP Tools
|
|
486
|
+
|
|
487
|
+
#### `get_compliance_controls`
|
|
488
|
+
|
|
489
|
+
Look up compliance controls with evaluation criteria. Filter by framework, domain, or OWASP LLM tags.
|
|
490
|
+
|
|
491
|
+
```json
|
|
492
|
+
// Input
|
|
493
|
+
{ "framework": "soc2-technical", "domain": "supply-chain", "verbosity": "compact" }
|
|
494
|
+
|
|
495
|
+
// Output
|
|
496
|
+
{
|
|
497
|
+
"framework": "SOC2-Technical",
|
|
498
|
+
"controls_count": 4,
|
|
499
|
+
"controls": [
|
|
500
|
+
{
|
|
501
|
+
"id": "SOC2-T001",
|
|
502
|
+
"title": "Software dependency inventory exists",
|
|
503
|
+
"domain": "supply-chain",
|
|
504
|
+
"references": ["CC6.6", "CC7.1"],
|
|
505
|
+
"scanner_tools": ["sbom_generate"],
|
|
506
|
+
"evaluation": { "evidence_checks": [...] }
|
|
507
|
+
}
|
|
508
|
+
]
|
|
509
|
+
}
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
#### `evaluate_compliance`
|
|
513
|
+
|
|
514
|
+
Evaluate a project against compliance frameworks. Collects evidence from multiple sources, evaluates each control, and optionally saves timestamped evidence bundles.
|
|
515
|
+
|
|
516
|
+
```json
|
|
517
|
+
// Input
|
|
518
|
+
{
|
|
519
|
+
"directory_path": "./my-project",
|
|
520
|
+
"frameworks": ["soc2-technical", "gdpr-technical"],
|
|
521
|
+
"save_evidence": true,
|
|
522
|
+
"verbosity": "compact"
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
// Output
|
|
526
|
+
{
|
|
527
|
+
"directory": "./my-project",
|
|
528
|
+
"tools_run": ["scan_project", "scan_security", "sbom_generate", "sbom_scan_vulnerabilities", "sbom_check_hallucinations"],
|
|
529
|
+
"scan_summary": { "grade": "B", "by_severity": { "CRITICAL": 0, "HIGH": 2, "MEDIUM": 5 } },
|
|
530
|
+
"sbom_summary": { "component_count": 212, "ecosystems": ["npm", "pypi"] },
|
|
531
|
+
"supply_chain": {
|
|
532
|
+
"vulnerabilities": { "total": 3, "by_severity": { "critical": 0, "high": 1, "medium": 2 } },
|
|
533
|
+
"hallucinations": { "hallucinated_count": 0 },
|
|
534
|
+
"drift": { "baseline_exists": true, "added": 2, "removed": 0 }
|
|
535
|
+
},
|
|
536
|
+
"compliance": {
|
|
537
|
+
"soc2-technical": {
|
|
538
|
+
"pass": 6, "partial": 1, "fail": 0, "not_evaluated": 1,
|
|
539
|
+
"results": [
|
|
540
|
+
{ "control_id": "SOC2-T001", "status": "pass", "reasons": [] },
|
|
541
|
+
{ "control_id": "SOC2-T002", "status": "partial", "reasons": ["High-severity dependency vulnerabilities exceed threshold"] }
|
|
542
|
+
]
|
|
543
|
+
}
|
|
544
|
+
},
|
|
545
|
+
"evidence_saved": ".scanner/evidence/2026-04-02T05-30-00-soc2-technical.json"
|
|
546
|
+
}
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
### Evidence Collection
|
|
550
|
+
|
|
551
|
+
The `evaluate_compliance` tool collects evidence from multiple sources:
|
|
552
|
+
|
|
553
|
+
| Source | Tools Used | Evidence Collected |
|
|
554
|
+
|--------|------------|-------------------|
|
|
555
|
+
| Code Scan | `scan_project`, `scan_security` | Security grade, findings by severity/category |
|
|
556
|
+
| SBOM | `sbom_generate` | Component count, ecosystems, direct vs transitive |
|
|
557
|
+
| Vulnerabilities | `sbom_scan_vulnerabilities` | CVE counts by severity |
|
|
558
|
+
| Hallucinations | `sbom_check_hallucinations` | Hallucinated package count |
|
|
559
|
+
| Drift | `sbom_diff` | Added/removed/changed packages vs baseline |
|
|
560
|
+
|
|
561
|
+
### Evidence Persistence
|
|
562
|
+
|
|
563
|
+
When `save_evidence: true`, the tool saves timestamped JSON evidence bundles to `.scanner/evidence/`:
|
|
564
|
+
|
|
565
|
+
```
|
|
566
|
+
.scanner/evidence/
|
|
567
|
+
├── 2026-04-02T05-30-00-soc2-technical.json
|
|
568
|
+
├── 2026-04-02T05-35-00-gdpr-technical.json
|
|
569
|
+
└── ...
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
These bundles contain complete evidence data for audit trails and compliance documentation.
|
|
573
|
+
|
|
574
|
+
### Control Evaluation Logic
|
|
575
|
+
|
|
576
|
+
Controls use a path-based evidence check system with operators:
|
|
577
|
+
|
|
578
|
+
| Operator | Description | Example |
|
|
579
|
+
|----------|-------------|---------|
|
|
580
|
+
| `exists` | Path value is present and non-null | `sbom.component_count exists` |
|
|
581
|
+
| `eq` | Exact equality | `drift.baseline_exists eq true` |
|
|
582
|
+
| `lte` | Less than or equal | `vulnerabilities.critical lte 0` |
|
|
583
|
+
| `gte` | Greater than or equal | `sbom.component_count gte 1` |
|
|
584
|
+
|
|
585
|
+
**Three-tier null handling:**
|
|
586
|
+
1. **Explicit null** (e.g., OSV outage) → `not_evaluated` — source failure
|
|
587
|
+
2. **Missing top-level section** → `not_evaluated` — evidence never collected
|
|
588
|
+
3. **Missing leaf key** → use `default` value if specified (e.g., no crypto findings = 0)
|
|
589
|
+
|
|
590
|
+
### CLI Commands
|
|
591
|
+
|
|
592
|
+
```bash
|
|
593
|
+
# Evaluate compliance
|
|
594
|
+
evaluate-compliance <dir> [--framework <name>] [--save-evidence] [--verbosity minimal|compact|full]
|
|
595
|
+
|
|
596
|
+
# List controls
|
|
597
|
+
get-compliance-controls [--framework <name>] [--domain <name>] [--verbosity minimal|compact|full]
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
---
|
|
601
|
+
|
|
427
602
|
## Tool Reference
|
|
428
603
|
|
|
429
604
|
### `scan_security`
|
|
@@ -1421,6 +1596,27 @@ All MCP tools support a `verbosity` parameter to minimize context window consump
|
|
|
1421
1596
|
|
|
1422
1597
|
## Changelog
|
|
1423
1598
|
|
|
1599
|
+
### v4.2.0 (2026-04-02) - Compliance Evidence Collection
|
|
1600
|
+
|
|
1601
|
+
**🚀 New Feature: SOC2/GDPR Technical Compliance Evaluation**
|
|
1602
|
+
|
|
1603
|
+
- **2 New MCP Tools:** `evaluate_compliance`, `get_compliance_controls` (enhanced)
|
|
1604
|
+
- **SOC2-Technical Framework:** 8 controls covering dependency inventory, vulnerabilities, hallucinations, code findings, exfiltration, crypto, auth, drift
|
|
1605
|
+
- **GDPR-Technical Framework:** 6 controls covering data exposure, exfiltration, encryption, dependency inventory, vulnerabilities, hallucinations
|
|
1606
|
+
- **Multi-Framework Registry:** Generalized loader supporting per-framework domain validation
|
|
1607
|
+
- **Evidence Collection:** Automated evidence gathering from code scans, SBOM, OSV.dev, hallucination checks
|
|
1608
|
+
- **Evidence Persistence:** Timestamped JSON bundles saved to `.scanner/evidence/` for audit trails
|
|
1609
|
+
- **Generic evidence_checks Evaluator:** Path-based check system with `exists`/`eq`/`lte`/`gte` operators
|
|
1610
|
+
- **Three-Tier Null Handling:** Distinguishes source failures (null) from absent categories (undefined)
|
|
1611
|
+
- **48 New Tests:** Comprehensive coverage for multi-framework loading, evidence checks, SOC2/GDPR evaluation
|
|
1612
|
+
|
|
1613
|
+
**Design Notes:**
|
|
1614
|
+
- Technical controls only — does not claim full SOC 2 or GDPR compliance
|
|
1615
|
+
- Missing evidence → `not_evaluated`, not false pass (secure default)
|
|
1616
|
+
- AIUC-1 backward compatibility maintained (zero regression)
|
|
1617
|
+
|
|
1618
|
+
---
|
|
1619
|
+
|
|
1424
1620
|
### v4.1.0 (2026-03-27) - SBOM Generation & Vulnerability Analysis
|
|
1425
1621
|
|
|
1426
1622
|
**🚀 New Feature: Software Bill of Materials (SBOM)**
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": "1.1",
|
|
3
|
+
"framework": "GDPR-Technical",
|
|
4
|
+
"source": "GDPR Articles 25, 32 — technical measures subset",
|
|
5
|
+
"source_snapshot": "2026-03-31",
|
|
6
|
+
"source_note": "Technical controls only. This does not cover organizational measures, DPIAs, data subject rights, lawful basis, or processor contracts. Not a substitute for legal compliance assessment.",
|
|
7
|
+
"domains": ["privacy", "security", "supply-chain"],
|
|
8
|
+
"controls": [
|
|
9
|
+
{
|
|
10
|
+
"id": "GDPR-T001",
|
|
11
|
+
"title": "Sensitive data exposure findings below threshold",
|
|
12
|
+
"domain": "privacy",
|
|
13
|
+
"references": ["Art. 25(1)", "Art. 32(1)(b)"],
|
|
14
|
+
"scanner_tools": ["scan_security", "scan_project"],
|
|
15
|
+
"evidence_requirements": [
|
|
16
|
+
"Information exposure scan results (secrets, PII patterns, logging of sensitive data)",
|
|
17
|
+
"No critical sensitive data exposure findings"
|
|
18
|
+
],
|
|
19
|
+
"evaluation": {
|
|
20
|
+
"evidence_checks": [
|
|
21
|
+
{ "path": "scan.by_category_severity.info-exposure.CRITICAL", "operator": "lte", "value": 0, "on_fail": "fail", "reason": "Critical sensitive data exposure findings detected", "default": 0 },
|
|
22
|
+
{ "path": "scan.by_category_severity.info-exposure.HIGH", "operator": "lte", "value": 3, "on_fail": "partial", "reason": "High-severity data exposure findings exceed threshold", "default": 0 },
|
|
23
|
+
{ "path": "scan.by_category_severity.secrets.CRITICAL", "operator": "lte", "value": 0, "on_fail": "fail", "reason": "Critical hardcoded secrets detected", "default": 0 }
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "GDPR-T002",
|
|
29
|
+
"title": "Data exfiltration findings below threshold",
|
|
30
|
+
"domain": "privacy",
|
|
31
|
+
"references": ["Art. 32(1)(b)", "Art. 32(2)"],
|
|
32
|
+
"scanner_tools": ["scan_security", "scan_project"],
|
|
33
|
+
"evidence_requirements": [
|
|
34
|
+
"Exfiltration pattern detection results",
|
|
35
|
+
"No critical or high exfiltration findings"
|
|
36
|
+
],
|
|
37
|
+
"evaluation": {
|
|
38
|
+
"evidence_checks": [
|
|
39
|
+
{ "path": "scan.by_category_severity.exfiltration.CRITICAL", "operator": "lte", "value": 0, "on_fail": "fail", "reason": "Critical data exfiltration patterns detected", "default": 0 },
|
|
40
|
+
{ "path": "scan.by_category_severity.exfiltration.HIGH", "operator": "lte", "value": 0, "on_fail": "fail", "reason": "High-severity data exfiltration patterns detected", "default": 0 }
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "GDPR-T003",
|
|
46
|
+
"title": "Encryption and secure transport controls adequate",
|
|
47
|
+
"domain": "security",
|
|
48
|
+
"references": ["Art. 32(1)(a)"],
|
|
49
|
+
"scanner_tools": ["scan_security", "scan_project"],
|
|
50
|
+
"evidence_requirements": [
|
|
51
|
+
"Cryptographic findings scan (weak algorithms, missing encryption, plaintext transport)",
|
|
52
|
+
"No critical crypto findings"
|
|
53
|
+
],
|
|
54
|
+
"evaluation": {
|
|
55
|
+
"evidence_checks": [
|
|
56
|
+
{ "path": "scan.by_category_severity.crypto.CRITICAL", "operator": "lte", "value": 0, "on_fail": "fail", "reason": "Critical cryptographic findings (weak encryption, plaintext transport)", "default": 0 },
|
|
57
|
+
{ "path": "scan.by_category_severity.crypto.HIGH", "operator": "lte", "value": 2, "on_fail": "partial", "reason": "High-severity cryptographic findings exceed threshold", "default": 0 }
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": "GDPR-T004",
|
|
63
|
+
"title": "Third-party dependency inventory exists",
|
|
64
|
+
"domain": "supply-chain",
|
|
65
|
+
"references": ["Art. 28(1)", "Art. 32(1)(d)"],
|
|
66
|
+
"scanner_tools": ["sbom_generate"],
|
|
67
|
+
"evidence_requirements": [
|
|
68
|
+
"CycloneDX SBOM generated from project lockfiles",
|
|
69
|
+
"Inventory of all third-party components processing data"
|
|
70
|
+
],
|
|
71
|
+
"evaluation": {
|
|
72
|
+
"evidence_checks": [
|
|
73
|
+
{ "path": "sbom.component_count", "operator": "gte", "value": 1, "on_fail": "fail", "reason": "No third-party dependency inventory — SBOM generation found zero components" }
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "GDPR-T005",
|
|
79
|
+
"title": "No critical vulnerabilities in third-party dependencies",
|
|
80
|
+
"domain": "supply-chain",
|
|
81
|
+
"references": ["Art. 32(1)(b)", "Art. 32(1)(d)"],
|
|
82
|
+
"scanner_tools": ["sbom_generate", "sbom_scan_vulnerabilities"],
|
|
83
|
+
"evidence_requirements": [
|
|
84
|
+
"OSV vulnerability scan results for all SBOM components",
|
|
85
|
+
"Zero critical-severity known vulnerabilities in third-party code"
|
|
86
|
+
],
|
|
87
|
+
"evaluation": {
|
|
88
|
+
"evidence_checks": [
|
|
89
|
+
{ "path": "supply_chain.vulnerabilities.by_severity.critical", "operator": "lte", "value": 0, "on_fail": "fail", "reason": "Critical vulnerabilities in third-party dependencies", "default": 0 },
|
|
90
|
+
{ "path": "supply_chain.vulnerabilities.by_severity.high", "operator": "lte", "value": 5, "on_fail": "partial", "reason": "High-severity dependency vulnerabilities exceed threshold", "default": 0 }
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "GDPR-T006",
|
|
96
|
+
"title": "No hallucinated packages in dependency tree",
|
|
97
|
+
"domain": "supply-chain",
|
|
98
|
+
"references": ["Art. 32(1)(d)"],
|
|
99
|
+
"scanner_tools": ["sbom_generate", "sbom_check_hallucinations"],
|
|
100
|
+
"evidence_requirements": [
|
|
101
|
+
"Hallucination check results against official package registries",
|
|
102
|
+
"Zero phantom/hallucinated packages"
|
|
103
|
+
],
|
|
104
|
+
"evaluation": {
|
|
105
|
+
"evidence_checks": [
|
|
106
|
+
{ "path": "supply_chain.hallucinations.hallucinated_count", "operator": "eq", "value": 0, "on_fail": "fail", "reason": "Hallucinated (phantom) packages detected — supply chain integrity risk" },
|
|
107
|
+
{ "path": "supply_chain.hallucinations.legitimate_count", "operator": "gte", "value": 1, "on_fail": "not_evaluated", "not_evaluated_reason": "No packages could be verified — all ecosystems unsupported by hallucination checker", "default": 0 }
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": "1.1",
|
|
3
|
+
"framework": "SOC2-Technical",
|
|
4
|
+
"source": "AICPA Trust Services Criteria (2017) — technical controls subset",
|
|
5
|
+
"source_snapshot": "2026-03-31",
|
|
6
|
+
"source_note": "Technical controls only. This does not cover organizational, administrative, or physical SOC 2 controls. Not a substitute for a SOC 2 audit.",
|
|
7
|
+
"domains": ["security", "availability", "confidentiality", "supply-chain", "auth"],
|
|
8
|
+
"controls": [
|
|
9
|
+
{
|
|
10
|
+
"id": "SOC2-T001",
|
|
11
|
+
"title": "Software dependency inventory exists",
|
|
12
|
+
"domain": "supply-chain",
|
|
13
|
+
"references": ["CC6.6", "CC7.1"],
|
|
14
|
+
"scanner_tools": ["sbom_generate"],
|
|
15
|
+
"evidence_requirements": [
|
|
16
|
+
"CycloneDX SBOM generated from project lockfiles",
|
|
17
|
+
"Component count and ecosystem breakdown"
|
|
18
|
+
],
|
|
19
|
+
"evaluation": {
|
|
20
|
+
"evidence_checks": [
|
|
21
|
+
{ "path": "sbom.component_count", "operator": "gte", "value": 1, "on_fail": "fail", "reason": "No dependency inventory — SBOM generation found zero components" }
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "SOC2-T002",
|
|
27
|
+
"title": "No critical dependency vulnerabilities",
|
|
28
|
+
"domain": "supply-chain",
|
|
29
|
+
"references": ["CC6.6", "CC7.1", "CC7.2"],
|
|
30
|
+
"scanner_tools": ["sbom_generate", "sbom_scan_vulnerabilities"],
|
|
31
|
+
"evidence_requirements": [
|
|
32
|
+
"OSV vulnerability scan results for all SBOM components",
|
|
33
|
+
"Zero critical-severity known vulnerabilities"
|
|
34
|
+
],
|
|
35
|
+
"evaluation": {
|
|
36
|
+
"evidence_checks": [
|
|
37
|
+
{ "path": "supply_chain.vulnerabilities.by_severity.critical", "operator": "lte", "value": 0, "on_fail": "fail", "reason": "Critical dependency vulnerabilities found", "default": 0 },
|
|
38
|
+
{ "path": "supply_chain.vulnerabilities.by_severity.high", "operator": "lte", "value": 5, "on_fail": "partial", "reason": "High-severity dependency vulnerabilities exceed threshold", "default": 0 }
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "SOC2-T003",
|
|
44
|
+
"title": "No hallucinated (phantom) packages in dependency tree",
|
|
45
|
+
"domain": "supply-chain",
|
|
46
|
+
"references": ["CC6.6", "CC6.8"],
|
|
47
|
+
"scanner_tools": ["sbom_generate", "sbom_check_hallucinations"],
|
|
48
|
+
"evidence_requirements": [
|
|
49
|
+
"Hallucination check results for all SBOM components",
|
|
50
|
+
"Zero hallucinated packages detected"
|
|
51
|
+
],
|
|
52
|
+
"evaluation": {
|
|
53
|
+
"evidence_checks": [
|
|
54
|
+
{ "path": "supply_chain.hallucinations.hallucinated_count", "operator": "eq", "value": 0, "on_fail": "fail", "reason": "Hallucinated (phantom) packages detected in dependency tree" },
|
|
55
|
+
{ "path": "supply_chain.hallucinations.legitimate_count", "operator": "gte", "value": 1, "on_fail": "not_evaluated", "not_evaluated_reason": "No packages could be verified — all ecosystems unsupported by hallucination checker", "default": 0 }
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "SOC2-T004",
|
|
61
|
+
"title": "No critical code security findings",
|
|
62
|
+
"domain": "security",
|
|
63
|
+
"references": ["CC6.1", "CC6.6", "CC7.2"],
|
|
64
|
+
"scanner_tools": ["scan_security", "scan_project"],
|
|
65
|
+
"evidence_requirements": [
|
|
66
|
+
"Static analysis scan with zero CRITICAL findings",
|
|
67
|
+
"Project-level security grade"
|
|
68
|
+
],
|
|
69
|
+
"evaluation": {
|
|
70
|
+
"evidence_checks": [
|
|
71
|
+
{ "path": "scan.by_category_severity.injection.CRITICAL", "operator": "lte", "value": 0, "on_fail": "fail", "reason": "Critical injection vulnerabilities found", "default": 0 },
|
|
72
|
+
{ "path": "scan.by_category_severity.deserialization.CRITICAL", "operator": "lte", "value": 0, "on_fail": "fail", "reason": "Critical deserialization vulnerabilities found", "default": 0 },
|
|
73
|
+
{ "path": "scan.by_severity.CRITICAL", "operator": "lte", "value": 0, "on_fail": "fail", "reason": "Critical code findings present", "default": 0 }
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "SOC2-T005",
|
|
79
|
+
"title": "Data exfiltration and information exposure below threshold",
|
|
80
|
+
"domain": "confidentiality",
|
|
81
|
+
"references": ["CC6.1", "CC6.5", "C1.1"],
|
|
82
|
+
"scanner_tools": ["scan_security", "scan_project"],
|
|
83
|
+
"evidence_requirements": [
|
|
84
|
+
"Exfiltration pattern scan results",
|
|
85
|
+
"Information exposure findings below threshold"
|
|
86
|
+
],
|
|
87
|
+
"evaluation": {
|
|
88
|
+
"evidence_checks": [
|
|
89
|
+
{ "path": "scan.by_category_severity.exfiltration.CRITICAL", "operator": "lte", "value": 0, "on_fail": "fail", "reason": "Critical exfiltration findings detected", "default": 0 },
|
|
90
|
+
{ "path": "scan.by_category_severity.exfiltration.HIGH", "operator": "lte", "value": 0, "on_fail": "fail", "reason": "High-severity exfiltration findings detected", "default": 0 },
|
|
91
|
+
{ "path": "scan.by_category_severity.info-exposure.CRITICAL", "operator": "lte", "value": 0, "on_fail": "fail", "reason": "Critical information exposure findings detected", "default": 0 },
|
|
92
|
+
{ "path": "scan.by_category_severity.info-exposure.HIGH", "operator": "lte", "value": 3, "on_fail": "partial", "reason": "High-severity information exposure findings exceed threshold", "default": 0 }
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "SOC2-T006",
|
|
98
|
+
"title": "Cryptographic controls adequate",
|
|
99
|
+
"domain": "confidentiality",
|
|
100
|
+
"references": ["CC6.1", "CC6.7", "C1.1"],
|
|
101
|
+
"scanner_tools": ["scan_security", "scan_project"],
|
|
102
|
+
"evidence_requirements": [
|
|
103
|
+
"No critical/high crypto findings (weak algorithms, hardcoded keys)",
|
|
104
|
+
"Encryption usage scan results"
|
|
105
|
+
],
|
|
106
|
+
"evaluation": {
|
|
107
|
+
"evidence_checks": [
|
|
108
|
+
{ "path": "scan.by_category_severity.crypto.CRITICAL", "operator": "lte", "value": 0, "on_fail": "fail", "reason": "Critical cryptographic findings (weak algorithms, hardcoded keys)", "default": 0 },
|
|
109
|
+
{ "path": "scan.by_category_severity.crypto.HIGH", "operator": "lte", "value": 2, "on_fail": "partial", "reason": "High-severity cryptographic findings exceed threshold", "default": 0 }
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"id": "SOC2-T007",
|
|
115
|
+
"title": "Authentication and authorization controls adequate",
|
|
116
|
+
"domain": "auth",
|
|
117
|
+
"references": ["CC6.1", "CC6.2", "CC6.3"],
|
|
118
|
+
"scanner_tools": ["scan_security", "scan_project"],
|
|
119
|
+
"evidence_requirements": [
|
|
120
|
+
"No critical auth findings (hardcoded creds, missing auth checks)",
|
|
121
|
+
"Least-privilege and permissions scan results"
|
|
122
|
+
],
|
|
123
|
+
"evaluation": {
|
|
124
|
+
"evidence_checks": [
|
|
125
|
+
{ "path": "scan.by_category_severity.auth.CRITICAL", "operator": "lte", "value": 0, "on_fail": "fail", "reason": "Critical authentication/authorization findings detected", "default": 0 },
|
|
126
|
+
{ "path": "scan.by_category_severity.auth.HIGH", "operator": "lte", "value": 2, "on_fail": "partial", "reason": "High-severity auth findings exceed threshold", "default": 0 },
|
|
127
|
+
{ "path": "scan.by_category_severity.permissions.CRITICAL", "operator": "lte", "value": 0, "on_fail": "fail", "reason": "Critical permissions/least-privilege findings detected", "default": 0 }
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"id": "SOC2-T008",
|
|
133
|
+
"title": "Dependency drift tracked when baseline exists",
|
|
134
|
+
"domain": "supply-chain",
|
|
135
|
+
"references": ["CC6.6", "CC8.1"],
|
|
136
|
+
"scanner_tools": ["sbom_generate", "sbom_diff"],
|
|
137
|
+
"evidence_requirements": [
|
|
138
|
+
"SBOM baseline comparison results",
|
|
139
|
+
"Change tracking for added, removed, and version-changed packages"
|
|
140
|
+
],
|
|
141
|
+
"evaluation": {
|
|
142
|
+
"evidence_checks": [
|
|
143
|
+
{ "path": "supply_chain.drift.baseline_exists", "operator": "eq", "value": true, "on_fail": "not_evaluated", "not_evaluated_reason": "No SBOM baseline — dependency drift cannot be evaluated" }
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
package/index.js
CHANGED
|
@@ -33,6 +33,7 @@ import { sbomVulnerabilitiesSchema, sbomScanVulnerabilities } from './src/tools/
|
|
|
33
33
|
import { sbomHallucinationsSchema, sbomCheckHallucinations } from './src/tools/sbom-hallucinations.js';
|
|
34
34
|
import { sbomDiffSchema, sbomDiff } from './src/tools/sbom-diff.js';
|
|
35
35
|
import { sbomReportSchema, sbomExportReport } from './src/tools/sbom-report.js';
|
|
36
|
+
import { evaluateComplianceSchema, evaluateCompliance } from './src/tools/evaluate-compliance.js';
|
|
36
37
|
|
|
37
38
|
// Handle both ESM and CJS bundling (Smithery bundles to CJS)
|
|
38
39
|
let __dirname;
|
|
@@ -252,11 +253,18 @@ server.tool(
|
|
|
252
253
|
|
|
253
254
|
server.tool(
|
|
254
255
|
"get_compliance_controls",
|
|
255
|
-
"Look up
|
|
256
|
+
"Look up compliance controls with evaluation criteria. Supports multiple frameworks: aiuc-1 (default), soc2-technical, gdpr-technical. Filter by domain, control IDs, or OWASP LLM tags.",
|
|
256
257
|
complianceControlsSchema,
|
|
257
258
|
getComplianceControls
|
|
258
259
|
);
|
|
259
260
|
|
|
261
|
+
server.tool(
|
|
262
|
+
"evaluate_compliance",
|
|
263
|
+
"Evaluate a project against compliance frameworks (SOC2-technical, GDPR-technical, AIUC-1). Collects evidence from code scans, SBOM, vulnerability checks, and hallucination detection, then evaluates controls. Optionally saves timestamped evidence bundle.",
|
|
264
|
+
evaluateComplianceSchema,
|
|
265
|
+
evaluateCompliance
|
|
266
|
+
);
|
|
267
|
+
|
|
260
268
|
// ===========================================
|
|
261
269
|
// SBOM / SUPPLY CHAIN ANALYSIS
|
|
262
270
|
// ===========================================
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-security-scanner-mcp",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"mcpName": "io.github.sinewaveai/agent-security-scanner-mcp",
|
|
5
5
|
"description": "Security scanner MCP server for AI coding agents. Prompt injection firewall, package hallucination detection (4.3M+ packages), 1700+ vulnerability rules with AST & taint analysis, LLM-powered semantic code review, auto-fix. For Claude Code, Cursor, Windsurf, Cline, OpenClaw.",
|
|
6
6
|
"main": "index.js",
|