security: html2docx jako opcjonalny sidecar + zdjęcie docker.sock z appservera#16
Merged
Merged
Conversation
… z appservera Domyka po stronie deploya poprawkę z iplweb/bpp#552 (fallback DOCX przez HTTP zamiast docker run). - appserver: usunięty mount /var/run/docker.sock (:ro). Nowy obraz appservera nie ma już Docker CLI ani nie woła dockera, więc socket to czysta liability (RCE -> przejęcie hosta). ofelia/autoheal/monitoring zachowują socket — to demony infry bez wejścia z sieci. - nowy serwis html2docx OPCJONALNY przez profil `html2docx` (off domyślnie). Bez published portu (tylko sieć wewnętrzna, `html2docx:3030`), bez healthchecka (obraz .NET nie ma curl/wget; restart:always wystarcza), pin przez HTML2DOCX_VERSION. - .env.sample: jak włączyć (COMPOSE_PROFILES=html2docx + DJANGO_BPP_HTML2DOCX_URL w ${BPP_CONFIGS_DIR}/.env). Brak URL => fallback wyłączony (miękka degradacja). Zweryfikowane: docker compose config exit=0; profil OFF => 0 serwisów html2docx, profil ON => 1; appserver bez docker.sock w zmergowanym configu. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mpasternak
added a commit
that referenced
this pull request
Jul 12, 2026
cleanup: usuń martwy stary mechanizm html2docx (flaga + docker pull), domyka #16
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.
Cel
Domyka po stronie deploya poprawkę bezpieczeństwa z iplweb/bpp#552
(fallback konwersji DOCX przez usługę HTTP zamiast
docker runprzezdocker.sock).Zmiany
1. Zdjęcie
docker.sockz appservera (docker-compose.application.yml)Nowy obraz
iplweb/bpp_appserver(po #552) nie ma już Docker CLI ani nie woładockera — mount
/var/run/docker.sock:robył jedynym powodem, dla któregoappserver miał pełną kontrolę nad demonem Dockera hosta (RCE → przejęcie
hosta). Usunięty.
ofelia/autoheal/monitoringzachowują socket — to demony infry bezwejścia z sieci, poza zakresem zastrzeżenia.
2. Nowy serwis
html2docx— OPCJONALNY (profil)profiles: ['html2docx']→ domyślnie wyłączony, startuje tylko gdyCOMPOSE_PROFILESzawierahtml2docx.html2docx:3030).curl/wget;restart: alwayswystarcza.HTML2DOCX_VERSION(obraz wersjonowany niezależnie odDOCKER_VERSIONbpp).3.
.env.sample— jak włączyćDwa opt-in kroki:
COMPOSE_PROFILES=html2docx(repo-lokalny.env) +DJANGO_BPP_HTML2DOCX_URL=http://html2docx:3030/convert(
${BPP_CONFIGS_DIR}/.env). Brak URL → fallback wyłączony (miękka degradacja,bez crasha).
Dlaczego opcjonalny
Fallback html2docx potrzebny jest tylko tam, gdzie pandoc pada (np. core dump
na VMWare ESX). Instancje bez tego problemu jadą na samym pandocu i nie muszą
stawiać dodatkowego kontenera. Klient (bpp) i tak domyślnie ma
HTML2DOCX_URL=None→ fallback nieaktywny, dopóki deployment świadomie niewłączy obu dźwigni.
Weryfikacja
docker compose config:html2docx,COMPOSE_PROFILES=html2docx) → 1,docker.sockw zmergowanym configu (socket tylko naofelia/autoheal/monitoring).
🤖 Generated with Claude Code