Skip to content

[BUG]: False positive superfluous-actions for dtolnay/rust-toolchain on self-hosted runner #1865

Open

Description

@AntoineSebert

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.

zizmor version

1.23.1

Expected behavior

No superfluous-actions when the functionality provided by the action is not present on the runner:

zizmor --gh-token=$(gh auth token) -c ~/zizmor.yml .github/workflows/test.yaml
🌈 zizmor v1.23.1
 INFO audit: zizmor: 🌈 completed .github/workflows/test.yaml
No findings to report. Good job! (2 suppressed)

Actual behavior

The audit reports a superfluous-actions:

zizmor --gh-token=$(gh auth token) -c ~/zizmor.yml .github/workflows/test.yaml
🌈 zizmor v1.23.1
 INFO audit: zizmor: 🌈 completed .github/workflows/test.yaml
help[superfluous-actions]: action functionality is already included by the runner
  --> .github/workflows/test.yaml:28:15
   |
28 |       - uses: dtolnay/rust-toolchain@stable
   |         ------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |         |     |
   |         |     use `rustup` and/or `cargo` in a script step
   |         this step
   |
   = note: audit confidence → High

2 findings (1 suppressed): 0 informational, 1 low, 0 medium, 0 high

Once replaced - uses: dtolnay/rust-toolchain@stable by - run: rustup install stable && cargo init, the job run fails:

act -s GITHUB_TOKEN="$(gh auth token)" -P liquid-github-runner-set=catthehacker/ubuntu:act-24.04 -W .github/workflows/test.yaml
INFO[0000] Using docker host 'unix:///var/run/docker.sock', and daemon socket 'unix:///var/run/docker.sock' 
[Test/Test] ⭐ Run Set up job
[Test/Test] 🚀  Start image=catthehacker/ubuntu:act-24.04
[Test/Test]   🐳  docker pull image=catthehacker/ubuntu:act-24.04 platform= username= forcePull=true
[Test/Test] using DockerAuthConfig authentication for docker pull
[Test/Test]   🐳  docker create image=catthehacker/ubuntu:act-24.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Test/Test]   🐳  docker run image=catthehacker/ubuntu:act-24.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Test/Test]   🐳  docker exec cmd=[node --no-warnings -e console.log(process.execPath)] user= workdir=
[Test/Test]   ✅  Success - Set up job
[Test/Test]   ☁  git clone 'https://github.com/nuuday/cpedev-github-actions' # ref=main
[Test/Test] ⭐ Run Pre dtolnay/rust-toolchain@master
[Test/Test]   ✅  Success - Pre dtolnay/rust-toolchain@master [24.048004ms]
[Test/Test]   ☁  git clone 'https://github.com/Swatinem/rust-cache' # ref=v2
[Test/Test]   ☁  git clone 'https://github.com/nuuday/cpedev-github-actions' # ref=main
[Test/Test] Non-terminating error while running 'git clone': some refs were not updated
[Test/Test] ⭐ Run Main actions/checkout@v6
[Test/Test]   🐳  docker cp src=/home/antoine/projects/cpedev-github-actions/. dst=/home/antoine/projects/cpedev-github-actions
[Test/Test]   ✅  Success - Main actions/checkout@v6 [442.310917ms]
[Test/Test] ⭐ Run Main rustup install stable
cargo init
[Test/Test]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/1.sh] user= workdir=
| /var/run/act/workflow/1.sh: line 2: rustup: command not found
[Test/Test]   ❌  Failure - Main rustup install stable
cargo init
 [81.26989ms]
[Test/Test] exitcode '127': command not found, please refer to https://github.com/nektos/act/issues/107 for more information
[Test/Test] ⭐ Run Complete job
[Test/Test]   ✅  Success - Complete job
[Test/Test] 🏁  Job failed
Error: Job 'Test' failed

Reproduction steps

  1. Create a self-hosted runner whose image does not have rustup installed
  2. Create a workflow file:
name: Test

permissions: {}

on:
  workflow_dispatch: # manual trigger

jobs:
  main:
    runs-on: liquid-github-runner-set
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@v6
        with:
          persist-credentials: true

      - uses: dtolnay/rust-toolchain@stable

      - shell: bash
        run: cargo init
  1. Run zizmor --gh-token=$(gh auth token) -c ~/zizmor.yml .

Logs


Additional context

The documentation of superfluous-actions states:

Detects actions that are known to be "superfluous," i.e. perform an operation already provided by GitHub's own runner images.

I see two possibilities, when runner.environment is 'self-hosted' and a custom image is used:

  • superfluous-actions should be disabled (problems: it is possible to run Github runners locally; some legitimate superfluous actions might exist)
  • zizmor should attempt to detect the binary, for example using command -v (problem: platform-specific)

Activity

  1. added
    bug
    triage
    on Apr 7, 2026
  2. woodruffw commented on Apr 11, 2026

    @woodruffw
    Member

    Thanks for the report @AntoineSebert! Per #1817 this finding is going to be dropped from the default persona in the next release, but I agree that further filtering it (maybe down to auditor, or just dropping it entirely?) on self-hosted runners seems fine.

  3. removed
    triage
    on Apr 11, 2026
  4. added this to the 1.25.0 milestone on Apr 11, 2026
  5. modified the milestones: 1.25.0, 1.26.0 on May 14, 2026
  6. modified the milestones: 1.26.0, 1.27.0 on Jun 20, 2026
  7. modified the milestones: 1.27.0, 1.28.0 on Jul 14, 2026
  8. modified the milestones: 1.28.0, 1.29.0 on Jul 21, 2026
  9. modified the milestones: 1.29.0, 1.30.0 on Aug 1, 2026
  10. modified the milestones: 1.30.0, 1.31.0 on Aug 30, 2026
  11. modified the milestones: 1.31.0, 1.32.0 on Oct 15, 2026
  12. modified the milestones: 1.32.0, 1.33.0 on Nov 2, 2026
  13. modified the milestones: 1.33.0, 1.34.0 on Nov 22, 2026
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions