<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->
# Cookie Consent Compliance — API Reference

## Pre-Consent Audit

```bash
node scripts/agent.js --action pre-consent --url "https://example.com"
```

## Classify Cookies

```bash
# From JSON string
node scripts/agent.js --action classify \
  --cookies '[{"name":"_ga","domain":".example.com","expiry":63072000}]'

# From file
node scripts/agent.js --action classify --cookies /tmp/cookies.json
```

## Banner Audit

```bash
node scripts/agent.js --action banner-audit --url "https://example.com"
```

## Full Audit

```bash
node scripts/agent.js --action full-audit --url "https://example.com"
```

## Known Cookie Database

| Cookie | Category | Vendor |
|--------|----------|--------|
| _ga, _gid, _gat | Analytics | Google Analytics |
| _fbp, _fbc | Advertising | Meta Pixel |
| _gcl_au | Advertising | Google Ads |
| IDE | Advertising | DoubleClick |
| _hjid | Analytics | Hotjar |
| PHPSESSID | Essential | PHP Session |

## Compliance Requirements

| Regulation | Key Requirement |
|-----------|----------------|
| ePrivacy Art. 5(3) | Consent before non-essential cookies |
| GDPR Art. 7 | Freely given, specific, informed consent |
| CNIL Guidelines | Reject All equal to Accept All |
| CNIL Guidelines | Max 13 months for consent cookie lifetime |

## Common Violations

| Violation | Severity | Regulation |
|-----------|----------|------------|
| Pre-consent tracking | Critical | ePrivacy Art. 5(3) |
| No reject option | High | CNIL Guidelines |
| Dark patterns | High | EDPB Guidelines 05/2020 |
| Cookie wall | Medium | GDPR Art. 7(4) |
| Excessive lifetime | Medium | CNIL Guidelines |
