ci: post zizmor findings as PR comment for visibility#16405
Draft
Onibenjo wants to merge 4 commits into
Draft
Conversation
🛡️ zizmor findings on workflow/action files changed in this PRRule descriptions and remediation guidance: https://docs.zizmor.sh/audits/ Scanned:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the existing zizmor GitHub Actions security workflow by publishing zizmor findings directly into a single sticky PR comment, improving reviewer visibility while keeping the existing SARIF upload to GitHub Code Scanning intact.
Changes:
- Grant
pull-requests: writepermission at the job level to allow commenting on PRs. - Add a PR-only step to run zizmor in plain format and write results to
zizmor-report.md. - Post/update a sticky PR comment from
zizmor-report.mdusingmarocchino/sticky-pull-request-comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+28
to
+31
| - name: Run zizmor (plain output for PR comment) | ||
| if: github.event_name == 'pull_request' | ||
| id: zizmor_plain | ||
| continue-on-error: true |
Comment on lines
+44
to
+46
| - name: Post zizmor findings as sticky PR comment | ||
| if: github.event_name == 'pull_request' | ||
| uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 # v3.0.4 |
Comment on lines
+31
to
+42
| continue-on-error: true | ||
| run: | | ||
| pipx install zizmor | ||
| { | ||
| echo '## :shield: zizmor security findings' | ||
| echo '' | ||
| echo 'Rule descriptions and remediation guidance: <https://docs.zizmor.sh/audits/>' | ||
| echo '' | ||
| echo '```' | ||
| zizmor --persona=auditor --format=plain . 2>&1 || true | ||
| echo '```' | ||
| } > zizmor-report.md |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #16405 +/- ##
=======================================
Coverage 48.36% 48.36%
=======================================
Files 37 37
Lines 5905 5905
=======================================
Hits 2856 2856
Misses 3049 3049 🚀 New features to boost your workflow:
|
2a01edf to
3f8a2dd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Done
pull-requests: writeat the job level (workflow-level permissions stay{})QA
GitHub Actions Security Analysis with zizmorworkflow run on the PRgithub-actions[bot]titled "zizmor security findings" with the readable list of findings; existing per-line annotations from the SARIF upload still appear in the Files changed viewIssue / Card
n/a