Skip to content

Audit GHA workflows with zizmor #7624

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

Merged
merged 4 commits into from
Jan 20, 2025
Merged

Audit GHA workflows with zizmor #7624

merged 4 commits into from
Jan 20, 2025

Conversation

maresb
Copy link
Contributor

@maresb maresb commented Dec 22, 2024

Description

This should reduce the chance that we do something dangerous with GHA that might lead to a compromise of the repo.

Mirrors pymc-devs/pytensor#1136

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

📚 Documentation preview 📚: https://pymc--7624.org.readthedocs.build/en/7624/

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@maresb
Copy link
Contributor Author

maresb commented Dec 22, 2024

CC also @wd60622 regarding 93681ed

@maresb maresb mentioned this pull request Dec 22, 2024
9 tasks
Copy link

codecov bot commented Dec 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.77%. Comparing base (e6767ab) to head (c418f78).
Report is 67 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #7624   +/-   ##
=======================================
  Coverage   92.77%   92.77%           
=======================================
  Files         107      107           
  Lines       18178    18178           
=======================================
  Hits        16865    16865           
  Misses       1313     1313           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@lucianopaz lucianopaz left a comment

Choose a reason for hiding this comment

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

I see that the workflow was copied from the zizmor docs so that one is fine. Were the other changes things that zizmor suggested to do to remove security vulnerabilities? Anyway, this looks ok to me, even though I know nothing of security vulnerabilities in GHA.

@maresb
Copy link
Contributor Author

maresb commented Dec 23, 2024

I see that the workflow was copied from the zizmor docs so that one is fine. Were the other changes things that zizmor suggested to do to remove security vulnerabilities? Anyway, this looks ok to me, even though I know nothing of security vulnerabilities in GHA.

Excellent question! Thanks for checking this so thoroughly. For the discrepancies, I'm following hynek, the author of structlog. Here's his workflow. I just tried to pick the best from both. For anyone from the future looking back on this, the differences are not substantial, so there should be no barrier to using the pure zizmor workflow.

@maresb maresb requested review from ricardoV94 and removed request for ricardoV94 January 18, 2025 13:48
@ricardoV94 ricardoV94 merged commit 2012262 into main Jan 20, 2025
25 checks passed
@ricardoV94 ricardoV94 deleted the zizmor branch January 20, 2025 09:33
@ricardoV94 ricardoV94 added release Github CI/CD no releasenotes Skipped in automatic release notes generation labels Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Github CI/CD no releasenotes Skipped in automatic release notes generation release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants