Skip to content

[BUG]: uv cache poisoning result is flipped #1081

Description

@nijel

Pre-submission checks

  • I am not filing a feature request. These should be filed via the feature request form instead.
  • I have looked through both the open and closed issues for a duplicate report.

zizmor version

1.12.0

Expected behavior

I have a release workflow that disables caching in astral-sh/setup-uv:

    - uses: astral-sh/setup-uv@d9e0f98d3fc6adb07d1e3d37f3043649ddad06a1 # v6.5.0
      with:
        enable-cache: false

As such, it should not be vulnerable to cache poisioning because it disables cache usage.

Actual behavior

zizmor complains that this is vulnerable to cache poisioning:

error[cache-poisoning]: runtime artifacts potentially vulnerable to a cache poisoning attack
   --> .github/workflows/setup.yml:7:1
    |
  7 | / on:
  8 | |   push:
...   |
 13 | |     - weblate-*
 14 | |   pull_request:
    | |_______________^ generally used when publishing artifacts generated at runtime
 15 |
...
171 |       - uses: astral-sh/setup-uv@d9e0f98d3fc6adb07d1e3d37f3043649ddad06a1 # v6.5.0
172 | /       with:
173 | |         enable-cache: false
    | |___________________________^ opt-in for caching here
    |
    = note: audit confidence → Low
    = note: this finding has an auto-fix

With auto-fix it actually turns on the caching:

diff --git .github/workflows/setup.yml .github/workflows/setup.yml
index 8c14edef56..b791929c0e 100644
--- .github/workflows/setup.yml
+++ .github/workflows/setup.yml
@@ -34,7 +34,7 @@ jobs:
         persist-credentials: false
     - uses: astral-sh/setup-uv@d9e0f98d3fc6adb07d1e3d37f3043649ddad06a1 # v6.5.0
       with:
-        enable-cache: false
+        enable-cache: true
     - name: Setup Python
       uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
       with:
@@ -170,7 +170,7 @@ jobs:
       run: find dist -mindepth 1 -not -name '*.tar.gz' -not -name '*.whl' -delete
     - uses: astral-sh/setup-uv@d9e0f98d3fc6adb07d1e3d37f3043649ddad06a1 # v6.5.0
       with:
-        enable-cache: false
+        enable-cache: true
     - run: uv publish --trusted-publishing always
 
   publish_github:

Reproduction steps

  1. Take this workflow https://github.com/WeblateOrg/weblate/blob/6d869679264dd4e42ad31125b4e9cf5d3de191fd/.github/workflows/setup.yml#L35
  2. Run zizmor .github/workflows/setup.yml

Logs


Additional context

No response

Activity

  1. added
    bugSomething isn't working
    triageIssue is being triaged
    on Aug 14, 2025
  2. woodruffw commented on Aug 14, 2025

    @woodruffw
    Member

    Hi @nijel, thanks for the report!

    Yeah, that looks like a flipped default. I'll be able to triage more later today.

  3. changed the title [-][BUG]: uv cache poisinoning works reverse[/-] [+][BUG]: uv cache poisoning result is flipped[/+] on Aug 14, 2025
  4. added a commit that references this issue on Aug 15, 2025
  5. woodruffw commented on Aug 15, 2025

    @woodruffw
    Member

    #1082 will fix this, thanks for reporting @nijel!

    (I'll do a patch release once that's in.)

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions