Address zizmor findings#19
Conversation
| if: ${{ github.event_name == 'issues' }} | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: gh issue edit ${{ github.event.issue.html_url }} --remove-label "needs-triage" || true |
There was a problem hiding this comment.
I can't find an example where template injection is a real current issue, but:
- I think it makes sense to blanket follow this pattern rather than having to look closely
- There were some cases where a compromise of a maintainer could hide behaviour or change privileges
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
| with: |
There was a problem hiding this comment.
I couldn't find any place in cli/cli or desktop/desktop where not persisting credentials would be an issue.
4c18866 to
538b734
Compare
| directory: "/" # Location of GitHub Actions workflow files | ||
| schedule: | ||
| interval: "weekly" | ||
| interval: "daily" |
There was a problem hiding this comment.
This interval change isn't strictly needed, but it feels appropriate to have a sensible bound on the cooldown period since otherwise it could actually be 6+7 days.
There was a problem hiding this comment.
Pull request overview
Updates GitHub Actions workflows and Dependabot configuration to address zizmor audit findings by reducing potential injection surfaces in shell steps, tightening checkout credential persistence, and documenting/annotating intentional pull_request_target usage.
Changes:
- Move GitHub context and input interpolations out of
run:blocks intoenv:across multiple triage workflows. - Add
persist-credentials: falsetoactions/checkoutusages where checkout is only needed for reading files. - Document and annotate intentional
pull_request_targetusage in the Dependabot auto-merge workflow; adjust Dependabot update cadence.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/triage-unable-to-reproduce-comment.yml | Moves label values into env for safer shell usage. |
| .github/workflows/triage-remove-needs-triage.yml | Moves label lists/current label into env and uses consistent variable naming. |
| .github/workflows/triage-pr-requirements.yml | Centralizes commonly used labels into env for multiple gh-driven steps and messages. |
| .github/workflows/triage-label-incoming.yml | Moves removed/expected label names into env for safer comparisons. |
| .github/workflows/triage-detect-spam.yml | Disables persisted checkout credentials for read-only checkouts. |
| .github/workflows/triage-contributor-input-needed.yml | Moves event-derived values into env to avoid direct interpolation in shell logic. |
| .github/workflows/triage-close-invalid.yml | Quotes URLs by assigning them to env variables before passing to gh commands. |
| .github/workflows/codeql.yml | Disables persisted checkout credentials for the CodeQL job. |
| .github/workflows/auto-merge-dependabot.yml | Documents pull_request_target rationale and adds a zizmor ignore annotation. |
| .github/dependabot.yml | Changes update schedule to daily and adds a cooldown window. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 10/10 changed files
- Comments generated: 0
Description
When run with
zizmor --config "$HOME/.config/zizmor/config.yml"