Skip to content

[BUG]: ref-version-mismatch and stale-action-refs don't respect ignore outside of steps #2443

Closed

Description

@hashcatHitman

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

zizmor 1.30.1

Expected behavior

In this workflow:

# Perform a subtree sync (pull) using the josh-sync tool once every few days (or on demand).
name: rustc-pull

on:
  workflow_dispatch:
  schedule:
    # Run at 04:00 UTC every Monday and Thursday
    - cron: "0 4 * * 1,4"

env:
  JOSH_SYNC_VERBOSE: true

jobs:
  pull:
    if: github.repository == 'rust-lang/compiler-builtins'
    # zizmor: ignore[ref-version-mismatch,stale-action-refs] Renovate should update this about once a month.
    uses: rust-lang/josh-sync/.github/workflows/rustc-pull.yml@b1da651cd99a7325cc242548db6d711639b0c30c # main
    with:
      github-app-id: ${{ vars.APP_CLIENT_ID }}
      pr-author: "workflows-compiler-builtins[bot]"
      # https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/compiler-builtins.20subtree.20sync.20automation/with/528482375
      zulip-stream-id: 219381
      zulip-topic: "compiler-builtins subtree sync automation"
      zulip-bot-email: "compiler-builtins-ci-bot@rust-lang.zulipchat.com"
      pr-base-branch: main
      branch-name: rustc-pull
    secrets:
      zulip-api-token: ${{ secrets.ZULIP_API_TOKEN }}
      github-app-secret: ${{ secrets.APP_PRIVATE_KEY }}
    permissions:
      contents: write
      pull-requests: write

I expected ref-version-mismatch and stale-action-refs to respect the ignore comment.

Actual behavior

Both lints still fired.

Reproduction steps

Run zizmor --gh-token "$(gh auth token)" --persona=auditor . in a repo with the provided workflow at .github/workflows/rustc-pull.yml.

Logs


Additional context

I'm aware of #2177 adding an additional hidden "step" span for ref-version-mismatch. I'm not sure if similar has been done for stale-action-refs or not, but either way, as far as I know this workflow can't be rewritten to use steps because of the use of secrets. unpinned-uses DOES work in this context already, thanks to #2289.

Activity

  1. added
    bug
    triage
    on Oct 14, 2026
  2. JoanAbad82 commented on Oct 28, 2026

    @JoanAbad82
  3. woodruffw commented on Oct 29, 2026

    @woodruffw
    Member

    Hi @hashcatHitman, thanks for the report (and apologies for the delay). I'll take a look at these audits and see if they're missing any invisible spans. There's a good chance they are, it's a common mistake (on my part) 🙂

  4. woodruffw commented on Oct 29, 2026

    @woodruffw
    Member

    #2494 will fix this. Your root cause was right: I missed a spot in ref-version-mismatch and stale-action-refs was completely missing a hidden span.

  5. removed
    triage
    on Oct 29, 2026
  6. added this to the 1.32.0 milestone on Oct 29, 2026
  7. hashcatHitman commented on Oct 29, 2026

    @hashcatHitman
    ContributorAuthor

    Thanks!

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions