# Workflows: Write (repository)

Tier 1 permission, `permission:workflows:write`. Page: https://ghtier.com/tier/permissions/workflows-write

Lets Contents: write also change files under .github/workflows; it does nothing on its own. A workflow pushed to a new branch with a push trigger runs at once, with the repository's secrets and the token permissions it sets, so the pair is a direct path to secrets and cloud access. Secrets in an environment with required reviewers stay out of reach.

**Included in roles:** [Write](https://ghtier.com/tier/roles/repo-write.md) (Tier 1), [Maintain](https://ghtier.com/tier/roles/repo-maintain.md) (Tier 1), [Admin](https://ghtier.com/tier/roles/repo-admin.md) (Tier 1), [Collaborator on a personal repository](https://ghtier.com/tier/roles/personal-repo-collaborator.md) (Tier 1), [Owner](https://ghtier.com/tier/roles/org-owner.md) (Tier 0), [All-repository write](https://ghtier.com/tier/roles/org-all-repo-write.md) (Tier 1), [All-repository maintain](https://ghtier.com/tier/roles/org-all-repo-maintain.md) (Tier 1), [All-repository admin](https://ghtier.com/tier/roles/org-all-repo-admin.md) (Tier 0)

**Reached by classic scopes:** [workflow](https://ghtier.com/tier/tokens/workflow.md) (Tier 1)

**Keys and policies that act as or change it:** [SSH key on a user account](https://ghtier.com/tier/keys-policies/ssh-key.md) (Tier 1), [Workflow dependency lockfile (actions.lock)](https://ghtier.com/tier/keys-policies/workflow-lockfile.md) (Tier 1)

**Enables techniques:** [Have a workflow approve the PR](https://ghtier.com/attack-paths/technique-robot-approval.md) (Tier 1), [Add a workflow that dumps secrets](https://ghtier.com/attack-paths/technique-inject-workflow.md) (Tier 1), [Leave a dormant workflow behind](https://ghtier.com/attack-paths/technique-dormant-workflow.md) (Tier 1)

**Ways in that use it:** [Member with write access](https://ghtier.com/attack-paths/insider-write.md) (Tier 1), [Leaked token](https://ghtier.com/attack-paths/leaked-token.md) (Tier 1), [Compromised GitHub App or OAuth integration](https://ghtier.com/attack-paths/third-party-app.md) (Tier 1), [Compromised developer tool or extension](https://ghtier.com/attack-paths/dev-tooling.md) (Tier 1)

**Starts escalations:** [Change a workflow, get its secrets](https://ghtier.com/attack-paths/escalation-workflow-to-secrets.md) (Tier 1), [Sign provenance for your own artifact](https://ghtier.com/attack-paths/escalation-workflow-to-attestation.md) (Tier 1), [Change a shared reusable workflow](https://ghtier.com/attack-paths/escalation-shared-workflow-to-consumers.md) (Tier 1)

**Gained through escalations:** [Add yourself to a team with repository access](https://ghtier.com/attack-paths/escalation-team-maintainer-to-repos.md) (Tier 1), [Claim the old name of a renamed Action](https://ghtier.com/attack-paths/escalation-repojacking-action.md) (Tier 1)

**Abused in incidents:** [tj-actions/changed-files supply-chain compromise (CVE-2025-30066)](https://ghtier.com/incidents/tj-actions-changed-files.md), [Ultralytics build cache poisoning](https://ghtier.com/incidents/ultralytics.md), [GhostAction](https://ghtier.com/incidents/ghostaction.md), [Salesloft Drift GitHub → AWS pivot](https://ghtier.com/incidents/salesloft-drift.md), [Megalodon: mass backdooring of CI workflows](https://ghtier.com/incidents/megalodon.md)

**Strange findings:** [Write access reads every repository secret](https://ghtier.com/strange-findings/finding-write-reads-all-secrets.md), [Workflow files can be pushed without the workflow scope](https://ghtier.com/strange-findings/finding-workflow-file-without-workflow-scope.md), [A workflow can create an environment, without any protection rules](https://ghtier.com/strange-findings/finding-workflow-creates-unprotected-environment.md), [A reusable workflow gets an empty string for a secret it was not passed](https://ghtier.com/strange-findings/finding-reusable-workflow-missing-secret-is-empty.md), [pull_request_target gives fork pull requests a write token and secrets](https://ghtier.com/strange-findings/finding-pull-request-target-gets-secrets.md)

**Sources:**
- [GitHub docs](https://docs.github.com/en/rest/authentication/permissions-required-for-github-apps#repository-permissions-for-workflows)

From ghtier (https://ghtier.com). Every entry and link: https://ghtier.com/data/graph.json. Tiers: https://ghtier.com/tier.
