envoyproxy / envoyproxy/envoy

Set up permissions for Github Workflows

Open
#25,770 3 comments 0 reactions 0 assignees View on GitHub
area/build no stalebot
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
437

Description

**If you are reporting *any* crash or *any* potential security issue, *do not*
open an issue in this repo. Please report the issue via emailing
envoy-security@googlegroups.com where the issue will be triaged appropriately.**

*Title*: *Set up permissions for Github Workflows*

*Description*:
Hi, I 'm from Google working with the OpenSSF to help open source projects to increase their supply-chain security.

I would like to suggest to set the GITHUB_TOKEN permissions of your workflows as read only in the [top level](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions) and grant any write permission needed at the [run level](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idpermissions).

It is a default behavior of github workflows to grant write permissions to all permissions, thus it is both a recommendation from OpenSSF Scorecard and the Github to always use credentials that are minimally scoped.

If a PR is welcome with the changes, let me know.

[optional *Relevant Links*:]
- [OpenSSF Scorecard Token Permission Check](https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions)
- [Github Security Recommendations](https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.