Zero-Secret Control Plane & Cryptographic Transparency
Security governance tools protect your highest-privilege machine identities. NHI-as-Code is engineered so that even a total control-plane compromise yields zero raw customer credentials.
INV-1: Zero External Dependencies
Every package (@nhi-as-code/core, @nhiascode/cli, @nhiascode/mcp-server, Cloudflare Worker, GitHub Action) ships with dependencies: {} and devDependencies: {}, eliminating transitive npm supply-chain attacks.
INV-2: Raw-Secret Rejection Firewall (422)
All provider polling happens locally in your CLI or CI runner. Our API enforces linear-time (ReDoS-proof) recursive secret scanning before any D1/R2 write or log, returning HTTP 422 RAW_SECRET_REJECTED if any raw token crosses the wire.
INV-3: RFC-8785 + Ed25519 + Hash-Chained Audit Log
Snapshots and SOC 2 / ISO 27001 evidence bundles are canonicalized (RFC 8785) and signed with Ed25519, with the signing keyId bound inside the signed payload. Public verification keys live at /.well-known/nhi-jwks.json. Every control-plane mutation is appended to a SHA-256 hash-chained audit_log.
INV-4 & INV-5: Confused-Deputy & GhostAction Defense
Generated AWS IAM OIDC trust policies strictly enforce StringEquals on both aud and exact repo+branch/environment sub (zero wildcards). All generated GitHub Actions workflows pin every uses: directive to a 40-char commit SHA.
INV-6: Edge Control-Plane Hardening
Every response carries strict CSP (with per-request nonces), HSTS preload, X-Frame-Options: DENY, streaming body byte caps (413), literal-IP and hostname/FQDN SSRF validation with redirect: 'error', D1 fixed-window rate limiting (429), and strict tenant isolation (403).
INV-7: Local CLI & MCP Containment
Zero shell execution (exec/spawn prohibited), strict realpathSync workspace root containment against symlink/path traversal, HTTPS-only upload enforcement, and mandatory redactSecrets() output scrubbing.
Responsible Disclosure
Report security vulnerabilities to security@nhiascode.dev. See /.well-known/security.txt and our Security Disclosure Policy.