NodeMotion
Live Canvas
MODULE 08 OF 09•AI, IaC & Enterprise Governance

IaC & GitHub Ingestion + Downloadable Templates

Supported formats (.tf, .bicep, docker-compose.yaml, OpenAPI, Kubernetes YAML), GitHub tree discovery rules, and 1-click downloadable starter templates.

MODULE 08 · IAC & GITHUB INGESTION⏱ 5 min read

“Your Terraform, Bicep, and .mcp/config.json files already contain your real architecture—stop redrawing them by hand.”

— Shift-Left IaC Manifesto
TL;DR in 15 Seconds:Upload local .tf, .bicep, Kubernetes YAML, OpenAPI, or .mcp/config.json files—or paste any public GitHub repository URL—to synthesize a threat-ready topology instantly.

1. Dual-Engine IaC & API Specification Importer

Accessible in both Architecture Studio and Threat Modeling Studio via File → Import IaC / Spec, the IaC & Spec Importer provides two ingestion modes: Upload / Paste Local Files and Import from URL (GitHub / Raw Spec).

IaC Import Modal — Upload or Paste Terraform, Bicep, and YAML
Figure 8.1 — IaC Import Modal (Tab 1 — Upload / Paste): Multi-file ingestion (.tf, .bicep, .yaml, .json) with 1-click Sample Terraform loader.LIVE PLAYWRIGHT CAPTURE
IaC Import Modal — Direct GitHub Repository and Subfolder URL Ingestion
Figure 8.2 — IaC Import Modal (Tab 2 — Import from URL): Direct GitHub repository, /tree/branch/subfolder, and raw file URL discovery.LIVE PLAYWRIGHT CAPTURE

2. How GitHub URL Discovery & Deterministic HCL/Bicep Extraction Work

GitHub Recursive Tree Ranking Algorithm

When you paste a GitHub URL and click Fetch URL, handleFetchFromUrl executes a 3-case resolution pipeline:

  1. Single Blob URL (github.com/org/repo/blob/branch/path): Rewrites directly to raw.githubusercontent.com and downloads the exact file with zero API quota usage.
  2. Repository Root or Subfolder Tree (github.com/org/repo/tree/branch/subpath): Queries api.github.com/repos/org/repo/git/trees/branch?recursive=1, filters out non-IaC files (package.json, tsconfig.json, CI workflows), scores candidates (.tf/.bicep/.hcl = Priority 0, docker-compose/openapi/main/network = Priority 1), and downloads the top 8 files (up to 55 KB).
  3. Direct Raw URL: Fetches raw OpenAPI or HCL specs directly over HTTPS.

Automatic Security Posture Inference from IaC Code

During extraction, parseIacLocallyFallback inspects resource blocks for security-critical attributes:

  • Public Exposure Detection: Sets publicExposure = true if a resource block contains public_network_access_enabled = true, publicNetworkAccess: 'Enabled', or publicly_accessible = true.
  • Plaintext HTTP Detection: Sets edge transportSecurity = 'plaintext' if protocol = "Http", port = 80, or non_ssl_port_enabled = true is present, immediately triggering NM-STRIDE-I01 in Threat Studio.
  • VNet / VPC Boundary Inference: Extracts azurerm_virtual_network or aws_vpc names as the outer parentGroup trust boundary.

3. 1-Click Downloadable Starter Templates

Download any of these 5 reference IaC & API specification templates to test NodeMotion's importer and STRIDE engine immediately:

azure-zero-trust-payments.tfTerraform HCL (.tf)

Azure VNet (prod-eu-payments-vnet), Application Gateway (missing WAF to trigger NM-STRIDE-T01), Private AKS Cluster, Redis Cache, PostgreSQL Flexible Server (public_network_access_enabled = true), and Key Vault HSM.

azure-ai-rag-platform.bicepAzure Bicep (.bicep)

Enterprise AI hub with Application Gateway ingress, Container Apps MCP Support Agent, Azure OpenAI GPT-4o Service, Cosmos DB Vector Index, and Key Vault.

microservices-mesh-compose.yamlDocker Compose (.yaml)

Polyglot microservice mesh with Envoy API Gateway (ports 80/443), Checkout Order Service, MCP Copilot Agent, Redis 7.2, Postgres 16, and Kafka 3.7.

checkout-ledger-openapi.yamlOpenAPI 3.0 Spec (.yaml)

REST API specification with Entra ID OAuth2/OIDC security schemes, /v1/checkout/orders PCI route, /v1/customers/profile PII route, and /v1/agent/rag-query MCP route.

aks-zero-trust-workloads.yamlKubernetes Manifests (.yaml)

Multi-document Kubernetes YAML defining public Ingress, Order Processor Deployment, RAG Orchestrator Agent Deployment, and Ledger Postgres StatefulSet.

There Are No Dumb Questions

Candid answers to the skeptical questions every security engineer asks first.

Q:Can I bring my team back and forth between Architecture Studio and Threat Modeling Studio?
A:Yes! Use Threat Model in Architecture Studio to analyze security, and Sync to Studio in Threat Modeling Studio to push every newly spliced WAF, SIEM, or Guardrail back into your architecture runbook.
Q:How do I prove these findings in our CI/CD pipeline?
A:Export OASIS SARIF v2.1.0 from the File menu and upload it to GitHub Advanced Security via github/codeql-action/upload-sarif@v3.
The Sticky-Note Takeaway
  • ▸Every diagram node, edge, and trust boundary stays synchronized across studios.
  • ▸1-click countermeasures update both the visual topology and Residual Risk score.
  • ▸Export SARIF v2.1.0, Threat Dragon v2 JSON, Jira CSV, and CISO PDFs anytime.