yaml / yaml/libyaml

Set permissions for Github Workflows

Open
#265 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.2k
Forks
370
PR merge metrics
No merged PRs in 30d

Description

Hi, I work on behalf of Google and the OpenSSF to help open source projects to increase their supply chain security by using OpenSSF Scorecard as a guide.

I would like to suggest a PR to set up top level permissions to the github workflows in order to grant any write permissions only on the run level.

This is needed because, by default, github grants write-all permission to all workflows, which could be exploit by an attacker in case of a compromised workflow. Limiting permissions is a simple and effective way to also limit the impact of an eventual compromised workflow.

Thus, it is both a recommendation from OpenSSF Scorecard and the Github to always use credentials that are minimally scoped.

Let me know if the PR is welcome and feel free to reach me out in case of any doubts or concerns.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the repository's GitHub workflow files and review their current permission settings against the OpenSSF Scorecard and GitHub Actions guidance linked in the issue. The work is done when workflows have restrictive top-level permissions and any required write permissions are granted only at the relevant run level.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd, security
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.