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

[core] Harden GitHub Actions permissions #6396

Conversation

step-security-bot
Copy link
Contributor

@step-security-bot step-security-bot commented Oct 5, 2022

Based on the current configuration of the repositories:

Screenshot 2022-10-15 at 16 26 52

The GitHub actions have a wide range of permission as documented in: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token.

From a security perspective, it's better to limit the access that each action has. For example, https://deps.dev/npm/%40mui%2Fmaterial reports that we could do better:

Screenshot 2022-10-15 at 16 28 57

or this API https://api.securityscorecards.dev/projects/github.com/mui/material-ui

Once merged, we can change the default permissions to be read only.

@mui-bot
Copy link

mui-bot commented Oct 5, 2022

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 458.6 731.2 613.4 599.44 119.509
Sort 100k rows ms 516.9 911.9 738.1 748.96 137.633
Select 100k rows ms 156.3 254.5 203.1 196.02 35.71
Deselect 100k rows ms 132.2 198.1 190.2 172.78 26.397

Generated by 🚫 dangerJS against 561043d

@oliviertassinari oliviertassinari changed the title [StepSecurity] ci: Harden GitHub Actions [core] Harden GitHub Actions permissions Oct 5, 2022
@oliviertassinari oliviertassinari added core Infrastructure work going on behind the scenes security Pull requests that address a security vulnerability labels Oct 5, 2022
@oliviertassinari oliviertassinari force-pushed the stepsecurity_remediation_1665004419 branch from fe787e6 to 180c7c2 Compare October 5, 2022 21:36
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 14, 2022
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@oliviertassinari oliviertassinari force-pushed the stepsecurity_remediation_1665004419 branch from d8a6abf to dd7aaa4 Compare October 15, 2022 12:05
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 15, 2022
@oliviertassinari oliviertassinari force-pushed the stepsecurity_remediation_1665004419 branch 2 times, most recently from 642267a to 9a32a3b Compare October 15, 2022 12:15
@oliviertassinari oliviertassinari force-pushed the stepsecurity_remediation_1665004419 branch from 9a32a3b to 561043d Compare October 15, 2022 12:20
@oliviertassinari oliviertassinari merged commit fe56c20 into mui:next Oct 15, 2022
@oliviertassinari
Copy link
Member

I'm merging to unlock it, it has been 10 days.

@@ -12,6 +12,9 @@ on:
jobs:
noResponse:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
Copy link
Member

Choose a reason for hiding this comment

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

I think these changes broke the workflow:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes security Pull requests that address a security vulnerability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants