Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use minimum required permissions for GitHub workflows #8569

Merged
merged 1 commit into from
Jul 13, 2022

Conversation

triallax
Copy link
Contributor

@triallax triallax commented Jul 3, 2022

What is it?

  • Meta improvement to the project (dev facing)

Description of the changes in your PR

Use minimum needed permissions for GitHub workflows and jobs. This reduces the attack surface if the workflows are ever compromised.

Due diligence

This reduces the attack surface if the workflows are ever compromised.
@sonarcloud
Copy link

sonarcloud bot commented Jul 3, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@triallax triallax marked this pull request as ready for review July 3, 2022 18:15
@triallax triallax added the CI Issue is related to the CI label Jul 3, 2022
@triallax
Copy link
Contributor Author

triallax commented Jul 3, 2022

The SonarCloud failure is unrelated, this should be good to go.

@triallax
Copy link
Contributor Author

triallax commented Jul 5, 2022

We should also probably set the GITHUB_TOKEN permissions to "restrictive" on our existing repositories and on the organization as a whole: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_toke

Copy link
Member

@litetex litetex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TobiGr @Stypox @TheAssassin
You may have a look at @mhmdanas last comment...

@litetex
Copy link
Member

litetex commented Jul 10, 2022

See also TeamNewPipe/NewPipeExtractor#869

Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that we have manually specified permissions for each workflow, I made the default permissions read-only. Let's see if this works correctly...
image

@Stypox Stypox merged commit 0b644fd into TeamNewPipe:dev Jul 13, 2022
@Stypox Stypox mentioned this pull request Aug 27, 2022
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Issue is related to the CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants