Skip to content
s1ns3nz0 | Known Unknowns
Go back

Securing Workflows in CD Pipelines

4 min read

Supply chain security measures also apply to controls during the CD process. The following are some due dilligence measures that should be used during CD. These measures can be implemented by defining verification policies for allowing or disallowing an artifact for deployment

Table of contents

Open Table of contents

DEPLOY-REQ-1

DEPLOY_REQ-2

DEPLOY_REQ-3

Using artifact attestations and reusable workflows

DEPLOY_REQ-4

Kubernets Policy Controlloer

Workflow

Container image build

Generate an immutable image digest

Scan the image identified by that digest with a vulnerability scanner

Record the scanner version, vulnerability database version, scan time, and results in JSON format

Generate and sign a vulnerability attestation

Store the image and attestation in the registry

At deployment time, verify the signature, digest, scan freshness, and vulnerability policy compliance

Allow or block the deployment

Continuously update the runtime trust status through periodic rescanning

Example

{
  "schemaVersion": "1.0",
  "scanner": {
    "name": "trivy",
    "version": "0.70.0",
    "databaseUpdatedAt": "2026-07-26T08:40:00Z",
    "binarySha256": "..."
  },
  "invocation": {
    "workflowRef": "example/platform-workflows/.github/workflows/scan-image.yml@refs/heads/main",
    "workflowSha": "...",
    "runId": "123456789"
  },
  "image": {
    "name": "ghcr.io/example/payment-service",
    "digest": "sha256:..."
  },
  "metadata": {
    "scanStartedOn": "2026-07-26T09:00:00Z",
    "scanFinishedOn": "2026-07-26T09:01:20Z"
  },
  "summary": {
    "critical": 0,
    "high": 0,
    "medium": 11,
    "low": 32,
    "unknown": 0
  },
  "policy": {
    "id": "production-container-vulnerability-v3",
    "decision": "allow"
  },
  "report": {
    "format": "trivy-json",
    "sha256": "..."
  }
}

DEPLOY_REQ-5

.github/workflows/**
.github/actions/**
ci/**
scripts/build.sh
scripts/release.sh
Makefile
Dockerfile*
docker/**
Taskfile.yml
build.gradle / pom.xml
package scripts
Packer/Terraform runner definitions
OPA/Rego policy

Share this post:

Previous Post
security requirements plugin
Next Post
Securing Workflows in CI Pipelines - Secure Code Commits