docs(security): audit drzewa zależności (kwiecień 2026)#184
Closed
mpasternak wants to merge 2 commits into
Closed
Conversation
Praktyka #4 z lirantal/pypi-security-best-practices (Use Deterministic Installations). Audyt wszystkich uv invocations w repo: - CI workflows (tests.yml, refresh-baseline.yml): --frozen present (good) - Dockerfile builder + test stages: --frozen present (good) - Entrypoint scripts: brak uv calls (good - moved to build time per obs 17168) - Makefile prepare-developer-machine-{macos,linux}: BRAK --frozen - dodano w tym commicie (pierwsze setup powinno respektowac lockfile) Wyjatki swiadome (udokumentowane w docs/SECURITY_PRACTICES.md): - make uv-sync (luzny dla aktywnego dev cycle) - make live-docs (sphinx-autobuild celowo poza lockfile) - make enable/disable-microsoft-auth (alternatywa: --extra office365) Nowy plik docs/SECURITY_PRACTICES.md agreguje polityki bezpieczenstwa BPP ze wszystkich PR-ow z serii pypi-security-best-practices: - Deterministyczne instalacje (--frozen) - Wheel-only policy (PR #177) - Cooldown przed instalacja (PR #175, #178) - Eksplicytny indeks PyPI (PR #174) - SHA-pinning GitHub Actions (PR #176) Doc zostanie rozbudowany w PR-ach #10 (secrets) i #11 (dep review).
Praktyka #14 z lirantal/pypi-security-best-practices (Reduce Your Package Dependency Tree). Audit przeprowadzony przez `uv tree --depth 1` + `grep -rn "^import X"` w src/ - dokumentuje stan 331 pakietow (84 top-level + 247 transitive). Wnioski: - Wiekszosc top-level deps confirmed-used przez import grep: requests (16), crossrefapi (23), celery (55), pandas (8), ortools (4), weasyprint (lazy import w raport_slotow). - matplotlib + transitive stripped w Dockerfile R6 (juz zrobione w poprzednim Docker optimization PR). - ipython tylko w [dev] extras, nie idzie do produkcji. Follow-up candidates (low priority, nie blokuje): - pygad -> matplotlib transitive (acceptable, juz strippped) - requests-oauthlib -> audit czy potrzebny vs samo requests - bibtexparser>=2.0.0b9 -> monitor stable release docs/SECURITY_PRACTICES.md zawiera teraz baseline + recipe do powtorzenia auditu (zalecany roczny cykl). Bazuje na security/deterministic-installs (PR #179).
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
Finalny PR (12/12) z serii pypi-security-best-practices — praktyka
#14: Reduce Your Package Dependency Tree.
Co się zmienia
docs/SECURITY_PRACTICES.md— nowa sekcja "Dep tree audit (kwiecień 2026)"udokumentowanego stanu drzewa zależności.
Wyniki audytu
331 packages (84 top-level + 247 transitive). Większość uzasadniona.
Confirmed-used via
grep -rn "^import X":requestscrossrefapicelerypandasortoolsweasyprintraport_slotow/views/autor.py:200.Stripped at Docker build (R6):
matplotlib,contourpy,kiwisolver,cycler— 0 imports w BPP,usuwane z venv w Dockerfile. ~38 MB oszczędności.
Dev-only (correct):
ipython,pytest*,playwright,model-bakery,Sphinx*— w[dev]extras, nie w produkcji. ✅Follow-up (low priority, NIE blokuje)
pygad→matplotlibtransitive (acceptable, już stripped).requests-oauthlib— audit czy używamy całej OAuth flow.bibtexparser>=2.0.0b9— monitor stable release.Recipe do powtórzenia
Doc zawiera kroki by powtórzyć audit (top-level tree + per-package tree
Zależności
Bazuje na
security/deterministic-installs(PR #179). Po jego mergeurebase czysto.
Plan testowy
Domykanie serii
To finalny PR z 12 wdrażających rekomendacje
lirantal/pypi-security-best-practices.
Cała seria w kolejności otwierania:
🤖 Generated with Claude Code