Skip to content

Back to the catalog

CNCF Security Best Practices
contribute.cncf.ioarticle

CNCF Security Best Practices

CNCF's official "Security Guidelines for New Projects" walks maintainers of sandbox/early-maturity CNCF projects through concrete hardening steps: RBAC and MFA on code repos, branch protection with mandatory PR review counts and CODEOWNERS, commit signing, GitHub secret/code scanning, Dependabot for vulnerable dependencies, self-assessment, SECURITY.md content (security contacts, vulnerability reporting, embargo policy, incident response process), and adopting the OpenSSF Best Practices badge and OpenSSF Scorecards. It's built on TAG Security's Cloud Native Security Whitepaper and Software Supply Chain Security Best Practices Whitepaper, and links to reusable templates (issue template, self-assessment, security contacts, embargo policy, incident response).

TL;DR CNCF's checklist and templates for securing a new open-source project's repo, docs, and incident response process, tied to OpenSSF badging and Scorecards.
Document

What it is

The reviewable specifics behind CNCF's "Security Guidelines for New Projects" — the concrete thresholds and fallbacks the summary lists only by category. The page is a checklist-style guide for securing a project's GitHub (or equivalent) source repository.

What to do

The page states specific, testable rules rather than generalities:

  • Authentication tiers. Use password-protected SSH keys or a personal access token (PAT). Plain passwords are acceptable only for non-code-intensive projects that genuinely need browser access to GitHub.com and cannot use the recommended methods — and then only unique, complex ones.
  • 2FA/MFA is required, not merely recommended, especially for privileged accounts.
  • Review policy: every change goes through a pull request. The default bar is two independent reviewers, at least one with write access to the branch (preferably a maintainer), neither the requester. Explicit fallback: small teams may require a single reviewer. Large codebases should add a CODEOWNERS file to auto-request reviews.
  • RBAC by least privilege, mapping GitHub's Owner/Maintainer/Developer/Reviewer/Approver/Guest roles to fine-grained permissions.
  • Branch protection should be configured explicitly for: who can push, whether force-push is allowed, whether merges require checks, and whether branch deletion is permitted.

The five categories to work through are: securing code repositories, self-assessment, SECURITY.md, incident management, and badging.

Caveats

The guide states its own boundary: secure device management is assumed — "if you have a remote access trojan on your laptop, many of these countermeasures are subverted." The repository controls do not address endpoint compromise.

Scope is deliberately narrow: these are minimum measures aimed at sandbox / early-maturity projects, meant to be built on incrementally as maturity grows — not a complete security program. GitHub is used only as the reference SCM; the guidance is presented as portable to any source-control service. Tooling to implement these is deferred to the CNCF Cloud Native Security Map.

The two-reviewer rule is the one decision point worth flagging to your team:

flowchart TD
    PR[Pull request opened] --> Q{Team size?}
    Q -->|Small team| One[1 independent reviewer]
    Q -->|Normal| Two[2 independent reviewers,<br/>≥1 with write access]
    Q -->|Large codebase| CO[Add CODEOWNERS<br/>to auto-request review]
    One --> Merge
    Two --> Merge
    CO --> Two

Organisations named here

  • OpenSSF
  • CNCF TAG Security
  • OpenSSF Scorecards

Technologies named here

  • GitHub RBAC
  • SSH keys / Personal Access Token
  • GitHub Two Factor Authentication/Multi-factor Authentication
  • GitHub Branch Protection
  • GitHub CODEOWNERS
  • GitHub Issues
  • Commit signing
  • GitHub secret scanning
  • GitHub code scanning
  • Dependabot
  • CNCF TAG Security Self-assessment template
  • SECURITY.md
  • GitHub coordinated disclosure of security vulnerabilities
  • OpenSSF Best Practices Badge
  • OpenSSF Security Scorecards
  • CLOMonitor
  • deps.dev
  • GitHub
  • GitHub Actions
  • SSH
  • CODEOWNERS

Techniques named here

  • Role Based Access Control with least privilege
  • Strong authentication
  • Two Factor/Multi-factor Authentication
  • Branch protection policies
  • Code Owners-based automated review requests
  • Commit signing with hardware token key storage
  • Secret scanning in CI
  • Code scanning to shift security testing left
  • Vulnerability reporting policy
  • Embargo policy for coordinated vulnerability disclosure
  • Incident response process
  • GPG key encryption of vulnerability reports