Skip to content

Switch Harden-Runner from egress-policy: audit to block in CI workflow #2302

@ytsarev

Description

@ytsarev

Summary

Many of our GitHub Actions workflows still run step-security/harden-runner in egress-policy: audit mode, which only detects
unexpected outbound connections but does not prevent them.

Given the recent aquasecurity/trivy-action supply-chain incident, we should tighten this posture and move workflows to egress- policy: block with explicit allowlists for required endpoints.

Why this matters

audit mode is useful for discovery, but it still allows compromised actions or dependencies to make outbound connections. block
mode reduces blast radius by enforcing explicit network egress rules per workflow.

Current workflows still using audit

  • .github/workflows/build.yml
  • .github/workflows/chainsaw.yaml
  • .github/workflows/changelog_pr.yaml
  • .github/workflows/codeql-analysis.yml
  • .github/workflows/curldemo.yaml
  • .github/workflows/cut_release.yaml
  • .github/workflows/fossa.yml
  • .github/workflows/gh-pages.yaml
  • .github/workflows/helm_check-values-schema.yaml
  • .github/workflows/helm_docs.yaml
  • .github/workflows/helm_publish.yaml
  • .github/workflows/helm_sign_oci.yaml
  • .github/workflows/olm_pr.yaml
  • .github/workflows/release.yaml
  • .github/workflows/terratest.yaml
  • .github/workflows/upgrade-testing.yaml

Proposed approach

  • Inventory required outbound hosts per workflow from Harden-Runner insights
  • Switch lower-risk workflows to egress-policy: block first
  • Add minimal allowed-endpoints per workflow
  • Roll the same pattern across release and publishing workflows after validation

Success criteria

  • All workflows using Harden-Runner run with egress-policy: block
  • Each workflow has an explicit allowed-endpoints list
  • No workflow remains in audit mode without a documented reason

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions