docs(security): polityka sekretów i .env#182
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 #8 z lirantal/pypi-security-best-practices (No Plaintext Secrets in .env Files). Doc-only PR rozszerzajacy docs/SECURITY_PRACTICES.md o sekcje "Sekrety i .env": - Reguly: prawdziwe sekrety NIE w plaintext .env, .env.example tylko placeholders. - Rekomendowany pattern: secret manager (1Password op run/Infisical/vault) z `.env` zawierajacym tylko op:// referencje (atak nie dostaje wartosci). - Audit `.env*` przed commitem (grep na keywords + filtr placeholders). - Procedura na wypadek wycieku: rotacja, trufflehog skan, git filter-repo + key invalidation, wpis w HISTORY.rst. Status repo: - .env w .gitignore (zweryfikowane) - .env.example z placeholders (AUTH_LDAP_BIND_PASSWORD=ldap_password itp) - .env.docker z explicit warning ZMIEN_KONIECZNIE_PRZED_URUCHOMIENIEM_PRODUKCJI Bazuje na security/deterministic-installs (PR #179) ktory dodal sam plik docs/SECURITY_PRACTICES.md - po mergeu #179 ten PR rebase czysto.
2 tasks
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 10/12 z serii pypi-security-best-practices — praktyka #8: No Plaintext Secrets in .env Files.
Co się zmienia
docs/SECURITY_PRACTICES.md— nowa sekcja "Sekrety i.env":.env.op run,Infisical, vault) + przykład
op://...referencji.bpp-deployz env-injection.git filter-repo→ key invalidation)..env.example(placeholders only).Status obecnego repo (zweryfikowane)
.envw.gitignore..env.examplez placeholders (np.AUTH_LDAP_BIND_PASSWORD=ldap_password)..env.dockerz polskim ostrzeżeniemZMIEN_KONIECZNIE_PRZED_URUCHOMIENIEM_PRODUKCJI.Zależności
Bazuje na branchu
security/deterministic-installs(PR #179, który tworzydocs/SECURITY_PRACTICES.md). Po jego mergeu ten PR rebase'uje się czystodo dev.
Plan testowy
🤖 Generated with Claude Code