<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
# Third-Party Data Sharing Audit — API Reference

## Audit DPA Compliance

```bash
node scripts/agent.js --action audit-dpa \
  --vendor "Analytics Provider" --dpa /tmp/dpa_analytics.json
```

## Scan Network for Unauthorized Sharing

```bash
node scripts/agent.js --action scan-network \
  --input /var/log/network.log --allowlist /tmp/approved_vendors.json
```

## Validate Vendor Inventory

```bash
node scripts/agent.js --action validate-inventory \
  --inventory /tmp/vendor_inventory.json
```

## Generate Report

```bash
node scripts/agent.js --action report --inventory /tmp/vendor_inventory.json
```

## DPA Compliance Checks

| ID | Check | Article |
|----|-------|---------|
| DPA-01 | Written agreement exists | Art. 28(3) |
| DPA-02 | Processing scope defined | Art. 28(3)(a) |
| DPA-03 | Confidentiality clause | Art. 28(3)(b) |
| DPA-04 | Security measures specified | Art. 28(3)(c) |
| DPA-05 | Sub-processor approval | Art. 28(2) |
| DPA-06 | DSAR assistance clause | Art. 28(3)(e) |
| DPA-07 | Deletion on termination | Art. 28(3)(g) |
| DPA-08 | Audit rights granted | Art. 28(3)(h) |

## Output Format

```json
{
  "tool": "vendor-auditor",
  "action": "audit-dpa",
  "vendor": "Analytics Provider",
  "compliant_checks": 6,
  "total_checks": 8,
  "findings": [...]
}
```
