Skip to content

README: use environment for apply#77

Draft
joneskoo wants to merge 1 commit intotailscale:mainfrom
joneskoo:fix/readme-environment-for-apply
Draft

README: use environment for apply#77
joneskoo wants to merge 1 commit intotailscale:mainfrom
joneskoo:fix/readme-environment-for-apply

Conversation

@joneskoo
Copy link
Copy Markdown

@joneskoo joneskoo commented Apr 25, 2026

A collaborator with write access to repository can modify workflow and use repository secrets or OIDC to abuse CI/CD privileges. This allows bypassing branch protection required review through workflow modification. For example, if main branch requires review but pull requests are allowed.

Split into two jobs:

  • acls: runs only on push, uses environment: production. The environment must be restricted to the main branch so its secrets cannot be accessed from a PR branch regardless of workflow modifications.
  • acls-test: runs only on pull_request, uses a separate read-only federated identity (policy_file:read scope) so it cannot apply changes.

This relies on the OIDC trust also enforcing the environment.

Fixes #32.

AI assistance used to generate the pull request.

A collaborator with write access to repository can modify workflow
and use repository secrets or OIDC to abuse CI/CD privileges.
This allows bypassing branch protection required review through
workflow modification. For example, if main branch requires review
but pull requests are allowed.

Split into two jobs:
- acls: runs only on push, uses environment: production. The environment
  must be restricted to the main branch so its secrets cannot be accessed
  from a PR branch regardless of workflow modifications.
- acls-test: runs only on pull_request, uses a separate read-only
  federated identity (policy_file:read scope) so it cannot apply changes.

This relies on the OIDC trust also enforcing the environment.

Fixes tailscale#32.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

README.md recommends an insecure default configuration

1 participant