-
Notifications
You must be signed in to change notification settings - Fork 66
ci: added zizmor static security check #2874
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
ci: added zizmor static security check #2874
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, no comments
|
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. |
| elif [[ "${{ github.event_name }}" == 'pull_request' && "${{ needs.lint-branch-name.result }}" != 'success' ]]; then | ||
| echo "❌ Linting of branch name failed." | ||
| exit 1 | ||
| elif [[ "${{ needs.zizmor.result }}" != 'success' ]]; then |
Check notice
Code scanning / zizmor
code injection via template expansion Note
|
While the github action zizmor only checks the newly created changes, running zizmor locally checks all worflow files and gives the following found security vulnerabilities in our github actions: 93 findings (43 suppressed, 29 fixable): 12 informational, 0 low, 19 medium, 19 high A lot of the high vulnerability issues are possible code injections through the the template expansion blocks "${{ ... }}", actions which are not pinned to a hash, or write permissions that are set too broadly. I will see to fix all of these vulnerabilities as well. |
Diff CoverageDiff: origin/develop...HEAD, staged and unstaged changesNo lines with coverage information in this diff. |
yaugenst-flex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is great!
Added a static check for security vulnearbilities using zizmor.
Greptile Overview
Updated On: 2025-10-08 06:18:05 UTC
Summary
This PR integrates zizmor, a static security analysis tool, into the GitHub Actions workflow to automatically scan for security vulnerabilities in workflow configurations. The implementation adds a new `zizmor` job that runs independently with `security-events: write` permissions to upload security scan results to GitHub's Security tab. The job uses pinned action versions with commit hashes for enhanced security, runs on the latest Ubuntu environment, and includes proper error handling.The change fits well within the existing CI/CD infrastructure by leveraging the established pattern of independent security jobs that integrate into the overall PR requirements. The zizmor job becomes part of the dependency chain for the
test-pr-requirementsjob, ensuring that security checks are mandatory for all pull requests. This proactive approach to security scanning helps maintain the integrity of the CI/CD pipeline by catching potential vulnerabilities before they reach production.PR Description Notes:
Important Files Changed
Changed Files
.github/workflows/tidy3d-python-client-tests.ymlConfidence score: 5/5
Sequence Diagram
sequenceDiagram participant User participant GitHub participant GitHubActions as "GitHub Actions" participant Zizmor as "Zizmor Tool" participant SecurityEvents as "Security Events" User->>GitHub: "Push to PR branch or trigger workflow" GitHub->>GitHubActions: "Trigger workflow event" GitHubActions->>GitHubActions: "Determine test scope" alt If tests needed GitHubActions->>GitHubActions: "Start parallel jobs (lint, zizmor, etc.)" par Zizmor Security Check GitHubActions->>GitHubActions: "Checkout repository" GitHubActions->>Zizmor: "Run static security analysis" Zizmor->>Zizmor: "Analyze GitHub Actions workflows" Zizmor->>SecurityEvents: "Report security findings" Zizmor->>GitHubActions: "Return analysis results" and Other Jobs GitHubActions->>GitHubActions: "Run lint checks" GitHubActions->>GitHubActions: "Run local/remote tests" GitHubActions->>GitHubActions: "Verify schema changes" end GitHubActions->>GitHubActions: "Wait for all jobs to complete" GitHubActions->>GitHubActions: "Check PR requirements" alt All checks pass GitHubActions->>User: "✅ All required test jobs passed!" else Any check fails GitHubActions->>User: "❌ Static check of github actions with zizmor failed" end end