Skip to content

uv Git checkout marker follows a repository-controlled symlink #21857

Description

@N0zoM1z0

Summary

uv follows a repository-controlled .ok symlink when marking a Git checkout
ready. A Git dependency can track .ok as a symlink to an existing writable
file outside the checkout. During a successful uv pip install, uv follows
that symlink and truncates the target. Native Git clone plus git reset --hard
leaves the target unchanged.

There is no error: the installation succeeds. Reproduce with:

unzip attachments.zip
cd attachments
UV_BIN=uv ./reproduce.sh uv-git-ok-repro

Relevant output:

uv_version=uv 0.12.17 (7f9bce21f 2026-09-20 x86_64-unknown-linux-gnu)
uv_source_revision=7f9bce21fbcb00c2799c402afb5411e1ed614f9e
tracked_ok_kind=120000
native_clone_rc=0
native_reset_rc=0
native_external_unchanged=yes
install_rc=0
victim_after_bytes=0
external_marker_consumed=yes
package_build_consumed=yes

The Git source controls .ok as a symlink to a pre-existing victim file. The
native-Git control does not alter the victim, while uv's checkout marker write
does. The detailed source analysis, impact, exact revisions, and reproduction
materials are in report.md and attachments.zip.

Attachments

report.md

attachments.zip

Platform

Linux 6.1.0-53-cloud-amd64 x86_64 GNU/Linux

Version

uv 0.12.13 (0ebbd9274a55a8a53a13970be3b97e4209598e17); also reproduced on current main, uv 0.12.17 (7f9bce21fbcb00c2799c402afb5411e1ed614f9e).

Python version

Python 3.11.2

Activity

  1. added
    bug
    on Sep 20, 2026
  2. added a commit that references this issue on Sep 22, 2026
  3. added a commit that references this issue on Sep 23, 2026
    8ca7255
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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions