Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

CI: Harden GHA configuration #104

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

Open
tacaswell wants to merge 6 commits into matplotlib:main
base: main
Choose a base branch
Loading
from tacaswell:harden_gha

Conversation

@tacaswell
Copy link
Member

@tacaswell tacaswell commented Jul 18, 2025

Apply recommended hardening steps including:

  • pinning to a SHA any actions used
  • not persisting the read token on checkout
  • setting the default permissions
  • adding a depandabot file for GHA

tacaswell added 5 commits July 17, 2025 20:56
This eliminates the possibility of a tag being changed under
us.
This eliminates the possibility of a tag being changed under
us.
May include:
- Avoids risky string interpolation.
- Prevents checkout premissions from leaking
Reduces risk of arbitrary code is run by attacker.
runs-on: ubuntu-latest
name: Post warnings/errors as review
steps:
- uses: actions/checkout@v3
Copy link
Member

Choose a reason for hiding this comment

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

Not pinning this one to a commit?

name: Build Release Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Copy link
Member

Choose a reason for hiding this comment

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

Also not pinned to a commit.

Copy link
Member

Choose a reason for hiding this comment

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

None of the actions are pinned to commit in this file.

Copy link
Member

Choose a reason for hiding this comment

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

None of the actions are pinned to commits here.

Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Copy link
Member Author

The tool I used to ID what needed to be pinned (zizmor) does not flag actions/XYZ.

Comment on lines +3 to +4
permissions:
contents: read
Copy link
Member

Choose a reason for hiding this comment

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

reviewdog needs write permissions for checks (cf Matplotlib's linting.yml.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@QuLogic QuLogic QuLogic left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /