agent-security-scanner-mcp 4.1.1 → 4.3.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 CHANGED
@@ -63,6 +63,10 @@ Continue reading below for full version documentation →
63
63
 
64
64
  ---
65
65
 
66
+ > **New in v4.3.0 (2026-05-05):** Critical security and reliability fixes — GitHub Actions now **fail closed** instead of fail-open when scanner output is invalid (preventing security gate bypass), patched **8 Hono CVEs** (XSS, path traversal, authentication bypass), fixed confidence threshold filtering case sensitivity, and corrected SARIF generation for GitHub Code Scanning. All fixes include comprehensive regression tests. **Upgrade recommended for production use.** [See Full Changelog](CHANGELOG.md#430---2026-05-05).
67
+ >
68
+ > **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).
69
+ >
66
70
  > **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
71
  >
68
72
  > **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 +98,8 @@ Continue reading below for full version documentation →
94
98
  | `sbom_check_hallucinations` | Verify all SBOM packages exist in official registries | Before deploying, to catch AI-invented packages |
95
99
  | `sbom_diff` | Compare current SBOM against baseline, detect added/removed/changed packages | In CI/CD to track dependency drift |
96
100
  | `sbom_export_report` | Generate HTML or JSON audit report from SBOM with vulnerability data | For PCI-DSS compliance, security reviews |
101
+ | `get_compliance_controls` | Look up compliance controls with evaluation criteria (AIUC-1, SOC2, GDPR) | To understand compliance requirements |
102
+ | `evaluate_compliance` | Evaluate project against compliance frameworks with evidence collection | For SOC2/GDPR technical compliance audits |
97
103
 
98
104
  ## Quick Start
99
105
 
@@ -424,6 +430,177 @@ sbom-report <dir> [--format html|json] [--output <path>] [--no-vulnerabilities]
424
430
 
425
431
  ---
426
432
 
