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

## agent.js CLI

```bash
node scripts/agent.js --action enumerate --input services.json
node scripts/agent.js --action analyze --input services.json
node scripts/agent.js --action threats --input services.json
node scripts/agent.js --action report --input threats.json --output report.json
```

## Threat Categories

| Category | Example Threats |
|----------|----------------|
| service_identity | Impersonation, stolen tokens |
| api_gateway | Auth bypass, missing rate limits |
| east_west | Unencrypted traffic, lateral movement |
| container | Root containers, escape, writable FS |
| orchestration | RBAC bypass, etcd exposure |
| data | Cross-service leaks, inconsistent auth |

## Service JSON Schema

```json
{
  "name": "user-service",
  "category": "service_identity",
  "internet_facing": false,
  "depends_on": ["user-db"],
  "has_mtls": true
}
```
