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

GitHub Workflows security hardening #1193

Merged
merged 3 commits into from Dec 23, 2022
Merged

Conversation

sashashura
Copy link
Contributor

What:
This PR adds explicit permissions section to workflows.

Why:
This is a security best practice because by default workflows run with extended set of permissions (except from on: pull_request from external forks). By specifying any permission explicitly all others are set to none. By using the principle of least privilege the damage a compromised workflow can do (because of an injection or compromised third party tool or action) is restricted.

How:
It is recommended to have most strict permissions on the top level and grant write permissions on job level case by case.

Checklist:

  • Documentation added to the
    docs site N/A
  • Tests N/A
  • TypeScript definitions updated N/A
  • Ready to be merged

Signed-off-by: Alex <aleksandrosansan@gmail.com>
@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 8, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 7389dab:

Sandbox Source
react-testing-library-examples Configuration

@codecov
Copy link

codecov bot commented Dec 8, 2022

Codecov Report

Merging #1193 (7389dab) into main (fe12e5b) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main     #1193   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           24        24           
  Lines          998       998           
  Branches       326       327    +1     
=========================================
  Hits           998       998           
Flag Coverage Δ
node-12 100.00% <ø> (ø)
node-14 100.00% <ø> (ø)
node-16 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@timdeschryver timdeschryver left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@eps1lon
Copy link
Member

eps1lon commented Dec 23, 2022

Let's see if it works.

@eps1lon eps1lon merged commit acedf31 into testing-library:main Dec 23, 2022
@eps1lon
Copy link
Member

eps1lon commented Feb 16, 2023

This was missing issues: write for semantic-release. Fixing in #1214

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants