Skip to content

[BUG]: use-trusted-publishing misreads PowerShell command arguments #2430

Closed

Description

@LucaCappelletti94

Pre-submission checks

  • I am not filing a feature request. These should be filed via the feature request form instead.
  • I have checked the Troubleshooting Guide for my problem.
  • I have looked through both the open and closed issues for a duplicate report.
  • I affirm that I have followed the AI policy and that this report constitutes my own words and understanding.

zizmor version

1.30.1

Expected behavior

cargo publish --dry-run under pwsh is not reported, as under bash since #1251.

Actual behavior

Under pwsh every --dry-run form is reported, and dotnet nuget push, python -m twine upload and similar commands are missed.

Reproduction steps

on: pull_request
permissions: {}
jobs:
  dry-run:
    runs-on: windows-latest
    steps:
      - run: cargo publish --dry-run

Logs


Additional context

The query from #1357 yields one match per argument and skips command_parameter nodes, so the check never sees publish and --dry-run together.

cargo publish --features=foo --dry-run stays reported because of #2389 (airbus-cert/tree-sitter-powershell#46).

Found in open-source-cooperative/windows-native-keyring-store#16.

Activity

  1. added
    bug
    triage
    on Oct 3, 2026
  2. woodruffw commented on Oct 4, 2026

    @woodruffw
    Member

    Hi @LucaCappelletti94, thanks for the report.

    If I understand correctly: this is different from #2389 because that's about the tree-sitter-powershell grammar not handling --foo=bar correctly, whereas this is about us not handling plain --foo at all? Is that right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtriage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions