Subscribe to the Non-Human & AI Identity Journal

Why do GitHub repository defaults increase supply chain risk?

Defaults often optimise for rapid collaboration, which can leave critical controls off in new organisations and repositories. That becomes risky when pipeline identities, tokens, or admins have standing access to code and infrastructure. A compromise in one account can quickly translate into code tampering or secret exposure.

Why This Matters for Security Teams

GitHub defaults matter because they shape the starting security posture for source code, automation, and release processes. If organisation-wide settings, repository templates, and branch protections are permissive by default, teams inherit exposure before a security review ever begins. That can leave secrets, workflow permissions, and admin rights too broad for the actual risk profile. NIST guidance on baseline controls in NIST SP 800-53 Rev 5 Security and Privacy Controls remains relevant here.

The risk is not only accidental misconfiguration. Repository defaults also influence how non-human identities operate, including CI/CD tokens, GitHub Apps, deployment keys, and automation accounts. If those identities are granted standing access, a single compromised account can modify code, open a trusted pull request, or extract secrets from workflows. The OWASP Non-Human Identity Top 10 is useful because it frames these machine identities as a governance problem, not just a tooling issue. In practice, many security teams discover the weakness only after a token leak or malicious workflow change has already occurred, rather than through intentional baseline hardening.

How It Works in Practice

Repository defaults influence three core areas: who can change code, what automation can do, and what secrets are reachable during build and deployment. In mature environments, the secure path is to assume defaults are too open until proven otherwise. That means applying organisation-level templates, limiting default visibility, enforcing branch protection, and reducing workflow token permissions to the minimum required.

Practitioners should pay close attention to non-human identity governance because GitHub automation often becomes the fastest route from one compromised credential to broad environment access. A CI runner, release pipeline, or GitHub App may authenticate correctly while still having more privilege than it needs. Good practice is to separate human review rights from machine execution rights, then treat each automation identity as a distinct security principal with explicit ownership and rotation rules. NIST CSF 2.0 is helpful for mapping this to governance, protection, detection, and recovery outcomes, especially where repository settings affect incident blast radius.

  • Set repository templates so secure defaults are inherited, not recreated manually.
  • Require protected branches and code review for sensitive paths.
  • Restrict workflow permissions and avoid write access by default.
  • Inventory tokens, deploy keys, and GitHub Apps as managed non-human identities.
  • Review secrets access so automation only reaches what it needs for the job.

Security teams should also align GitHub settings with control evidence, because platform defaults can drift from policy even when formal standards are in place. That is where control mapping to baseline hardening matters, including least privilege, change control, and secure configuration. These controls tend to break down in fast-moving multi-repository environments because local exceptions accumulate faster than platform governance can absorb them.

Common Variations and Edge Cases

Tighter repository defaults often increase friction for developers and platform engineers, requiring organisations to balance speed against reduced blast radius. That tradeoff is real, especially where open source contribution, rapid prototyping, or shared infrastructure repositories are involved. Best practice is evolving, but current guidance suggests that exceptions should be explicit, time-bound, and reviewed rather than left as a permanent default.

Edge cases usually appear when multiple identity systems intersect. For example, a repository may be well protected, but the linked cloud deployment role or package registry token still has excessive standing privilege. Likewise, fork-based contribution models can create uncertainty about where secrets are exposed, so workflow design must account for untrusted code paths. NIST CSF 2.0 provides the governance structure, while NIST control baselines such as access restriction and configuration management help translate policy into enforceable settings.

There is also a practical distinction between public and private repositories. Public repositories tend to face higher code-review and secret-scanning pressure, while private repositories often accumulate hidden trust assumptions because fewer people see the settings. The security issue is the same in both cases: defaults can silently encode privilege. For teams managing machine access at scale, the OWASP Non-Human Identity Top 10 is a strong reminder that every token, key, and automation identity needs explicit lifecycle control, not inherited trust.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
NIST CSF 2.0 PR.AC Repository defaults directly affect access control and privilege boundaries.
OWASP Non-Human Identity Top 10 CI tokens, apps, and deploy keys are non-human identities needing governance.
NIST SP 800-53 Rev 5 AC-6 Least privilege is the core control challenged by permissive GitHub defaults.

Inventory and control all non-human identities with explicit ownership and least privilege.