Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Patterns that Protect

Patterns that Protect

In this presentation, I explain what security and deployment patterns work when you need to protect workloads at runtime.

This version of the talk was given at the 2023 Edition of Open Source Summit North America as part of the "SupplyChainSecurityCon" track.

Kerim Satirli

May 12, 2023

More Decks by Kerim Satirli

Other Decks in Technology

Transcript

  1. Software Lifecycle developer's machine or remote / hosted IDE build

    developer's machine or build server compile build server or artifact storage store orchestration platform (Kubernetes, Nomad etc) run
  2. Software Lifecycle developer's machine or remote / hosted IDE trust

    developer's machine or build server trust build server or artifact storage trust orchestration platform (Kubernetes, Nomad etc) trust
  3. variable "actions_config" { description = "Object of GitHub Actions Configuration."

    default = { # see github.com/reviewdog/action-actionlint/releases actionlint = { owner = "reviewdog" repository = "action-actionlint" version = "v1.37.0" } # see github.com/actions/checkout/releases checkout = { owner = "actions" Building Trust into the Pipeline
  4. # get GH Release Tag Ids by polling the Releases

    Data Source data "github_release" "actions" { for_each = { for id, action in var.actions_config : id => action } repository = each.value.repository owner = each.value.owner retrieve_by = "tag" release_tag = each.value.version } Building Trust into the Pipeline
  5. # get Commitish by polling Ref data source using Tag

    Name data "github_ref" "actions" { for_each = data.github_release.actions repository = each.value.repository owner = each.value.owner ref = "tags/${each.value.release_tag}" } Building Trust into the Pipeline
  6. resource "github_actions_organization_permissions" "main" { allowed_actions = "selected" # require all

    repositories to abide by this policy enabled_repositories = "all" allowed_actions_config { github_owned_allowed = true verified_allowed = true patterns_allowed = [ for action in local.actions_config : "${action.owner}/${action.repository}@${action.sha}" ] } } Building Trust into the Pipeline
  7. task "preflight_check" { lifecycle { hook = "prestart" sidecar =

    false } driver = "docker" config { image = "workloads/preflight:sha256:7bd...171" # v0.9.0 } template { destination = "config/preflight.hcl" data = ... } } Preflight Checking