ЛР 7 - БВТ2301 - Никифорова - на 4 #58

Closed
eqktrin wants to merge 8 commits from eqktrin/mtusi2026lab7:solution/bvt2301-nikiforova into main
Showing only changes of commit d3b8d919e3 - Show all commits
+3 -1
View File
@@ -177,7 +177,9 @@ def main():
wrong_name.startswith("cert_error"), wrong_name)
# 1b. Наружу — только loopback-порты; app-контейнеры hardened.
ps_out = compose("ps", "--format", "{{.Service}}|{{.Ports}}").stdout
ps_out = run(["docker", "ps",
"--filter", "label=com.docker.compose.project=messenger-lab7",
"--format", "{{.Names}}|{{.Ports}}"]).stdout
public = [line for line in ps_out.splitlines()
if "->" in line and "127.0.0.1:" not in line and "[::1]:" not in line]
check("exposure: no service published on all interfaces", not public,