Skip to main content

DevSecOps & Software Supply Chain Security

Learning objectives
  • Explain DevSecOps as paved roads plus automated gates, mapped to NIST SSDF and OWASP SAMM
  • Place SAST, SCA, secret, IaC and image scanning, DAST and fuzzing at the right pipeline stage, with severity SLAs and expiring exceptions
  • Design a supply chain with SBOMs, SLSA provenance, Sigstore signatures and verification at admission
  • Harden CI/CD: least-privilege tokens, OIDC federation, SHA-pinned actions, safe triggers, isolated runners
  • Explain what PCI DSS v4.0.1, EU DORA, the EU CRA and SBV circulars expect from a delivery pipeline

TL;DR​

  • DevSecOps = secure defaults that make the safe path the easy one (paved roads) plus fast automated gates that block only on high-confidence, high-impact findings. A review at the end is a bottleneck, not a control.
  • Each control where it is cheapest: secrets at commit; diff-aware SAST, reachability-aware SCA (govulncheck) and IaC policy on the PR; image scan, SBOM, signing and provenance at build; signature checks at admission; DAST, runtime detection and rescans after deploy.
  • Findings need a process: triage by exploitation, reachability and exposure; an SLA per severity; exceptions with an owner and an expiry.
  • Attackers have hit every link: a build server (SolarWinds, 2020), a library (Log4Shell, 2021), a maintainer (xz-utils, 2024), CI actions (tj-actions, 2025; Trivy, 2026), a registry (Shai-Hulud, 2025).
  • Supply-chain kit: SBOM (what you ship), SLSA provenance (how it was built), Sigstore signatures tied to the CI identity, and admission that refuses anything else.
  • The pipeline is production with admin rights: permissions: {} by default, OIDC instead of cloud keys, SHA-pinned actions, no untrusted code under pull_request_target, ephemeral runners.
  • Regulators want evidence: PCI DSS v4.0.1, EU DORA (from 17 January 2025), the EU CRA (reporting from 11 September 2026), SBV Circulars 09/2020 and 50/2024, Vietnam's 2025 Cybersecurity Law.

Why it matters​

A bank's CI/CD system can change the code that moves money, so it is as privileged as a database administrator and usually less watched. An attacker who controls a build step does not need to break TLS or authorization: they ship their code with your signature on it. E-commerce adds speed pressure — gates that take 40 minutes or fail on noise get bypassed within a month. And auditors now ask, for a given production change, to see the review, the scans, the approval and the exact artifact deployed.

General CI/CD design and the DORA delivery metrics are on DevOps, CI/CD & Platform Engineering; identity, encryption, secrets engines and STRIDE are on Security for Architects.

Core concepts​

Paved roads plus gates​

Paved roads are secure defaults: a service template with auth middleware and log redaction, a distroless base image, a shared CI workflow with scanners built in, Terraform modules such as "encrypted Postgres in a private subnet". Gates are automated checks that block a merge, release or deploy; they must be fast, deterministic, owned, and say how to fix the failure. The security team runs both as a platform, with security champions in product teams, rather than acting as a review queue.

FrameworkStatus (as of 2026)Use it for
NIST SSDF (SP 800-218)v1.1 (2022) final; Rev. 1 (SSDF v1.2) an initial public draft since 17 December 2025 — verify. Groups: Prepare the Organization, Protect the Software, Produce Well-Secured Software, Respond to VulnerabilitiesWhat to do: map each control and its evidence to an SSDF task
OWASP SAMM v25 business functions (Governance, Design, Implementation, Verification, Operations), 15 practices, maturity scoresHow well you do it, and a 12–18-month roadmap

Threat modelling in design reviews​

STRIDE and data-flow diagrams are on Security for Architects. Make them routine: threat-model when a design adds a trust boundary, a new data class (card data, national ID, biometrics) or a new way to move money; spend 60–90 minutes with the architect, two engineers and a security champion; turn mitigations into tickets linked from the ADR. Write abuse cases next to use cases:

