Skip to content

Add Zizmor for GHA security auditing#1268

Merged
mfisher87 merged 6 commits intomainfrom
gha-linter
Mar 31, 2026
Merged

Add Zizmor for GHA security auditing#1268
mfisher87 merged 6 commits intomainfrom
gha-linter

Conversation

@mfisher87
Copy link
Copy Markdown
Member

@mfisher87 mfisher87 commented Mar 23, 2026

Description

Resolves #902

Zizmor can catch common security issues in GitHub Actions configurations. It reports in the security tab at the top of the repo. For example, a common attack vector is mutable refs used to pin actions, which we do (we use tags and branches, but should use SHAs).

See: https://socket.dev/blog/trivy-under-attack-again-github-actions-compromise

Still, SHAs are not perfectly safe... they come with their own risk thanks to GitHub doing something totally unexpected (and IMO unsafe and uncool). my/repo@some-sha could refer to some-sha on a FORK of my/repo, e.g. malicious-person/repo@some-sha, and it would still just work despite being absolutely not what you intended or expected. For this reason, we should allow dependabot to update our actions and not trust any incoming PRs that alter SHAs. Thankfully, zizmor can detect this impostor commit pattern!

See: https://www.vaines.org/posts/2026-03-24-the-comforting-lie-of-sha-pinning/

Addressed:

This uses the GH Code Scanning interface (see the security tab at the top) to report issues.

https://github.com/earthaccess-dev/earthaccess/security/code-scanning?query=pr%3A1268+is%3Aopen


"Ready for review" checklist

  • Open PR as draft
  • Please review our Pull Request Guide
  • Mark "ready for review" after following instructions in the guide

Merge checklist

  • PR title is descriptive
  • PR body contains links to related and resolved issues (e.g. closes #1)
  • If needed, CHANGELOG.md updated
  • If needed, docs and/or README.md updated
  • If needed, unit tests added
  • All checks passing (comment pre-commit.ci autofix if pre-commit is failing)
  • At least one approval

📚 Documentation preview 📚: https://earthaccess--1268.org.readthedocs.build/en/1268/

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 23, 2026

Binder 👈 Launch a binder notebook on this branch for commit a94514e

I will automatically update this comment whenever this PR is modified

Binder 👈 Launch a binder notebook on this branch for commit da6116d

Binder 👈 Launch a binder notebook on this branch for commit 3b1fce9

Binder 👈 Launch a binder notebook on this branch for commit 8eef81a

Binder 👈 Launch a binder notebook on this branch for commit 05bc0b3

Binder 👈 Launch a binder notebook on this branch for commit 5bcb47f

Binder 👈 Launch a binder notebook on this branch for commit f76068a

@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@mfisher87 mfisher87 changed the title Add Zizmor for GHA security linting Add Zizmor for GHA security auditing Mar 24, 2026
@mfisher87 mfisher87 marked this pull request as ready for review March 30, 2026 20:17
@mfisher87
Copy link
Copy Markdown
Member Author

Integration tests are failing for reasons unrelated to this PR.

Comment thread .github/dependabot.yml Outdated
chuckwondo
chuckwondo previously approved these changes Mar 31, 2026
Copy link
Copy Markdown
Contributor

@chuckwondo chuckwondo left a comment

Choose a reason for hiding this comment

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

Fantastic! Thank you @mfisher87.

Just a comment about cooldown days, and wondering if you have any suggestions for the 2 items that zizmor flagged?

Comment thread .github/dependabot.yml Outdated
@mfisher87
Copy link
Copy Markdown
Member Author

if you have any suggestions for the 2 items that zizmor flagged?

Those are pre-existing issues that I guess zizmor flagged because I touched code around them. I think we should tackle those (and other alerts that Zizmor raised) in separate PRs -- I currently don't have thoughts on how to fix them :D

@mfisher87
Copy link
Copy Markdown
Member Author

earthmover's website seems to be down causing the check links failure

@mfisher87 mfisher87 merged commit efa52cc into main Mar 31, 2026
10 of 15 checks passed
@mfisher87 mfisher87 deleted the gha-linter branch March 31, 2026 17:55
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.

Audit GitHub Actions for security

3 participants