deps(uv): make uv-lock-cooldown (manual lock z 3-dniowym cooldownem)#178
Merged
Conversation
…lock Praktyka #2 z lirantal/pypi-security-best-practices (Install with Cooldown). PR #175 dodal cooldown w Dependabot - automatyczne updaty czekaja 3 dni zanim trafia do nas jako PR-y. Ten target dodaje rownowazne zabezpieczenie przy MANUAL `uv lock` (np. po dodaniu nowej dep przez deva). uv 0.9.x nie wspiera ISO 8601 duration w `--exclude-newer` (tylko absolutna data) - dlatego target oblicza date dynamicznie przez `date`. GNU date i BSD date maja rozne flagi - target wspiera oba. Pakiety in-house (*-iplweb) zwolnione przez --exclude-newer-package= <pkg>=<2099-01-01>: cooldown na nie nie ma sensu (atak na konto teamu co publikuje BPP uderzylby je tak czy tak), a swieze releasy sa czesto load-bearing (dziala to jako blocker resolution). Uzycie: make uv-lock-cooldown # default 3 dni make uv-lock-cooldown CUTOFF=2026-04-20T00:00:00Z # custom cutoff
This was referenced Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Podsumowanie
PR 6/12 z serii pypi-security-best-practices — praktyka #2: Install with Cooldown.
Defense-in-depth do Dependabot cooldown z PR #175.
Co się zmienia
Makefile:uv-lock-cooldown— uruchamiauv lock --exclude-newer <today-3d>.*-iplwebzwolnione z cooldownu via--exclude-newer-package.make uv-lock-cooldown CUTOFF=2026-04-20T00:00:00Z.Dlaczego osobny target a nie globalna konfiguracja
uv 0.9.x nie wspiera ISO 8601 duration syntax w
[tool.uv] exclude-newer—trzeba absolutną datę. Globalny
exclude-newer = "2026-04-20"w pyprojectmusiałby być rotowany ręcznie, co po tygodniu staje się bezsensowne.
Target z dynamicznym obliczaniem daty przez
date(GNU + BSD compatible) tonajczystsze rozwiązanie póki uv nie wspiera duration.
Pakiety in-house exempt
*-iplwebto pakiety publikowane przez ten sam team co BPP. Cooldown nanie nie ma sensu (atak na konto teamu uderzyłby je tak czy tak), a świeże
releasy są często load-bearing (
django-redis-iplweb>=6.0.1,<6.1testowofalował resolution bez exempta).
Plan testowy
make uv-lock-cooldown— passes (uv lock z cutoff działa).date -v-3dna macOS, GNUdate -d '3 days ago'na Linux — obabranche pokryte.
make uv-lock(no cooldown,np. dla emergency hotfix) lub
make uv-lock-cooldown(default).Następne kroki
Gdy uv >=1.x doda duration syntax w
exclude-newer, zamigrujemy globalniedo
[tool.uv]i usuniemy target z Makefile.🤖 Generated with Claude Code