Abuse caseExampleControl
Amount tamperingAmount changed between quote and captureServer-side price; compare captured with authorised amount
Callback forgeryReplayed "payment succeeded" webhookSignature and timestamp check, idempotency key, status lookup at the PSP
Refund redirectionRefund to a different card or accountOriginal instrument only; maker-checker above a threshold
Pipeline abuseA merged change quietly disables maker-checkerCODEOWNERS on sensitive paths, required review, signed releases

The last row is this page's subject: threat-model the pipeline itself, whose trust boundaries are fork PR → runner, runner → secrets, runner → registry, registry → cluster.

Pipeline controls and where each runs​

ControlTools (examples)Blocks on
Secret scanninggitleaks, GitHub push protectionAny verified secret (then rotate it: Git history keeps it)
SASTSemgrep, CodeQL, gosecNew high-confidence findings in changed code
SCA with reachabilitygovulncheck, osv-scannerA reachable vulnerability that has a fix
IaC policyCheckov, Trivy, Conftest/OPAPublic bucket, unencrypted storage, open security group
Image scanningTrivy, GrypeFixable critical or high in the final image
DASTZAP, OpenAPI-driven scannersConfirmed high-risk findings, in staging only
FuzzingGo native fuzzing, ClusterFuzzLiteNew crashers in parsers: amounts, ISO 8583/20022, webhooks

Keep blocking PR checks to roughly 10 minutes (a rough target); slow full scans run nightly and open tickets. On legacy code, block only on new findings, and tune or remove any rule that is always suppressed. govulncheck uses the Go vulnerability database (OSV format) with call-graph analysis, so it reports only vulnerabilities your code can reach; it also scans binaries (-mode binary) and emits SARIF or OpenVEX. It cannot see OS packages, so still scan the image.

Severity, false positives and exceptions​

CVSS says how bad a flaw could be, not how likely it is to hurt you. Triage on exploitation (CISA KEV list, EPSS), reachability and exposure. An example policy — set yours with the risk team; PCI DSS 6.3.3 requires critical patches within one month:

After triageFix withinExample
Critical: exploited, or reachable on an internet-facing or PCI system7 daysLog4Shell-class RCE in the payment API
Critical or high, not exposed30 daysReachable flaw in a reconciliation job
Medium90 daysDoS needing an authenticated session
Low or unreachableNext dependency refreshVulnerable function never called