433
+ ## 📋 Compliance Evaluation (New in v4.2.0)
434
+
435
+ Evaluate projects against technical compliance frameworks with automated evidence collection from code scans, SBOM, vulnerability checks, and hallucination detection.
436
+
437
+ ### Quick Start
438
+
439
+ ```bash
440
+ # Evaluate against SOC2 technical controls
441
+ npx agent-security-scanner-mcp evaluate-compliance . --framework soc2-technical
442
+
443
+ # Evaluate against GDPR technical controls
444
+ npx agent-security-scanner-mcp evaluate-compliance . --framework gdpr-technical
445
+
446
+ # Evaluate with evidence persistence (for audit trails)
447
+ npx agent-security-scanner-mcp evaluate-compliance . --framework soc2-technical --save-evidence
448
+
449
+ # List available compliance frameworks
450
+ npx agent-security-scanner-mcp get-compliance-controls --verbosity full
451
+ ```
452
+
453
+ ### Supported Frameworks
454
+
455
+ | Framework | Controls | Focus Areas |
456
+ |-----------|----------|-------------|
457
+ | **AIUC-1** | 16 | AI agent security, prompt injection, hallucination |
458
+ | **SOC2-Technical** | 8 | Supply chain, code security, crypto, auth, drift |
459
+ | **GDPR-Technical** | 6 | Data privacy, encryption, third-party risks |
460
+
461
+ > **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.
462
+
463
+ ### SOC2-Technical Controls
464
+
465
+ | Control ID | Title | What It Checks |
466
+ |------------|-------|----------------|
467
+ | SOC2-T001 | Software dependency inventory exists | SBOM has ≥1 component |
468
+ | SOC2-T002 | No critical dependency vulnerabilities | OSV.dev scan for critical/high CVEs |
469
+ | SOC2-T003 | No hallucinated packages | Package registry verification |
470
+ | SOC2-T004 | No critical code security findings | Static analysis for injection, deserialization |
471
+ | SOC2-T005 | Data exfiltration/exposure below threshold | Exfiltration patterns, info-exposure scan |
472
+ | SOC2-T006 | Cryptographic controls adequate | Weak algorithms, hardcoded keys |
473
+ | SOC2-T007 | Authentication/authorization adequate | Auth bypass, permissions issues |
474
+ | SOC2-T008 | Dependency drift tracked | SBOM baseline comparison |
475
+
476
+ ### GDPR-Technical Controls
477
+
478
+ | Control ID | Title | What It Checks |
479
+ |------------|-------|----------------|
480
+ | GDPR-T001 | Sensitive data exposure below threshold | PII patterns, secrets, logging |
481
+ | GDPR-T002 | Data exfiltration below threshold | External data transfer patterns |
482
+ | GDPR-T003 | Encryption/transport adequate | Weak crypto, plaintext transport |
483
+ | GDPR-T004 | Third-party dependency inventory | SBOM component count |
484
+ | GDPR-T005 | No critical third-party vulnerabilities | OSV.dev vulnerability scan |
485
+ | GDPR-T006 | No hallucinated packages | Registry verification |
486
+
487
+ ### MCP Tools
488
+
489
+ #### `get_compliance_controls`
490
+
491
+ Look up compliance controls with evaluation criteria. Filter by framework, domain, or OWASP LLM tags.
492
+
493
+ ```json
494
+ // Input
495
+ { "framework": "soc2-technical", "domain": "supply-chain", "verbosity": "compact" }
496
+
497
+ // Output
498
+ {
499
+ "framework": "SOC2-Technical",
500
+ "controls_count": 4,
501
+ "controls": [
502
+ {
503
+ "id": "SOC2-T001",
504
+ "title": "Software dependency inventory exists",
505
+ "domain": "supply-chain",
506
+ "references": ["CC6.6", "CC7.1"],
507
+ "scanner_tools": ["sbom_generate"],
508
+ "evaluation": { "evidence_checks": [...] }
509
+ }
510
+ ]
511
+ }
512
+ ```
513
+
514
+ #### `evaluate_compliance`
515
+
516
+ Evaluate a project against compliance frameworks. Collects evidence from multiple sources, evaluates each control, and optionally saves timestamped evidence bundles.
517
+
518
+ ```json
519
+ // Input
520
+ {
521
+ "directory_path": "./my-project",
522
+ "frameworks": ["soc2-technical", "gdpr-technical"],
523
+ "save_evidence": true,
524
+ "verbosity": "compact"
525
+ }
526
+
527
+ // Output
528
+ {
529
+ "directory": "./my-project",
530
+ "tools_run": ["scan_project", "scan_security", "sbom_generate", "sbom_scan_vulnerabilities", "sbom_check_hallucinations"],
531
+ "scan_summary": { "grade": "B", "by_severity": { "CRITICAL": 0, "HIGH": 2, "MEDIUM": 5 } },
532
+ "sbom_summary": { "component_count": 212, "ecosystems": ["npm", "pypi"] },
533
+ "supply_chain": {
534
+ "vulnerabilities": { "total": 3, "by_severity": { "critical": 0, "high": 1, "medium": 2 } },
535
+ "hallucinations": { "hallucinated_count": 0 },
536
+ "drift": { "baseline_exists": true, "added": 2, "removed": 0 }
537
+ },
538
+ "compliance": {
539
+ "soc2-technical": {
540
+ "pass": 6, "partial": 1, "fail": 0, "not_evaluated": 1,
541
+ "results": [
542
+ { "control_id": "SOC2-T001", "status": "pass", "reasons": [] },
543
+ { "control_id": "SOC2-T002", "status": "partial", "reasons": ["High-severity dependency vulnerabilities exceed threshold"] }
544
+ ]
545
+ }
546
+ },
547
+ "evidence_saved": ".scanner/evidence/2026-04-02T05-30-00-soc2-technical.json"
548
+ }
549
+ ```
550
+
551
+ ### Evidence Collection
552
+
553
+ The `evaluate_compliance` tool collects evidence from multiple sources:
554
+
555
+ | Source | Tools Used | Evidence Collected |
556
+ |--------|------------|-------------------|
557
+ | Code Scan | `scan_project`, `scan_security` | Security grade, findings by severity/category |
558
+ | SBOM | `sbom_generate` | Component count, ecosystems, direct vs transitive |
559
+ | Vulnerabilities | `sbom_scan_vulnerabilities` | CVE counts by severity |
560
+ | Hallucinations | `sbom_check_hallucinations` | Hallucinated package count |
561
+ | Drift | `sbom_diff` | Added/removed/changed packages vs baseline |
562
+
563
+ ### Evidence Persistence
564
+
565
+ When `save_evidence: true`, the tool saves timestamped JSON evidence bundles to `.scanner/evidence/`:
566
+
567
+ ```
568
+ .scanner/evidence/
569
+ ├── 2026-04-02T05-30-00-soc2-technical.json
570
+ ├── 2026-04-02T05-35-00-gdpr-technical.json
571
+ └── ...
572
+ ```
573
+
574
+ These bundles contain complete evidence data for audit trails and compliance documentation.
575
+
576
+ ### Control Evaluation Logic
577
+
578
+ Controls use a path-based evidence check system with operators:
579
+
580
+ | Operator | Description | Example |
581
+ |----------|-------------|---------|
582
+ | `exists` | Path value is present and non-null | `sbom.component_count exists` |
583
+ | `eq` | Exact equality | `drift.baseline_exists eq true` |
584
+ | `lte` | Less than or equal | `vulnerabilities.critical lte 0` |
585
+ | `gte` | Greater than or equal | `sbom.component_count gte 1` |
586
+
587
+ **Three-tier null handling:**
588
+ 1. **Explicit null** (e.g., OSV outage) → `not_evaluated` — source failure
589
+ 2. **Missing top-level section** → `not_evaluated` — evidence never collected
590
+ 3. **Missing leaf key** → use `default` value if specified (e.g., no crypto findings = 0)
591
+
592
+ ### CLI Commands
593
+
594
+ ```bash
595
+ # Evaluate compliance
596
+ evaluate-compliance <dir> [--framework <name>] [--save-evidence] [--verbosity minimal|compact|full]
597
+
598
+ # List controls
599
+ get-compliance-controls [--framework <name>] [--domain <name>] [--verbosity minimal|compact|full]
600
+ ```
601
+
602
+ ---
603
+
427
604
  ## Tool Reference
