This file is the living threat model for the Bookstore example in this
directory. Chapter 00.08, Security foundations, teaches how to read it and
how to change it. Part 05 chapter 05.00 reads it too, so keep the headings
stable.
Scope: the four services under app/ (storefront, catalog, orders,
payments-worker), the manifests under raw-manifests/, and the cluster
the guide builds on.
Out of scope for now: cloud accounts, managed control planes and
identity providers. The cloud parts (Part 10 onward) add their own rows.
A change to a workload, a namespace label above restricted, or a
suppressed scanner finding changes this file in the same pull request.
Every threat keeps its ID. To retire a threat, mark it retired and give
the reason. Do not delete the row.
Each control names the field, RBAC rule or chapter that enforces it, and
its status says whether the baseline, the cluster or a later chapter
provides it. A status of open means no control exists yet.
Each row names a threat, the control that answers it, and its status.
Status values: baseline (a field that admission or the static gate
enforces), review (a baseline field that neither enforces, so a reviewer
checks it), cluster (a cluster-level control), open (no control in the
guide yet). Part 00 ch.08 names the enforcer of each baseline field.
API server audit policy. 05.08 runs examples/security-lab/audit/audit-policy.yaml on a throwaway kind cluster and reads the log; cluster/audit-policy.yaml is the Bookstore's version of the same shape. The guide's standard kind cluster sets no audit flag
Encryption at rest: 05.04 runs a secretbox config on kind, and cluster/encryption-config.yaml is the Bookstore's file of the same shape; etcd reached only by the API server
cluster
03.02; 05.04
I2
A broad RBAC grant reads Secrets
One ServiceAccount and one narrow Role per workload
cluster
05.01
I3
A caller reads Pod specs or runs commands through the kubelet
An RBAC grant lets a workload create a privileged Pod
Narrow RBAC, and restricted on the namespace
cluster
05.01; 05.02
E7
A mutation adds privilege the Pod did not ask for
A mutating webhook sets only restrictive fields, and only when absent; a validating check runs after it
review
11.01, #mental-model
E9
The chaos daemon runs privileged on every node, so a compromised daemon reaches the node. The controller can also delete Pods outside the workload under test
The daemon alone is privileged, in its own namespace enforced at privileged with audit and warn at restricted, and registered; the controller is namespace-scoped (clusterScoped: false); optional features are off
review
11.07, #threats-and-controls
E10
The provider's ServiceAccount holds more rights than the recipe needs, so a compromised provider, or a bad change to the recipe, reaches objects in every namespace
RBAC named to the kinds the recipe writes; the bind verb on the built-in view ClusterRole only; no cluster-admin binding; a requester Role limited to the request namespace
cluster
11.10, #threats-and-controls
E8
A controller's own RBAC grant lets a compromised operator act beyond its reconcile loop
Markers grant only the verbs the reconcile path calls, no delete and no wildcard; the generated role is read before it ships
Insecure on purpose. None in this file. The guide's rule: insecure
examples appear only in Part 05 labs and the capstone overlay, and never
in the bookstore or default namespace. The gates enforce it.
Exceptions. A namespace above restricted, or a suppressed scanner
finding, needs an entry in the registry before it merges. The registry is
security/namespace-exceptions.yaml for namespaces and .trivyignore.yaml
for scanner findings. Each entry records what is excepted, the reason with an
upstream citation, the chapter that explains it, and an expiry no more than 12
months out. make gates-registry fails an entry whose expiry has passed.
Not an exception..github/scripts/gates/not-evaluated.allow lists
manifests that no scanner could judge. It records gate blind spots. It
does not grant policy exceptions.
E9: the chart exposes no container-level security fields for the Chaos Mesh controller and dashboard in 2.8.7, so allowPrivilegeEscalation, dropped capabilities and runAsNonRoot are not set (11.07).