False positives are settled in code review: an inline suppression with a reason (gosec: // #nosec G404 -- jitter only) or a VEX "not affected" statement every scanner reads. Exceptions — real risk accepted for now — need an owner who is not the developer, a compensating control and an expiry after which the build fails again:

# .trivyignore.yaml — every entry carries a reason, a ticket and an expiry date
vulnerabilities:
- id: CVE-2026-00000 # placeholder ID
statement: Not reachable; parser used only by the admin CLI. SEC-1234, owner payments-lead
expired_at: 2026-12-31

Software supply chain​

IncidentWhenWhat happenedLesson
SolarWinds (SUNBURST)Disclosed December 2020A build-server implant (SUNSPOT) swapped a source file during Orion builds; the result was signed and shipped to up to ≈18,000 customers (fewer than 100 actually hacked, per SolarWinds)A signature proves who built it, not what went in: isolated builds and provenance
Log4Shell (CVE-2021-44228)9 December 2021JNDI lookups in Log4j 2 gave remote code execution from any logged string, in a near-universal transitive dependencyAn SBOM inventory finds every affected service in hours
xz-utils (CVE-2024-3094)29 March 2024A maintainer trusted for years shipped an sshd backdoor in release tarballs 5.6.0 and 5.6.1; the trigger was not in GitBuild from source, not tarballs; source provenance
tj-actions/changed-files (CVE-2025-30066)14–15 March 2025Tags repointed to a commit that dumped CI secrets into logs (≈23,000 repositories used it), via an earlier reviewdog/action-setup compromise (CVE-2025-30154)Pin actions by SHA; no long-lived CI secrets
Shai-Hulud npm wormSeptember 2025, second wave November 2025Stolen maintainer tokens published infected versions of their other packages (500+ in the first wave, per CISA)Lockfiles, npm ci --ignore-scripts, upgrade cooldowns, phishing-resistant MFA
TrivyMarch 2026The scanner's own actions (75 of 76 trivy-action tags, per Wiz) and a release binary became credential stealersSecurity tools are dependencies: pin, verify, give scanners no secrets

SBOM: what you ship​

Two formats (as of 2026): SPDX (Linux Foundation; 3.0.1 current, 2.3 still common, SPDX 2.2.1 is ISO/IEC 5962:2021) and CycloneDX (OWASP; 1.7 from October 2025, standardised as ECMA-424). Generate it from the final image, where the OS packages and the module list embedded in the Go binary live; attach it to the digest as a signed attestation; load it into an inventory such as OWASP Dependency-Track so "are we affected by CVE-X?" is a query. It is natural evidence for PCI DSS 6.3.2 (component inventory).

SLSA: how it was built​

SLSA v1.2 (approved November 2025):

TrackLevelsProtects against
BuildL1 provenance exists · L2 signed provenance from a hosted build platform · L3 hardened build platformL2: tampering after the build. L3: tampering during it (isolated runs, signing keys out of reach of build steps)
Source (new in v1.2)L1 version controlled · L2 history and provenance · L3 continuous technical controls · L4 two-party reviewTampering between developer and the revision the build uses

GitHub artifact attestations give Build L2; GitHub documents L3 via a shared reusable workflow. Provenance is one kind of in-toto attestation: a signed statement that artifact digest X was built by builder B from commit C. SBOMs and scan results attach to the same digest with their own predicate types.

Sigstore keyless signing and admission​

  • Fulcio binds an ephemeral key to the CI's OIDC identity with a 10-minute certificate; Rekor, an append-only transparency log, proves the signature was made while it was valid. Rekor v2 reached GA and cosign v3 shipped in October 2025.
  • Verify the exact identity — release.yml on refs/heads/main in bank/payments-api, issuer https://token.actions.githubusercontent.com. An issuer-only check accepts any GitHub workflow in the world.
  • Bank caveat: public-good Rekor entries are public and expose repository and workflow names. Alternatives: a private Sigstore deployment, or a KMS-held key (cosign sign --key awskms://…).
  • Enforce at admission with Kyverno (ImageValidatingPolicy), the Sigstore policy-controller, or OPA Gatekeeper with Ratify. Start in audit mode, then enforce, with an audited, time-limited break-glass path. Signing without verifying is theatre.

Dependencies: pinning, mirrors, confusion​

  • Pin and lock: commit go.sum and lockfiles; base images by digest, actions by SHA. Renovate or Dependabot propose upgrades, ideally after a cooldown of a few days so a hijacked release is caught first (Renovate minimumReleaseAge, Dependabot cooldown — check your tool).
  • Private proxy (Artifactory, Nexus, Athens): builds fetch only through it, so you can block packages, survive upstream deletions and audit downloads. In Go: GOPROXY to the proxy, internal modules in GOPRIVATE, the public checksum database on for the rest.
  • Dependency confusion (Alex Birsan, February 2021): an internal package name published publicly with a higher version wins in misconfigured clients. Use scoped names and one private feed that proxies public registries. Go's domain-based paths make this rare, but not typosquatting — see Reviewing AI Code & CI Guardrails for the allowlist gate.

CI/CD hardening​

RiskControl
Over-privileged GITHUB_TOKENpermissions: {} at workflow level, grants per job; org default read-only
Cloud keys stored in CIOIDC federation: a short-lived token exchanged for cloud credentials; the trust policy pins aud and sub (repository plus branch or environment). New GitHub repositories get immutable IDs in sub from 15 July 2026 (as of 2026 — verify)
Hijacked action tagsFull commit SHAs, enforced by the allowed-actions policy (since August 2025); the workflow lockfile .github/workflows/actions.lock (public preview as of 2026) pins transitive actions too
"Pwn requests"Never run fork PR code under pull_request_target (it has secrets and a write token); use pull_request plus a separate workflow_run, and persist-credentials: false
Script injectionPass github.event.* text (PR titles, branch names) through env:, never inline in run:
RunnersEphemeral, one job each; no self-hosted runners on public repositories; egress allowlists for deploy jobs
One person ships aloneRulesets with required reviews, CODEOWNERS and checks, no bypass; a deploy environment with required reviewers

Secrets in the delivery path​

Secrets engines are on Security for Architects. In the pipeline, CI holds no cloud keys and deploy credentials are scoped to a protected environment. Workloads use workload identity to read from Vault or a cloud secret manager, via External Secrets Operator or the Secrets Store CSI driver, with Kubernetes Secrets encrypted at rest by a cloud KMS key; prefer dynamic credentials, or two valid ones during rotation. Never put secrets in images or build arguments (ARG and ENV stay in image history; use BuildKit secret mounts) or logs. Log masking is not a control: the tj-actions payload printed secrets into public logs.

Runtime: shield right​

  • Policy as code: Pod Security Admission restricted plus Kyverno or ValidatingAdmissionPolicy rules and default-deny network policies (hardening details on Linux Containers: Namespaces & cgroups).
  • eBPF detection: Falco alerts on a shell in a payment container, writes under /usr/bin or unexpected egress.
  • Web and payment pages: PCI DSS 6.4.2 wants automated attack protection for public web apps; 6.4.3 an inventory of payment-page scripts, each justified, authorised and integrity-checked (CSP, SRI); 11.6.1 tamper detection on those pages, at least weekly or per a targeted risk analysis (check the wording).
  • After deploy: rescan running images against the SBOM inventory, rebuild base images on a schedule, and drill "new Log4Shell": time to find every affected service, and to patch them.

Regulation and audit lens (as of 2026)​

Not legal advice

A starting point for your compliance team. Verify every point against the official text.

RegulationStatus (as of 2026)Pipeline relevance
PCI DSS v4.0.1Published June 2024; the 51 future-dated requirements mandatory since 31 March 2025Code review before release (6.2.3), component inventory (6.3.2), critical patches within one month (6.3.3), web attack protection (6.4.2), payment-page scripts (6.4.3), tamper detection (11.6.1). The January 2025 SAQ A revision dropped 6.4.3/11.6.1 for a new eligibility criterion; the standard keeps them
EU DORA (Regulation (EU) 2022/2554)Applies from 17 January 2025ICT risk and change management, incident reporting, resilience testing, an ICT third-party register (your CI SaaS and code host belong in it). Not the DORA metrics
EU CRA (Regulation (EU) 2024/2847)In force 10 December 2024; reporting from 11 September 2026; full application 11 December 2027Software sold in the EU: report actively exploited vulnerabilities (24-hour early warning); from 2027, vulnerability handling with an SBOM
Circular 09/2020/TT-NHNN (banking IS security)In force since 1 January 2021; amended by Circular 50/2024Systems classified levels 1–5. Level 3+ or customer personal data: production separate from dev/test, no dev tools in production, security testing before go-live. Masked test data, approved changes with rollback, yearly penetration tests for levels 3–4 and internet-facing systems
Circular 50/2024/TT-NHNN (online banking security)In force 1 January 2025, some clauses phased to July 2026; amended by Circular 77/2025 (from 1 March 2026)Source-code control, pre-go-live vulnerability scanning, WAF, anti-tampering for mobile apps. Summaries of Circular 77 add OWASP web and mobile standards and three-monthly app version assessments — verify
Cybersecurity Law 2025 (Law 116/2025/QH15)Passed 10 December 2025, in force 1 July 2026Merges the 2018 Cybersecurity Law and the 2015 Law on Network Information Security; check implementing decrees

Per sampled change, an auditor wants the ticket, the PR with approvals (maker ≠ checker), CI and scan results, the SBOM, signature and provenance of the deployed digest, and open exceptions. Store them against the digest and the sample becomes a query (see Compliance: PCI DSS, KYC/AML, Data Protection).

Trade-offs​

OptionStrengthsWeaknessesChoose when
Blocking PR gatesFixed while context is freshNoise trains people to bypassSecrets, reachable critical CVEs, IaC policy
Advisory plus nightly scansNo merge frictionFindings pile up without SLAsSlow or noisy scanners, legacy backlog
Reachability SCAFar fewer false positivesGo only; misses OS packagesGo services, plus image scanning
Public-good SigstoreNo keys to manageRepository names publishedOpen source, or where policy allows
Private Sigstore or KMS keysMetadata stays privateYou operate it or rotate keysBanks with private repositories
Admission enforceUnsigned images cannot runA broken policy blocks deploysAfter audit mode, with break-glass
Private proxy plus allowlistBlocks confused and unknown packagesFriction; proxy is criticalPCI scope, regulated estates

In practice​

The release workflow below scans, generates an SBOM, signs and attests the image with keyless cosign, and records provenance. Every SHA is an obvious placeholder (1111…, 2222…); replace each with the full commit SHA of the release you reviewed. Versions are illustrative. PR checks run in a workflow like templates/ai-workflow/dot-github/workflows/ci.yml.

# .github/workflows/release.yml — every SHA below is a PLACEHOLDER: replace it with the full
# commit SHA of the release you reviewed. Versions are illustrative.
name: release

on:
push:
branches: [main]

permissions: {} # nothing by default; each job asks for what it needs

jobs:
verify:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@1111111111111111111111111111111111111111 # placeholder SHA
with:
persist-credentials: false
- uses: actions/setup-go@2222222222222222222222222222222222222222 # placeholder SHA
with:
go-version-file: go.mod
- name: govulncheck (reachable vulnerabilities only)
run: |
go install golang.org/x/vuln/cmd/govulncheck@v1.1.4 # illustrative pin
govulncheck ./...
- run: go test -race -count=1 ./...

build-sign:
needs: verify
runs-on: ubuntu-latest
environment: release # protected: main only, required reviewers
permissions:
contents: read
id-token: write # OIDC for AWS and for Sigstore keyless signing
attestations: write # SLSA provenance via GitHub artifact attestations
env:
IMAGE: 123456789012.dkr.ecr.ap-southeast-1.amazonaws.com/payments-api
steps:
- uses: actions/checkout@1111111111111111111111111111111111111111 # placeholder SHA
with:
persist-credentials: false
- uses: aws-actions/configure-aws-credentials@3333333333333333333333333333333333333333 # placeholder SHA
with:
role-to-assume: arn:aws:iam::123456789012:role/gha-payments-api-release
aws-region: ap-southeast-1
- uses: aws-actions/amazon-ecr-login@4444444444444444444444444444444444444444 # placeholder SHA
- uses: docker/setup-buildx-action@5555555555555555555555555555555555555555 # placeholder SHA
- id: build
uses: docker/build-push-action@6666666666666666666666666666666666666666 # placeholder SHA
with:
push: true
tags: ${{ env.IMAGE }}:${{ github.sha }}
# trivy-action tags were force-pushed to malware in March 2026: pin the SHA and the Trivy version.
- name: scan image
uses: aquasecurity/trivy-action@7777777777777777777777777777777777777777 # placeholder SHA
with:
image-ref: ${{ env.IMAGE }}@${{ steps.build.outputs.digest }}
severity: HIGH,CRITICAL
ignore-unfixed: true
exit-code: '1'
trivyignores: .trivyignore.yaml
- name: SBOM from the final image
uses: aquasecurity/trivy-action@7777777777777777777777777777777777777777 # placeholder SHA
with:
image-ref: ${{ env.IMAGE }}@${{ steps.build.outputs.digest }}
format: cyclonedx
output: sbom.cdx.json
- uses: sigstore/cosign-installer@8888888888888888888888888888888888888888 # placeholder SHA
- name: sign and attest (keyless, recorded in Rekor)
env:
REF: ${{ env.IMAGE }}@${{ steps.build.outputs.digest }}
run: |
cosign sign --yes "$REF"
cosign attest --yes --type cyclonedx --predicate sbom.cdx.json "$REF"
- uses: actions/attest@9999999999999999999999999999999999999999 # placeholder SHA
with:
subject-name: ${{ env.IMAGE }}
subject-digest: ${{ steps.build.outputs.digest }}
push-to-registry: true

The signature is the gate: a failed scan stops the job before cosign sign, and admission refuses unsigned images. One OIDC token serves both AWS and Fulcio, so the repository holds no long-lived credentials. The matching Kyverno sketch (ImageValidatingPolicy, policies.kyverno.io/v1, which replaces legacy verifyImages rules as of 2026 — check field names for your version):

# Pods in PCI-scoped namespaces run payments images only if the release workflow on main signed
# them and a signed CycloneDX SBOM is attached. Start with [Audit], then switch to [Deny].
apiVersion: policies.kyverno.io/v1
kind: ImageValidatingPolicy
metadata:
name: payments-images-signed
spec:
validationActions: [Deny]
matchConstraints:
resourceRules:
- apiGroups: ['']
apiVersions: ['v1']
operations: ['CREATE', 'UPDATE']
resources: ['pods']
namespaceSelector:
matchLabels:
pci-scope: 'true'
matchImageReferences:
- glob: '123456789012.dkr.ecr.ap-southeast-1.amazonaws.com/payments-*'
validationConfigurations:
required: true
mutateDigest: true
verifyDigest: true
attestors:
- name: release
cosign:
keyless:
identities:
- subject: 'https://github.com/bank/payments-api/.github/workflows/release.yml@refs/heads/main'
issuer: 'https://token.actions.githubusercontent.com'
ctlog:
url: 'https://rekor.sigstore.dev'
attestations:
- name: sbom
intoto:
type: https://cyclonedx.org/bom
validations:
- expression: >-
images.containers.map(image, verifyImageSignatures(image, [attestors.release])).all(e, e > 0)
message: image is not signed by the payments-api release workflow on main
- expression: >-
images.containers.map(image, verifyAttestationSignatures(image, attestations.sbom, [attestors.release])).all(e, e > 0)
message: image has no signed CycloneDX SBOM attestation

Rollout order: secret scanning and SHA pinning first (cheap, few false positives); then OIDC, deleting stored keys; scanners advisory for a month, then blocking; signing on every release; admission in audit, then enforced for PCI namespaces first.

Common pitfalls​

  • Gates nobody trusts. Symptom: continue-on-error: true creeps in; scanners run but nothing blocks.
  • Mutable references. Symptom: an action or base image changes under you via @v4 or :latest — how CI secrets were stolen in 2025 and 2026.
  • Signing without verifying, or issuer-only checks. Symptom: admission stays in audit for ever, or accepts any GitHub workflow's signature.
  • SBOMs as shelfware. Symptom: no inventory, so the next Log4Shell still takes two weeks to scope.
  • Scanning only at build. Symptom: production runs months-old criticals because nothing rebuilt the images.
  • Permanent exceptions. Symptom: an ignore file with hundreds of entries and no owners or dates.
  • Over-privileged security tools. Symptom: the scan job holds deploy credentials.

Interview angle​

  • Prompts: "Secure the CI/CD pipeline of a payments platform." "A new Log4Shell drops on Friday evening — what happens?" "How do you know production runs the reviewed image?" "Security wants twelve scanners; developers say the pipeline is too slow."
  • Strong answer: threat-model the pipeline; paved roads plus a few high-confidence gates; reachability SCA and image scans; SBOM inventory; provenance and keyless signing verified at admission against the workflow identity; OIDC, SHA pins, least-privilege tokens; SLAs with expiring exceptions; evidence mapped to PCI DSS and SBV rules.
  • Follow-ups: "What does a signature not prove?" (clean source and build). "Critical CVE with no fix?" "Admission blocks a 2 a.m. hotfix?" "Public Rekor for private repositories?"
  • Red flags: "we pentest before go-live" as the whole answer; scanners without owners; tag pinning; cloud keys in CI; confusing EU DORA with the DORA metrics.

Self-check​

1. Why do you need both paved roads and gates?

Roads without gates drift, because nothing stops a team leaving them; gates without roads fail constantly and get bypassed. With both, most teams pass the gates by staying on the road.

2. Why is govulncheck less noisy than a manifest scanner, and what must you still scan?

It reports only vulnerabilities in functions your code can reach (call-graph analysis), not everything in go.sum. It cannot see OS packages or non-Go components, so you still scan the final image.

3. Scenario: a critical CVE hits a library in your internet-facing payment API and no fix exists. What do you do?

Check reachability and exploitation (KEV, EPSS). If exposed: a compensating control (WAF rule, feature off, egress block), a time-boxed exception with an accountable owner, the SBOM inventory to find every affected service, monitoring, and a patch when a fix ships. If unreachable: a VEX "not affected" statement.

4. What does SLSA Build L3 add over L2?

L2 is signed provenance from a hosted platform, catching tampering after the build. L3 requires a hardened platform — isolated runs, signing material out of reach of build steps — so a malicious step cannot forge provenance: the SolarWinds class of attack.

5. Walk through keyless signing and what admission must check.

The CI job sends its OIDC token and an ephemeral public key to Fulcio, gets a 10-minute certificate, signs the digest, logs it in Rekor and discards the key. Admission checks the chain, the issuer, the exact subject (repository, workflow, branch), the log proof and required attestations, and requires digests.

6. Why is pull_request_target dangerous?

It runs with the base repository's secrets and a write token even for fork PRs, so building the PR's code hands them to the attacker's build scripts. Run untrusted code under pull_request and privileged steps in a separate workflow_run.

7. Scenario: a Vietnamese bank's auditor samples one production change. What does the pipeline provide?

Ticket, PR with a non-author approval, CI and scan results, SBOM, signature and provenance of the deployed digest, and exceptions. That supports Circular 09/2020 change management and pre-go-live testing, Circular 50/2024 source-code control and scanning, and PCI DSS 6.2.3 and 6.3.2 in card scope.

🧠 Flashcards0/9 learned · 0 retries

Exercise​

Harden a release pipeline for a sample Go service:

  1. Threat-model the pipeline from fork PR to running pod: at least eight threats with controls and owners.
  2. Adapt the release workflow in a test repository with real SHAs, OIDC to a cloud sandbox (or GHCR with packages: write), signing, SBOM attestation and provenance.
  3. Install Kyverno in kind; apply the policy in Audit, then Deny.
  4. Deploy (a) the signed image by digest, (b) an unsigned image, (c) one signed from a feature branch, (d) one without an SBOM attestation.
  5. Add a dependency with a known vulnerability from vuln.go.dev; show govulncheck fails only once your code calls the vulnerable function; record an expiring exception.

Done when: only (a) is admitted, with Kyverno's denial messages captured; cosign verify and gh attestation verify pass; no long-lived cloud credentials remain in repository settings; and a one-page evidence pack for one release maps each item to a PCI DSS or SBV requirement.

Further reading​

Finished this page?

Do the self-check first. Marking it complete schedules spaced reviews (1, 3, 7, 14, 30… days).