# Defense-as-a-Service — hands-free demo guide

## Quick start

```bash
npm run server:dev
npm run demo:automate
```

Base URL defaults to `http://127.0.0.1:5000` (`DEMO_BASE_URL` override).

## Surfaces covered by `demo:automate`

| Step | Surface | Proof |
|------|---------|-------|
| Red-team readiness | `GET /api/governance/red-team-readiness` | `pass=true` |
| Gateway corporate/military | `POST /api/gateway/select` | Workbench manifests |
| Provider hot-swap | `POST /api/ai-orchestrator/prefer-tier` | Runtime tier reorder |
| HITL system of record | `GET /api/governance/system-of-record` | `dualWrite=true` |
| PQC-Bridge | `GET /api/security/pqc/v1`, `/status` | `OPERATIONAL` |
| Compliance pack | `GET /api/security/compliance-pack/v1?portal=corporate` | `atlas-compliance-pack/v1` |
| Vendor dashboard | `GET /api/security/vendor-dashboard` | Live KPIs |
| Vendor portal | `GET /vendor-security` | CISO dashboard HTML |
| Immunology status | `GET /api/security/immunology/status` | Antigen/antibody buffer |
| Executive + COP | Browser | Manifest-scoped workbenches |
| Red-team page | `GET /evaluate/red-team` | Evaluator proof |

## `simulate-antigen` — dev / E2E only

**Do not use on production EC2 for live demos.** The route injects synthetic 401/403 antigens to trigger antibody synthesis for evaluator proof.

| Environment | Behavior |
|-------------|----------|
| Local dev (`NODE_ENV=development`) | `POST /api/security/immunology/simulate-antigen` → `200`, antibodies created |
| Production | `403` — `simulate-antigen disabled in production` |
| E2E / CI (`ATLAS_E2E_MODE=1`) | Allowed on production-like hosts for automated probes |

### Live antibody demo (dev or witnessed E2E)

```bash
curl -s -X POST http://127.0.0.1:5000/api/security/immunology/simulate-antigen \
  -H 'Content-Type: application/json' \
  -d '{"path":"/api/portals/military","status":403}' | jq .
```

Then open `/vendor-security` — **Active antibodies** and **Antigen buffer** KPIs update within one scan cycle (~60s, or refresh).

`npm run demo:automate` calls simulate-antigen when the server allows it; a `403` on production is treated as expected (guard working), not a failure.

## Production deploy notes

- `scripts/ensure-governance-hitl-audit.sh` runs on every EC2 deploy (before PM2 restart) — creates `governance_hitl_audit` and grants `shield`.
- COP feed health (`GET /api/cop/status`) reports `DEGRADED` when ADS-B or AIS feeds are genuinely down — correct behavior, not a regression.
- `npm run gate:push` is the standing pre-push gate; **Bugbot (IRON RULE 13)** remains a separate gate for non-trivial changes.
