1 of 15

WELCOME TO VALENCIA

2 of 15

Protect the Pipe!�

Shripad Nadgowda

Senior Technical Staff Member, IBM Research��Jim Bugwadia

Co-founder and CEO, Nirmata

A policy-based approach for securing CI/CD pipelines

3 of 15

About us

Shripad Nadgowda

  • Senior Technical Staff Member, IBM Research
  • Leading innovations around Supply Chain Security
  • Member of tag-security, tag-supply-chain-security WG

Jim Bugwadia

  • Co-founder / CEO at Nirmata
  • Kyverno Maintainer
  • Co-Chair K8s Policy WG, Multi-tenancy WG

4 of 15

Title

Revisiting the Software Supply Chain

SCM

git-client

Static Scan

SBOM Ops

Build

OCI Registry

Deploy

CICD Pipeline

Cloud Runtime

Internet

Download

Dependencies

Push/Store Built artifacts

Clone, create-pr, open-issue

5 of 15

SCM

git-client

Static Scan

SBOM Ops

Build

OCI Registry

Deploy

CICD Pipeline

Cloud Runtime

Internet

Download

Dependencies

Push/Store Built artifacts

Clone, create-pr, open-issue

  1. Can you trust the pipeline?

  • There is a growing open-source ecosystem facilitating ready-to-use CI/CD components. Can they be trusted?

3. CI/CD Pipelines have access to user credentials

Revisiting the Software Supply Chain

6 of 15

The Stack

7 of 15

Tekton

  • Cloud Native CD Building Blocks
  • Runs on Kubernetes
  • Custom Resources (CRDs)
  • Pipeline: Encodes task layout and shared resources
  • Tasks: Encodes execution logic
  • Pipelinerun/Taskrun: Encodes execution trigger properties
  • Tekton Bundle: Package & Distribute through OCI

SCM

CICD Pipeline

Cloud Runtime

  • TektonChains: Supply Chain Security in Tekton Pipelines
  • Monitors and creates attestation for TaskRuns

8 of 15

In-toto

  • Open, extensible metadata standard
  • Can be used to encode our software supply chain toolchain

  • Create and verify attestations for CI/CD resources in in-toto formats

9 of 15

Sigstore

cosign

rekor

fulcio

Artifact store

definitions

configurations

policies

images

CICD Pipeline artifacts

10 of 15

Kyverno

  • Policy engine designed for Kubernetes
  • Can validate (block or audit), mutate, generate configurations
  • Can verify OCI image metadata
  • Can verify cosign signatures
  • Can verify in-toto attestations

11 of 15

Bad things

facts

attacks

mitigations

goals

A deciduous attack tree for a subset of Tekton related security concerns

12 of 15

Policies to prevent bad things

  1. Require signed bundles
  2. Require namespaces
  3. Generate namespace defaults
  4. Require secureContext
  5. Require signed images
  6. Require vulnerability scans (in-toto attestation format)
  7. Block images with vulnerabilities
  8. Block direct task runs

13 of 15

Demo

14 of 15

Summary

  • Tekton is a powerful CI/CD solution built on Kubernetes
  • CI/CD systems need to be secured, like production workloads
  • Kyverno policies are a good fit for securing Tekton
    • Validate
    • Mutate
    • Generate
    • Verify Images

15 of 15

WELCOME TO VALENCIA