Auto-detection

wyrm init reads your infrastructure-as-code and generates a baseline Open Threat Model β€” the topology, trust boundaries, and dataflows, inferred from what already describes your system. You review it and add the one thing code can't know: which data is sensitive.

How it works

wyrm init                          # auto-detect compose in the current dir
wyrm init --from k8s/               # a directory of Kubernetes manifests
wyrm init --from main.tf -o -       # print to stdout
wyrm analyze                        # then find the threats in the baseline

It writes .threatmodel/<project>.otm.yaml. Two principles guide every rule:

What it detects

Status: shipped building planned

Docker Compose shipped

SignalBecomes
servicecomponent (type inferred from image)
published portsinternet ingress dataflow
depends_ondataflow between services
image is postgres/mysql/redis/…database / data-store in a data tier

Kubernetes & Istio shipped

SignalBecomes
Service type LoadBalancer / NodePortinternet-facing component
Service type ClusterIPinternal component
Ingress (+ backends)edge entrypoint + dataflows; tls β†’ encrypted
Istio Gateway / VirtualServicemesh edge + routing dataflows
loadBalancerSourceRangesmitigation (source-IP allowlist)
NetworkPolicy, Istio AuthorizationPolicy / mTLStrust boundary / mitigation
CNI: Flannel vs Calico/Ciliumwhether NetworkPolicy is actually enforced

Terraform β€” AWS / GCP / Azure shipped

SignalBecomes
AWS aws_lb.internal = false, API Gatewayinternet-facing LB / API
AWS aws_security_group ingress 0.0.0.0/0world-open port
GCP forwarding_rule EXTERNAL*, public GKEinternet exposure
GCP iap {}, master_authorized_networksmitigation (auth / allowlist)
Azure public frontend_ip_configuration, azurerm_public_ipinternet-facing frontend
VPC / VNet / subnetstrust zones

WAF, DDoS, reverse proxies & access control planned

SignalBecomes
Cloudflare managed/custom WAF, rate limiting, bot managementmitigation (mode: block vs log)
Fastly WAF / Next-Gen WAF (Signal Sciences)mitigation (+ coverage %)
AWS WAFv2 & Shield, GCP Cloud Armor, Azure WAF & DDoSmitigation on the ingress flow
Pangolin, Cloudflare Tunnel (cloudflared), ngroktunneled edge β€” no direct internet port + auth mitigation
Authelia, Authentik, oauth2-proxy, Keycloak, Pomerium; Traefik forwardAuthmitigation (authentication / SSO)
Istio oauth2 ext-authz / JWT RequestAuthenticationmitigation (auth at the gateway)
fail2ban, CrowdSec; IP allowlists (Traefik ipAllowList, nginx allow/deny)mitigation (intrusion prevention / source allowlist)
Tailscale tailnet / subnet routerprivate trust zone (not internet-exposed)
tailscale funneldeliberate internet exposure

The full signal→OTM mapping, with exact resource/attribute names, lives in DETECTION.md. Want a source wyrm doesn't cover yet? Issue #12 tracks the roadmap.

What it can't detect (you add these)

A generated baseline captures structure. It cannot know sensitivity β€” which flows carry PII, credentials, or regulated data. That's the review step: open the generated model, add assets with confidentiality ratings and attach them to the right components and dataflows, then re-run wyrm analyze. The topology is the 90% wyrm does for you; the sensitivity is the 10% only you know.