Security batch 2026-11-02 (felhom.eu R-1336 + the new notices): security-fix steps gitea 28.3.0, uptime-kuma 2.5.9, grafana 13.2.5, actualbudget 26.11.0, n8n 2.46.4, vaultwarden 1.37.5-alpine (9202 proven, negative control first); fixtures: n8n start race, the box-admin guard knows the drill mirror, Vaultwarden's register route, Actual's log
gates / gates (push) Successful in 18s
gates / gates (push) Successful in 18s
This commit is contained in:
1 parent
313eaf68d0
commit
c760fca938
28 files changed
+1615
-31
No files matched your search
@@ -312,6 +312,15 @@ class BoxAdminSeedGuard(unittest.TestCase):
|
||||
self.assertFalse(ok, want)
|
||||
self.assertIn(want, why)
|
||||
|
||||
def test_the_drill_mirror_counts_as_the_drill(self):
|
||||
# Every walk since R-992 reads the drill through a local mirror; the guard knew only the repo's name, so vaultwarden's
|
||||
# walk on 9202 stopped at „the box is not on the drill catalog" (2026-11-02, seen live, the red of this test).
|
||||
w = FakeBoxWalk()
|
||||
w.guest = lambda script: "git:\n branch: main\n repo_url: file:///opt/docker/felhom-controller/drill-catalog.git\n"
|
||||
self.assertEqual(self.allowed(w, self.ENV), (True, ""))
|
||||
w.guest = lambda script: "git:\n branch: main\n repo_url: https://gitea.dooplex.hu/admin/app-catalog-felhom.eu.git\n"
|
||||
self.assertIn("drill catalog", self.allowed(w, self.ENV)[1])
|
||||
|
||||
def seed(self, w, env):
|
||||
with mock.patch.dict(os.environ, env, clear=False):
|
||||
if "FELHOM_BOX_ADMIN_SEED" not in env:
|
||||
|
||||
@@ -673,7 +673,10 @@ BOX_ADMIN_SEED_ENV = "FELHOM_BOX_ADMIN_SEED" # the run's explicit opt-in
|
||||
# (VM 341 on the HP box, `09` §3 decisions 149 and 158 — disposable). demo-hp's 9201 is household-shaped and is NEVER
|
||||
# here: a demo box's household apps are never seeded through their admin.
|
||||
BOX_ADMIN_SEED_GUESTS = {("demo-hp", "9202"), ("tester-1", "9201")}
|
||||
DRILL_CATALOG_MARK = "app-catalog-drill" # a test run points the box at the drill catalog (`09` §6.5)
|
||||
# A test run points the box at the drill catalog (`09` §6.5): the drill repo itself, or its local mirror on the box (R-992,
|
||||
# box_walk.MIRROR_URL's name; since then every walk uses the mirror, so the first mark alone refused the admin seed: 2026-11-02).
|
||||
DRILL_CATALOG_MARK = "app-catalog-drill"
|
||||
DRILL_CATALOG_MIRROR_MARK = "/drill-catalog.git"
|
||||
|
||||
|
||||
def box_admin_seed_allowed(w, app):
|
||||
@@ -694,7 +697,7 @@ def box_admin_seed_allowed(w, app):
|
||||
if app not in (getattr(w, "DEPLOYED_THIS_RUN", None) or set()):
|
||||
return False, "this run did not install %s (a reused app may be a household's)" % app
|
||||
conf = w.guest("grep -A3 '^git:' /var/lib/docker/volumes/felhom-controller-data/_data/controller.yaml")
|
||||
if DRILL_CATALOG_MARK not in (conf or ""):
|
||||
if DRILL_CATALOG_MARK not in (conf or "") and DRILL_CATALOG_MIRROR_MARK not in (conf or ""):
|
||||
return False, "the box is not on the drill catalog — not a test run"
|
||||
return True, ""
|
||||
|
||||
@@ -793,8 +796,28 @@ class Vaultwarden:
|
||||
"keys": {"encryptedPrivateKey": _encstring(64),
|
||||
"publicKey": base64.b64encode(secrets.token_bytes(64)).decode()},
|
||||
"kdf": 0, "kdfIterations": 600000})
|
||||
return w.app_curl(sub, "/identity/accounts/register", "-H", "Content-Type: application/json",
|
||||
data=body, method="POST")
|
||||
rc, code, out = w.app_curl(sub, "/identity/accounts/register", "-H", "Content-Type: application/json",
|
||||
data=body, method="POST")
|
||||
if code != "404":
|
||||
return rc, code, out
|
||||
# Vaultwarden 1.37 moved the route: /identity/accounts/register answers 404 (2026-11-02, 1.37.4 on 9202). The web vault
|
||||
# asks for a verification token first (with mail off it is the answer, and only for an allowed or invited address), then
|
||||
# finishes with it (src/api/identity.rs, src/api/core/accounts.rs at 1.37.4).
|
||||
d = json.loads(body)
|
||||
rc, code, out = w.app_curl(sub, "/identity/accounts/register/send-verification-email",
|
||||
"-H", "Content-Type: application/json",
|
||||
data=json.dumps({"email": d["email"], "name": d["name"]}), method="POST")
|
||||
if code != "200":
|
||||
return rc, code, out
|
||||
token = out.strip().strip('"')
|
||||
finish = json.dumps({"email": d["email"], "emailVerificationToken": token, "name": d["name"],
|
||||
"masterPasswordHash": d["masterPasswordHash"],
|
||||
"masterPasswordHint": None, "userSymmetricKey": d["key"],
|
||||
"userAsymmetricKeys": {"publicKey": d["keys"]["publicKey"],
|
||||
"encryptedPrivateKey": d["keys"]["encryptedPrivateKey"]},
|
||||
"kdf": d["kdf"], "kdfIterations": d["kdfIterations"]})
|
||||
return w.app_curl(sub, "/identity/accounts/register/finish", "-H", "Content-Type: application/json",
|
||||
data=finish, method="POST")
|
||||
|
||||
def seed(self, w, sub, say):
|
||||
if not w.wait_app(sub, "/alive", want=("200",)):
|
||||
@@ -1228,7 +1251,8 @@ class ActualBudget:
|
||||
rc, code, body = w.app_curl(sub, "/account/bootstrap",
|
||||
"-H", "Content-Type: application/json",
|
||||
data=json.dumps({"password": pw}), method="POST")
|
||||
say(f" actualbudget: /account/bootstrap http={code} :: {body[:140]}")
|
||||
# the body carries a session token when it works (2026-11-02: one reached the evidence, dead by then): only a refusal is quoted
|
||||
say(f" actualbudget: /account/bootstrap http={code}" + ("" if code == "200" else f" :: {body[:140]}"))
|
||||
if code not in ("200", "201") or '"status":"ok"' not in body:
|
||||
return None
|
||||
return {"pw": pw}
|
||||
@@ -1332,10 +1356,16 @@ class N8n:
|
||||
return None
|
||||
email = f"drill-{secrets.token_hex(4)}@gate.invalid"
|
||||
pw = "Drill" + secrets.token_hex(8) + "1"
|
||||
rc, code, body = w.app_curl(sub, "/rest/owner/setup", "-H", "Content-Type: application/json",
|
||||
data=json.dumps({"email": email, "firstName": "drill",
|
||||
"lastName": "drill", "password": pw}),
|
||||
method="POST")
|
||||
# /healthz answers before the REST routes exist: a POST 4 s after it got Express's own 404 „Cannot POST" (2026-11-02,
|
||||
# 2.44.7 on 9202, an inconclusive walk). So a 404 waits and tries again; any other refusal is an answer.
|
||||
for _try in range(12):
|
||||
rc, code, body = w.app_curl(sub, "/rest/owner/setup", "-H", "Content-Type: application/json",
|
||||
data=json.dumps({"email": email, "firstName": "drill",
|
||||
"lastName": "drill", "password": pw}),
|
||||
method="POST")
|
||||
if code != "404":
|
||||
break
|
||||
time.sleep(10)
|
||||
say(f" n8n: /rest/owner/setup http={code}")
|
||||
if code not in ("200", "201"):
|
||||
say(f" n8n: refused {body[:220]}")
|
||||
|
||||
Reference in new issue
Block a user