428
605
 
429
606
  ### `scan_security`
@@ -1421,6 +1598,27 @@ All MCP tools support a `verbosity` parameter to minimize context window consump
1421
1598
 
1422
1599
  ## Changelog
1423
1600
 
1601
+ ### v4.2.0 (2026-04-02) - Compliance Evidence Collection
1602
+
1603
+ **🚀 New Feature: SOC2/GDPR Technical Compliance Evaluation**
1604
+
1605
+ - **2 New MCP Tools:** `evaluate_compliance`, `get_compliance_controls` (enhanced)
1606
+ - **SOC2-Technical Framework:** 8 controls covering dependency inventory, vulnerabilities, hallucinations, code findings, exfiltration, crypto, auth, drift
1607
+ - **GDPR-Technical Framework:** 6 controls covering data exposure, exfiltration, encryption, dependency inventory, vulnerabilities, hallucinations
1608
+ - **Multi-Framework Registry:** Generalized loader supporting per-framework domain validation
1609
+ - **Evidence Collection:** Automated evidence gathering from code scans, SBOM, OSV.dev, hallucination checks
1610
+ - **Evidence Persistence:** Timestamped JSON bundles saved to `.scanner/evidence/` for audit trails
1611
+ - **Generic evidence_checks Evaluator:** Path-based check system with `exists`/`eq`/`lte`/`gte` operators
1612
+ - **Three-Tier Null Handling:** Distinguishes source failures (null) from absent categories (undefined)
1613
+ - **48 New Tests:** Comprehensive coverage for multi-framework loading, evidence checks, SOC2/GDPR evaluation
1614
+
1615
+ **Design Notes:**
1616
+ - Technical controls only — does not claim full SOC 2 or GDPR compliance
1617
+ - Missing evidence → `not_evaluated`, not false pass (secure default)
1618
+ - AIUC-1 backward compatibility maintained (zero regression)
1619
+
1620
+ ---
1621
+
1424
1622
  ### v4.1.0 (2026-03-27) - SBOM Generation & Vulnerability Analysis
1425
1623
 
1426
1624
  **🚀 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 AIUC-1 compliance controls with evaluation criteria. Filter by domain (security/safety), control IDs, or OWASP LLM tags. Returns structured evaluation rules for pass/partial/fail assessment.",
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.1.1",
3
+ "version": "4.3.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",
package/src/config.js CHANGED
@@ -172,8 +172,9 @@ export function meetsSeverityThreshold(severity, config) {
172
172
  }
173
173
 
174
174
  export function meetsConfidenceThreshold(confidence, config) {
175
- const threshold = config.confidence_threshold || 'LOW';
176
- const confidenceLevel = CONFIDENCE_ORDER[confidence] ?? 0;
175
+ const threshold = String(config.confidence_threshold || 'LOW').toUpperCase();
176
+ const normalizedConfidence = String(confidence || 'LOW').toUpperCase();
177
+ const confidenceLevel = CONFIDENCE_ORDER[normalizedConfidence] ?? 0;
177
178
  const thresholdLevel = CONFIDENCE_ORDER[threshold] ?? 0;
178
179
  return confidenceLevel >= thresholdLevel;
179
180
  }