Capstone 2: End-to-End CI/CD Pipeline Deploying Hardened Containers to Cloud
Build a full CI/CD path: scan, sign, push, and deploy hardened images to the cloud.
In plain words
Connect source, build, artifact, policy and runtime into an auditable chain of custody.
Think of it like…
The pipeline is an armored transport chain: the commit is sealed at the factory, inspected at each checkpoint and delivered only to an account that recognizes the seal.
Where you’ve seen it
In practice, github-actions: checkout→buildx push→syft sbom→trivy scan→cosign sign→deploy digest→health verify; rollback by previous signed digest is the concrete move for this job: build a full CI/CD path: scan, sign, push, and deploy hardened images to the cloud. The release is not accepted until verify source/workflow attestation, exact digest in cloud, SBOM/signature policy, non-root/capability config and SLO after a controlled rollback confirms the result.
Words you’ll hear
- Capstone
- The implementation control in
github-actions: checkout→buildx push→syft sbom→trivy scan→cosign sign→deploy digest→health verify; rollback by previous signed digestfor build a full CI/CD path: scan, sign, push, and deploy hardened images to the cloud. - CI/CD
- The result to observe with
verify source/workflow attestation, exact digest in cloud, SBOM/signature policy, non-root/capability config and SLO after a controlled rollback, rather than infer from a successful command alone. - Hardened Deploy
- The production boundary exposed when granting package:write to pull requests, or rolling back to a vulnerable latest tag because the prior digest/provenance was not retained.
Visual diagram
Theory & deep dive
Capstone control path
The concrete mechanism is github-actions: checkout→buildx push→syft sbom→trivy scan→cosign sign→deploy digest→health verify; rollback by previous signed digest. The observable result is verify source/workflow attestation, exact digest in cloud, SBOM/signature policy, non-root/capability config and SLO after a controlled rollback; if those disagree, inspect the runtime evidence before changing unrelated settings.
Build a full CI/CD path: scan, sign, push, and deploy hardened images to the cloud. Keep Capstone, CI/CD and Hardened Deploy in the same deployment record so the intent and the observed state cannot drift apart.
github-actions: checkout→buildx push→syft sbom→trivy scan→cosign sign→deploy digest→health verify; rollback by previous signed digest
verify source/workflow attestation, exact digest in cloud, SBOM/signature policy, non-root/capability config and SLO after a controlled rollback, not with command success alone.Hardened Deploy failure boundary
Scanning a mutable tag and deploying a rebuilt latest breaks traceability. A green build can still expose a privileged runtime, public port or leaked credential, so deployment policy must validate config and verify the release signature/provenance. The narrow failure to design for is granting package:write to pull requests, or rolling back to a vulnerable latest tag because the prior digest/provenance was not retained.
Accept this compromise explicitly: A full signed pipeline gives strong traceability but adds key/identity, policy, artifact retention and verifier responsibilities. The controlled check-verify source/workflow attestation, exact digest in cloud, SBOM/signature policy, non-root/capability config and SLO after a controlled rollback-also identifies the point where a different design is safer.
Exercise this failure safely: granting package:write to pull requests, or rolling back to a vulnerable latest tag because the prior digest/provenance was not retained.
How it works, step by step
Step 1 of 41. State the boundary
Write down why the workload needs this: Scanning a mutable tag and deploying a rebuilt latest breaks traceability. A green build can still expose a privileged runtime, public port or leaked credential, so deployment policy must validate config and verify the release signature/provenance.
- Intent
- Capstone
When to use it & trade-offs
What it is
This capstone builds once from a reviewed source commit, scans and generates an SBOM, signs the exact digest, pushes it to a private registry, deploys through workload identity to a cloud runtime, verifies health and supports a signed previous-digest rollback.
Why it matters: Scanning a mutable tag and deploying a rebuilt latest breaks traceability. A green build can still expose a privileged runtime, public port or leaked credential, so deployment policy must validate config and verify the release signature/provenance.
When to reach for it
- The fit is strongest for this job: build a full CI/CD path: scan, sign, push, and deploy hardened images to the cloud. Pair it with
verify source/workflow attestation, exact digest in cloud, SBOM/signature policy, non-root/capability config and SLO after a controlled rollbackin the runbook. - Production Capstone changes should make CI/CD observable through
github-actions: checkout→buildx push→syft sbom→trivy scan→cosign sign→deploy digest→health verify; rollback by previous signed digest, rather than trusting the runtime default. - Keep a rollback example for the case where granting package:write to pull requests, or rolling back to a vulnerable latest tag because the prior digest/provenance was not retained.
When to avoid or be careful
- Do not accept command success while the system can still fail by granting package:write to pull requests, or rolling back to a vulnerable latest tag because the prior digest/provenance was not retained.
- Avoid erasing Hardened Deploy protection merely to dodge this cost: “A full signed pipeline gives strong traceability but adds key/identity, policy, artifact retention and verifier responsibilities”.
- Do not replace the evidence path-
verify source/workflow attestation, exact digest in cloud, SBOM/signature policy, non-root/capability config and SLO after a controlled rollback-with a screenshot or a mutable tag.
github-actions: checkout→buildx push→syft sbom→trivy scan→cosign sign→deploy digest→health verify; rollback by previous signed digest: practical choices
Strengths: This capstone builds once from a reviewed source commit, scans and generates an SBOM, signs the exact digest, pushes it to a private registry, deploys through workload identity to a cloud runtime, verifies health and supports a signed previous-digest rollback.
Watch out: A full signed pipeline gives strong traceability but adds key/identity, policy, artifact retention and verifier responsibilities.
Strengths: It can begin with github-actions: checkout→buildx push→syft sbom→trivy scan→cosign sign→deploy digest→health verify; rollback by previous signed digest and fewer surrounding controls.
Watch out: It silently accepts granting package:write to pull requests, or rolling back to a vulnerable latest tag because the prior digest/provenance was not retained, which makes the result hard to reproduce after promotion.
Strengths: Scanning a mutable tag and deploying a rebuilt latest breaks traceability. A green build can still expose a privileged runtime, public port or leaked credential, so deployment policy must validate config and verify the release signature/provenance.
Watch out: The platform adds an ownership and debugging layer; retain verify source/workflow attestation, exact digest in cloud, SBOM/signature policy, non-root/capability config and SLO after a controlled rollback as the direct check.
Interview signals & numbers to know
When this topic comes up
- github-actions: checkout→buildx push→syft sbom→trivy scan→cosign sign→deploy digest→health verify; rollback by previous signed digest
- verify source/workflow attestation, exact digest in cloud, SBOM/signature policy, non-root/capability config and SLO after a controlled rollback
- Failure signature: granting package:write to pull requests, or rolling back to a vulnerable latest tag because the prior digest/provenance was not retained
- Trade-off: A full signed pipeline gives strong traceability but adds key/identity, policy, artifact retention and verifier responsibilities.
Benchmarks & rules of thumb
- 1 source SHA
- starts the chain
- 1 exact digest
- scan, sign, deploy and rollback reference
- 5 gates
- build, scan, SBOM, sign and deploy verification
Common mistakes & follow-ups
Common interview mistakes
- Treating a successful
github-actions: checkout→buildx push→syft sbom→trivy scan→cosign sign→deploy digest→health verify; rollback by previous signed digestas proof and skippingverify source/workflow attestation, exact digest in cloud, SBOM/signature policy, non-root/capability config and SLO after a controlled rollback. - Granting package:write to pull requests, or rolling back to a vulnerable latest tag because the prior digest/provenance was not retained
- Optimizing Capstone without accepting that a full signed pipeline gives strong traceability but adds key/identity, policy, artifact retention and verifier responsibilities.
Likely interviewer follow-ups
- Why does
github-actions: checkout→buildx push→syft sbom→trivy scan→cosign sign→deploy digest→health verify; rollback by previous signed digestaddress Capstone here rather than through application code? - How would you distinguish healthy CI/CD from the failure “granting package:write to pull requests, or rolling back to a vulnerable latest tag because the prior digest/provenance was not retained” using
verify source/workflow attestation, exact digest in cloud, SBOM/signature policy, non-root/capability config and SLO after a controlled rollback? - When would this trade-off-“A full signed pipeline gives strong traceability but adds key/identity, policy, artifact retention and verifier responsibilities”-justify a different Hardened Deploy design?
github-actions: checkout→buildx push→syft sbom→trivy scan→cosign sign→deploy digest→health verify; rollback by previous signed digest-and one proof-verify source/workflow attestation, exact digest in cloud, SBOM/signature policy, non-root/capability config and SLO after a controlled rollback. Then name the boundary: granting package:write to pull requests, or rolling back to a vulnerable latest tag because the prior digest/provenance was not retained.Knowledge check
Put it into practice
Practice related interview Q&A
Apply Capstone 2: End-to-End CI/CD Pipeline Deploying Hardened Containers to Cloud with generative AI interview Q&A and hands-on practice.