Security, layer by layer
Security in Stacktic is not a separate product bolted onto the stack. Each control is a component, a sub-component, a link or an attribute. It is generated with the topology, regenerated when the topology changes, and measured by the stack agent against what the graph declares.
The layers
| Layer | What is generated | Declared by | Proven by | Read |
|---|---|---|---|---|
| Gateway routes | TLS, rate limit, CORS, IP allow-list, body size, header removal, per route | Attributes of the apisix-<type> link | Penetration test, DAST coverage | Gateway, login and private access |
| Login | openid-connect at the gateway, built from the application's client; OIDC settings in the application | <app>-client link, apisix_oidc_enable on the route | Link validation (token issuance), the identity checks of the penetration test | Login from a link |
| Private access | Every HTTP route reachable only through a WireGuard tunnel, except the hosts you keep public | vpn component, vpn-apisix link | A request from outside the tunnel answers 403 | Private access |
| Web application firewall | A CrowdSec AppSec profile (Coraza, OWASP Core Rule Set) in front of each linked application | waf sub-component, waf-<app> link, apisix-crowdsec | WAF alerts in the SIEM, per-rule hit counters | Web application firewall |
| Identity | Realms, clients, users, groups, external identity providers, who may use the MCP server | Keycloak sub-components and attributes; the MCP's allowed_groups | Realm tests of the compliance scans, the penetration test's identity checks | Identity and secrets |
| Network | One network policy per link; a strict regulated set; explicit egress for cross-stack links | The links themselves; microsegmentation_level | Network policy scan, with real connection probes and negative tests | Network policies |
| Admission | A Gatekeeper constraint per policy family, in dryrun, warn or deny | OPA policy sub-components | Admission scan: enforcing, not enforcing, over-enforcing, broken | Workload hardening and admission |
| Workloads | The pod and container security context | The application's security_features | Admission scan, Kubernetes hardening scan | Workload hardening |
| Secrets | Encrypted secret files in the repository; secrets sourced from OpenBao at runtime | sops_enabled on the system; external_secrets-openbao | Secrets scan | Identity and secrets |
| Detection | Network intrusion detection, runtime detection, log-based bans, one SIEM | Suricata, Falco and CrowdSec components; <source>-opensearch links | SIEM monitors and dashboards, Prometheus alert rules | Detection and response |
| Supply chain | A source scan, your own SAST rules and the quality gate in every build; image vulnerability triage; DAST scan contracts; image signature checks | build_gate, sast_gate, sonarqube-<app>, nuclei-<app>, Sigstore | Builds and gates scan, image vulnerability scan, DAST coverage | Development security |
| Cluster access for people | Roles and bindings per namespace | A user group access component, links with a role | RBAC scan | Who can reach the cluster |
| Delivery | Argo CD that never deletes data | The Argo CD component | — | Argo CD |
| Proof | Scans, PCI DSS, ISO 27001, HIPAA and DORA positions, a hash-chained evidence trail | The stack agent | — | Compliance automation · Evidence |
Why this shape matters
A control follows the topology. Add a link and its network path, its route policy and its monitoring appear together. Remove it and they go at the next build. There is no window in which the security rules describe last month's system.
A control is versioned with the stack. It is in the diagram's history, in a diff between two versions, in a duplicated environment, and in a rollback.
A control is measured, not assumed. The stack agent runs the scan that matches each layer and records the result with the metadata commit it judged. "We enforce that" becomes a run anyone can repeat.
Tune, never remove
Hardening starts with the components' own attributes: an application's security_features, the
OPA policy sub-components and their modes, the options on each gateway route. When a policy blocks
something the stack needs, the policy is tuned to the stack — a scope, an exclusion, a mode — not
removed.
An AI client connected to the stack's MCP server can produce the plan with
security_tuning(action='plan'). It reads the stack and returns, for every item, the attribute, its
current and recommended value, why, what it can break, and the exact call that changes it. It never
writes. Each item has a class:
| Class | Meaning |
|---|---|
critical_review | Dangerous today; a person confirms before anything changes |
apply_now | Near-zero risk, with the residual condition stated |
staged | Depends on how the application behaves at runtime: change it on a non-production environment first |
needs_input | The value is not in the design (office or VPN address ranges, an identity client) and has to come from you |
Apply what you approve, build, deploy, and confirm with the admission scan.
See it on a real stack
A secured marketplace walks through a stack with every layer above turned on, and the choices its design leaves open.
Route options, login from a link, the WAF and VPN-only routes, in the order a request meets them.
NetworkNetwork policiesOne policy per link, the strict regulated set, cross-stack egress, and how to read what is open.
WorkloadsHardening and admissionSecurity contexts from one attribute, and admission policy that moves from dryrun to deny safely.
WatchDetection and responseSuricata, Falco and CrowdSec, the SIEM they feed, and the bans and blocks that follow.
BuildDevelopment securityThe three build gates, DAST as a design fact, and how they map to compliance.
ProveCompliance automationPCI DSS, ISO 27001, HIPAA and DORA, measured from the cluster and signed off by a person.