Skip to content

Conversation

tacaswell
Copy link
Member

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

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.
@@ -27,15 +27,19 @@ jobs:
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?

@@ -14,6 +16,7 @@ jobs:
- 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 <[email protected]>
@tacaswell
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants