Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 2.07 KB

File metadata and controls

38 lines (27 loc) · 2.07 KB

GitHub Actions Security Policy

The purpose of this policy is to establish mandatory security requirements while using GitHub Actions in workflow files across all repositories under all Kubernetes github organizations.

All GitHub Actions MUST be referenced using commit SHA hashes.

# REQUIRED - Pin to commit SHA
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11  # v4.1.1

# PROHIBITED - Mutable references
uses: actions/checkout@v4        # Tags can be force-pushed
uses: actions/checkout@main      # Branches move
uses: actions/checkout@master    # Branches move
uses: actions/checkout@latest    # Undefined reference

Rationale

Mutable references such as latest, tags, branches (like master, main), can be force-updated to point to different commits. An attacker who compromises an action's repository can inject malicious code by modifying what these references point to, creating supply chain vulnerabilities.

Commit SHA hashes are cryptographically immutable and cannot be changed, preventing such attacks.

Recent incidents demonstrate the risks of mutable references:

Additional context:

Requirements

  1. All uses: statements in workflow files MUST reference actions using 40-character commit SHA hashes
  2. New workflows MUST comply before merge
  3. Existing workflows MUST be updated to comply
  4. Repositories SHOULD enable Dependabot for GitHub Actions to automatically update SHA-pinned actions to newer versions