Skip to content

Address zizmor findings#19

Open
williammartin wants to merge 1 commit into
mainfrom
wm-address-zizmor-findings
Open

Address zizmor findings#19
williammartin wants to merge 1 commit into
mainfrom
wm-address-zizmor-findings

Conversation

@williammartin
Copy link
Copy Markdown

@williammartin williammartin commented May 20, 2026

Description

When run with zizmor --config "$HOME/.config/zizmor/config.yml"

rules:
  unpinned-uses:
    config:
      policies:
        # First-party GitHub-maintained orgs: tag pins are acceptable.
        # Releases from these orgs are signed, retag risk is low, and patch
        # bumps for free outweigh the SHA-pin defense-in-depth here.
        actions/*: ref-pin
        github/*: ref-pin
        dependabot/*: ref-pin
        # Everything else must be SHA-pinned.
        "*": hash-pin
 INFO zizmor: 🌈 zizmor v1.25.2
 INFO audit: zizmor: 🌈 completed ./.github/dependabot.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/auto-merge-dependabot.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/codeql.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/pitch-surface-top-issues.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/triage-close-from-default-branch.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/triage-close-invalid.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/triage-close-no-help-wanted.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/triage-close-off-topic.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/triage-close-single-word-issues.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/triage-close-suspected-spam.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/triage-contributor-input-needed.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/triage-detect-spam.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/triage-discuss.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/triage-enhancement-comment.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/triage-label-external-pr.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/triage-label-incoming.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/triage-no-response-close.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/triage-on-issue-close.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/triage-pr-requirements.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/triage-ready-for-review.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/triage-remove-needs-triage.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/triage-stale-issues.yml
 INFO audit: zizmor: 🌈 completed ./.github/workflows/triage-unable-to-reproduce-comment.yml

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
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I can't find an example where template injection is a real current issue, but:

  1. I think it makes sense to blanket follow this pattern rather than having to look closely
  2. 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:
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I couldn't find any place in cli/cli or desktop/desktop where not persisting credentials would be an issue.

@williammartin williammartin force-pushed the wm-address-zizmor-findings branch from 4c18866 to 538b734 Compare May 20, 2026 10:38
Comment thread .github/dependabot.yml
directory: "/" # Location of GitHub Actions workflow files
schedule:
interval: "weekly"
interval: "daily"
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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.

@williammartin williammartin marked this pull request as ready for review May 20, 2026 10:40
Copilot AI review requested due to automatic review settings May 20, 2026 10:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 into env: across multiple triage workflows.
  • Add persist-credentials: false to actions/checkout usages where checkout is only needed for reading files.
  • Document and annotate intentional pull_request_target usage 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

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.

2 participants