$ run as a normal user# run as root (or with sudo)
Skills in this chapter
- Zero trust — P1102–P1111
Zero trust in practice: identity, policy, telemetry
Trust is a check, not a place.
Zero trust is usually sold as a product. In practice it is three pieces of machinery and one habit: something that knows who is calling, something that decides whether that caller may do this now, and something that records the decision.
- Identity Who Is Calling: User session, Workload SVID, Device posture
- Policy What Is Allowed: Decision point, Enforcement point, Admission check
- Resources Where It Lands: Service over mTLS, Data store, Control plane
- Telemetry What Was Seen: Decision log, Access log, Trace with identity
Full note: P1102 — Zero trust in practice: identity, policy, telemetry
Service identity with mTLS
An API key in a config file authenticates a file, not a service. Anyone who can read the file is the service, and the key keeps working long after the team that created it has moved on. mTLS replaces that secret with a certificate bound to a workload identity.
- One workload, one ID: A SPIFFE ID in the URI SAN, issued only after attestation.
- A certificate, not a secret: Short TTL, a known issuer, and an identity the peer can read.
- Authorise per request: The handshake authenticates the peer; the policy decides the action.
- Rotate by design: Reload without restart, overlap the bundles, alarm on age.
Full note: P1103 — Service identity with mTLS
Five assumptions zero trust breaks
Zero trust is easier to adopt as a list of broken assumptions than as a product category.
- That inside the network is safe: a stolen laptop on the VPN is still inside.
- That one login lasts the day: a session is a claim, re-checked per request.
- That an IP or a DNS name is an identity: both are easy to borrow.
- That a firewall rule states intent: policy belongs to identity, not subnets.
Full note: P1104 — Five assumptions zero trust breaks
Supply chain trust: source, build, artefact, deploy
Trust the artefact, not the pipeline.
Supply chain security is usually drawn as one signature on one artefact. The useful model is a chain of evidence, with a different control at each layer.
- Source: Signed commits, review, dependencies pinned.
- Build: Hosted, hermetic, credentials that expire.
- Provenance: A signed statement of inputs and outputs.
- Artefact: Digest, signature and SBOM travel together.
Full note: P1105 — Supply chain trust: source, build, artefact, deploy
Consuming an SBOM without drowning
The first SBOM most teams generate is a shock: hundreds of components for a service that felt small, and dozens of findings, most of them transitive.
- A manifest, not a verdict: Components, versions and relationships, with no priority attached.
- The purl is the join: One identifier that connects a component to an advisory range.
- VEX ends the argument: A status and a justification, in a format a scanner can read.
- Diff every release: A new component between two builds is the question worth asking.
Full note: P1106 — Consuming an SBOM without drowning
Four numbers worth tracking
Four numbers describe a vulnerability programme better than any maturity model, and none of them is a count of findings.
- Detect: days from exposure to a ticket, counted from telemetry, not memory.
- Patch: days from triage to a fixed artefact in production, not a merged PR.
- Verify: days from patch to proof the running image no longer carries it.
- Disclose: days from report to advisory, agreed with the reporter in writing.
Full note: P1107 — Four numbers worth tracking
A vulnerability disclosure process
A report is a clock, not a favour.
A vulnerability disclosure process is a promise with a clock attached. The promise is that a report will be read, acknowledged and answered. The clock is what makes the promise credible.
- Read it, answer it, log it: Publish a security.txt; Acknowledge within a day; Log it where bugs live.
- Prove it before you score it: Reproduce it first; Score, then apply policy; Fix it or accept it.
- Agree the date, ship the fix: Agree the date; Patch before the advisory; Credit and close.
Full note: P1108 — A vulnerability disclosure process
Running a security champions programme
A security champions programme is a distribution mechanism, not a training course. The central team cannot review every design, and should not try; the champion is the person in the team who can ask the awkward question early.
- One per team: A named person with the lead's agreement, not a volunteer.
- Hours and a mandate: Time in the objectives and a route to a specialist.
- Rituals with artefacts: A monthly hour, office hours and a threat model that ends in tickets.
- Outcome numbers: What the team found, and how fast it closed.
Five questions for any service
Five questions do more for a threat model than a template with forty fields.
- What does it trust without checking, and who can forge that claim?
- What can an authenticated caller do in one request that it should not?
- Where does data cross a boundary, and who can read it there?
- What happens when a dependency is compromised, not merely unavailable?
Full note: P1110 — Five questions for any service
Identity and signing commands
Prove the identity, then the artefact.
Identity and signing questions sound different and reduce to the same two: who is this, and what is it?
- Identity:
curl -s $ISS/.well-known/openid-configuration - mTLS:
openssl s_client -connect api:8443 - SBOM:
syft $IMAGE -o spdx-json > sbom.json - Signing:
cosign sign --yes $IMAGE@$DIGEST
Full note: P1111 — Identity and signing commands