π― Workshop Overview
βSecure code is not enough. You must also secure the PATH from source to runtime β and prove what arrived is what you built.β
This is Workshop 3 of 4 in the Agentic DevSecOps series. A hands-on workshop (30β45 min, 3 exercises) for DevSecOps engineers who need to eliminate credential theft, prove artifact provenance, and trace runtime vulnerabilities back to their source commit β using OIDC, GitHub artifact attestations, and Microsoft Defender for Cloud.
| Β | Workshop | Focus |
|---|---|---|
| π‘οΈ | WS1 β Trust Boundary & Platform Trust | WHERE does development happen? |
| π | WS2 β Secure by Design Guardrails | WHAT prevents bad code from landing? |
| π | WS3 β Supply Chain Integrity & Code-to-Cloud Visibility (YOU ARE HERE) | HOW do we trust the delivery path? |
| π | WS4 β Operational Response & Continuous Improvement | WHAT happens when things go wrong? |
π Learning Objectives
By the end of this workshop, you will be able to:
- Explain why supply chain integrity requires controls beyond code scanning β protecting the delivery path, not just the code
- Replace long-lived deployment secrets with OIDC federated credentials, eliminating an entire class of credential-theft attacks
- Sign build artifacts with attestations and verify provenance from the consumer side using
gh attestation verify - Trace a runtime vulnerability back through the delivery chain to its source commit using Microsoft Defender for Cloudβs code-to-runtime correlation
- Update the threat model with supply chain controls (OIDC for credential theft, attestation for artifact tampering)
ποΈ NIST SP 800-204D Alignment
This workshop focuses on PS β Protect the Software: ensuring that all forms of the software are protected from unauthorized access and tampering.
| NIST SSDF Practice Group | WS1 | WS2 | WS3 | WS4 |
|---|---|---|---|---|
| PO β Prepare the Organization | β Core | β | β | β |
| PS β Protect the Software | β | β | β Core | β |
| PW β Produce Well-Secured Software | β | β Core | β | β |
| RV β Respond to Vulnerabilities | β | β | β | β Core |
| Attribute | Value |
|---|---|
| Thesis | βSecure code is not enough. Secure the PATH from source to runtime β and prove what arrived is what you built.β |
| Driving Question | βHOW do we trust the delivery path β and can we trace from runtime back to source?β |
| Key Insight | βVisibility without integrity is weak. Integrity without runtime context is slow. You need both.β |
| NIST SSDF Group | PS β Protect the Software |
| Duration | 30β45 minutes |
| Exercises | 3 |
π Curriculum
| Step | Title | Duration |
|---|---|---|
| Setup | Environment Setup | ~15 min |
| 1 | OIDC & Credential-Free Deployment | ~12 min |
| 2 | Artifact Attestation & Provenance | ~12 min |
| 3 | Code-to-Runtime Correlation | ~12 min |
| Exercise | Title | Goal | Unique Focus |
|---|---|---|---|
| 1 | OIDC & Credential-Free Deployment | Eliminate credential theft as an attack class | Before/after OIDC comparison, token exchange verification |
| 2 | Artifact Attestation & Provenance | Prove what was built, where, and from what source | Sign artifact, consumer-side gh attestation verify |
| 3 | Code-to-Runtime Correlation | Trace a runtime issue back to its source commit | Defender for Cloud: Runtime β Registry β Pipeline β Source |
π¬ Discussion Prompts
-
Blast Radius of OIDC Misconfiguration β If your OIDC federated credential configuration is compromised (e.g., wildcard subject claim), whatβs the blast radius? How does this compare to a leaked static secret? How would you recover?
-
Pipeline Integrity Beyond Credentials β NIST SP 800-204D calls for CI/CD pipeline integrity verification. We secured credentials (OIDC) and artifacts (attestation). What other pipeline steps could be compromised? (Think: build dependencies, runner images, action versions.)
-
Attestation for Auditors β How would you explain artifact attestation to a non-technical auditor? What evidence would you show them to prove a production deployment matches a reviewed PR?
-
Scaling OIDC Across the Organization β Your team has 200 repositories deploying to 5 cloud environments. How would you roll out OIDC at scale? What governance controls would you put in place to manage federated credential configurations?
π Optional Extensions
Extension A: Copilot Pipeline Updates
Can GitHub Copilot help update CI/CD infrastructure?
- Open the
Dockerfilein VS Code with Copilot enabled - Ask Copilot: βUpdate this Dockerfile to use a more secure base image with minimal attack surfaceβ
- Ask Copilot: βAdd a health check to this Dockerfileβ
- Review the suggestions β does Copilot understand supply chain implications of base image selection?
Extension B: Attestation as Compliance Evidence
Export attestation data for auditor submission:
gh attestation verify oci://${ACR_NAME}.azurecr.io/supply-chain-demo:latest \
--owner {owner} \
--format json > attestation-evidence.json
cat attestation-evidence.json | jq '{
buildTimestamp: .verificationResult.statement.metadata.buildFinishedOn,
sourceRepo: .verificationResult.statement.invocation.configSource.uri,
sourceCommit: .verificationResult.statement.materials[0].digest,
builder: .verificationResult.statement.builder.id
}'
Extension C: Multi-Registry Provenance
Test attestation verification across different container registries:
- Push the same image to a second registry (e.g., GitHub Container Registry)
- Verify attestation works from both registries
- Discuss: How does registry choice affect supply chain trust?
Extension D: Tampering Deep-Dive
Explore additional tampering scenarios:
- Modify a workflow file to inject an extra build step β does attestation still pass? (Yes β but the provenance metadata changes)
- Pin action versions vs. using
@mainβ whatβs the supply chain risk? - Discuss: What would a comprehensive pipeline integrity policy look like?
π References
| Resource | Link |
|---|---|
| GitHub Docs: Actions OIDC | Configuring OpenID Connect in Azure |
| GitHub Docs: Artifact Attestations | Using artifact attestations |
GitHub Docs: gh attestation verify |
Verifying artifact attestations with the GitHub CLI |
GitHub Actions: actions/attest-build-provenance |
attest-build-provenance action |
| NIST SP 800-218 (SSDF) | Secure Software Development Framework β PS group |
| NIST SP 800-204D | Strategies for Integration of Software Supply Chain Security in DevSecOps CI/CD Pipelines |
| Microsoft Learn: Defender for Cloud | Code-to-cloud security with Defender for Cloud |
| Microsoft Learn: Defender + GHAS | Connect GitHub repositories to Defender for Cloud |
| Azure Docs: Workload Identity Federation | Workload identity federation for GitHub Actions |