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

[StepSecurity] ci: Restrict token permissions to harden GitHub Actions #2483

Conversation

step-security-bot
Copy link
Contributor

@step-security-bot step-security-bot commented May 25, 2024

Summary

This pull request is created by StepSecurity at the request of @matthewfeickert. Please merge the Pull Request to incorporate the requested changes. Please tag @matthewfeickert on your message if you have any questions related to the PR.

Security Fixes

Least Privileged GitHub Actions Token Permissions

The GITHUB_TOKEN is an automatically generated secret to make authenticated calls to the GitHub API. GitHub recommends setting minimum token permissions for the GITHUB_TOKEN.

Feedback

For bug reports, feature requests, and general feedback; please email [email protected]. To create such PRs, please visit https://app.stepsecurity.io/securerepo.

Signed-off-by: StepSecurity Bot [email protected]

* Restrict token permissions as identified by https://app.stepsecurity.io/.

Signed-off-by: StepSecurity Bot <[email protected]>

@matthewfeickert matthewfeickert self-assigned this May 25, 2024
@matthewfeickert
Copy link
Member

This is a follow up PR to address security scan results from PR #2482.

@matthewfeickert matthewfeickert added CI CI systems, GitHub Actions security Improving repository security measures labels May 25, 2024
@matthewfeickert matthewfeickert changed the title [StepSecurity] ci: Harden GitHub Actions [StepSecurity] ci: Restrict token permissions to harden GitHub Actions May 25, 2024
Copy link

codecov bot commented May 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.21%. Comparing base (e6e6647) to head (3cab21d).
Report is 23 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2483   +/-   ##
=======================================
  Coverage   98.21%   98.21%           
=======================================
  Files          69       69           
  Lines        4543     4543           
  Branches      804      804           
=======================================
  Hits         4462     4462           
  Misses         48       48           
  Partials       33       33           
Flag Coverage Δ
contrib 97.79% <ø> (ø)
doctest 98.08% <ø> (ø)
unittests-3.10 96.23% <ø> (ø)
unittests-3.11 96.23% <ø> (ø)
unittests-3.12 96.23% <ø> (ø)
unittests-3.8 96.25% <ø> (ø)
unittests-3.9 96.27% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matthewfeickert matthewfeickert merged commit cdd404a into scikit-hep:main May 25, 2024
20 of 23 checks passed
matthewfeickert added a commit that referenced this pull request May 25, 2024
* Restrict content permissions to read. At the moment there are no
  steps to the changed workflows that use tokens, and so this is
  preventative if this ever changes.
* Give packages write permissions to publish to ghcr.
   - Amends PR #2483.
matthewfeickert added a commit that referenced this pull request May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI CI systems, GitHub Actions security Improving repository security measures
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants