hub: the first sight of a large request is the hub's own record; no box text in the ledger (security review)
The wait of a large removed-app request was timed from a search of the windows' refusal text, which also held names a box had claimed. A box could plant the marker in a claimed name a week ahead and skip the wait and the mail. - offsite_large_requests (household, key of the app set, first_seen): written only by the hub; at most 50 rows per household; it goes with the household. No text is searched any more. - A claimed name that has not the shape of an app name is written nowhere: the ledger, the answer and the operator's message carry a fixed placeholder. Tests seen red; 6 mutations seen red (redproof-review-s1.txt). Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
1 parent
be272b7cf4
commit
1fac9c16f1
10 files changed
+261
-32
No files matched your search
@@ -451,6 +451,7 @@ or a household. The ruling: a delete removes them, with one exception — the de
|
||||
| `os_host_settings`, `os_reports`, `os_kernel_notices` | the box | the box is deleted | `store.DeleteHost`, in its one transaction |
|
||||
| the hub's own alarm marks that name the box (`hub_settings`, `os_alarm:<kind>:<box>…`) | the box | the box is deleted | the same transaction; matched on the whole id between colons, so a box whose id only starts with this id keeps its marks |
|
||||
| `offsite_keys`, `offsite_windows`, `offsite_abandon_requests` | the household | the household is deleted (the purge leg, after the outside legs) | `store.PurgeCustomerResidue`; counted in the delete dialog's residue |
|
||||
| `offsite_large_requests` (the hub's own first sight of a large removed-app request; `07` §8.2f — built, not released) | the household | the household is deleted; the daily orphan sweep | `store.PurgeCustomerResidue`, `store.PurgeOrphanRows`. At most 50 rows per household |
|
||||
| `offsite_app_presence` (the hub's own record of which apps a box runs; D72, `07` §8.2f — built, not released) | the household | the household is deleted; the daily orphan sweep takes what an earlier delete left | `store.PurgeCustomerResidue`, `store.PurgeOrphanRows`. At most 400 names per household; no age limit on a row (it would move a real app's 30 days) |
|
||||
| `operator_actions` (the operator's own action log) | the household | **one year after the deletion**, with `events` and `notification_log` | `store.PruneDeletedCustomerAudit`. *Decided by CC unattended on 2026-11-14; accepted by the operator on 2026-11-15 (`09` §3 decision 311):* it is an audit record of the same kind as the other two, and the one-year rule (decision 181) is the design's rule for those; the other option, at once, loses „who did what” on the day of the deletion |
|
||||
| **`host_deletions`, `customer_resets`** — the delete journal | both | **never** | the ruling's one exception: an id and timestamps. **An id can be a name, so this is not „no personal data”** — the design to change that is §14.3, and the privacy text waits for it (`09` §3 decision 312) |
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
SECURITY FINDING 1 on the review-fix-1 commit (875c339c) — the hub found its „first sight of a large request” by searching window text that also held box-supplied names.
|
||||
|
||||
### RED: the new tests before the fix (felhom.eu be272b7c)
|
||||
=== RUN TestD84_ABoxCannotPlantTheLargeRequestMarker
|
||||
ended_large_marker_test.go:37: a claimed name that is not an app name was written into the window's row: "more than half of the store (apps: ghost)"
|
||||
ended_large_marker_test.go:37: a claimed name that is not an app name was written into the window's row: "more than half of the store"
|
||||
ended_large_marker_test.go:37: a claimed name that is not an app name was written into the window's row: "the request is for 20 of 20 snapshots — more than half of the store (apps: ghost): it waits one week, and the operator is told"
|
||||
ended_large_marker_test.go:37: a claimed name that is not an app name was written into the window's row: "large:ghost"
|
||||
ended_large_marker_test.go:45: the box planted the marker a week ahead and the hub agreed to 10 ids at once — no wait, no warning
|
||||
--- FAIL: TestD84_ABoxCannotPlantTheLargeRequestMarker (0.05s)
|
||||
=== RUN TestD84_TheLargeRequestRecordIsBoundedAndGoesWithTheHousehold
|
||||
ended_large_marker_test.go:70: 500 different requests left 0 rows (limit 50): <nil>
|
||||
--- FAIL: TestD84_TheLargeRequestRecordIsBoundedAndGoesWithTheHousehold (0.04s)
|
||||
FAIL
|
||||
FAIL gitea.dooplex.hu/admin/felhom-hub/internal/offsitekeys 0.103s
|
||||
FAIL
|
||||
|
||||
### After the fix: mutations
|
||||
== MUTATION: a claimed name that is not an app name is written into the ledger
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestD84_ABoxCannotPlantTheLargeRequestMarker (0.05s)
|
||||
ended_large_marker_test.go:37: a claimed name that is not an app name was written into the window's row: "more than half of the store (apps: ghost)"
|
||||
ended_large_marker_test.go:37: a claimed name that is not an app name was written into the window's row: "more than half of the store"
|
||||
ended_large_marker_test.go:37: a claimed name that is not an app name was written into the window's row: "the request is for 20 of 20 snapshots — more than half of the store (apps: ghost): it waits one week, and the operator is to
|
||||
== MUTATION: the hub does not record its own first sight
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestD84_ALargeRequestWaitsAWeekAndOneWindowAgreesAtMostTheCapsSize (0.09s)
|
||||
ended_bound_test.go:108: a week later: 0 ended ids agreed with a cap of 10 — want exactly the cap's size
|
||||
--- FAIL: TestD84_TheRestGoesInTheNextWindow (0.04s)
|
||||
ended_bound_test.go:161: a week later: 0 agreed, want the cap's size 10
|
||||
|
||||
2 mutations, 0 not a red-proof
|
||||
== MUTATION: the first sight is read across households
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestD84_ABoxCannotPlantTheLargeRequestMarker (0.07s)
|
||||
ended_large_marker_test.go:59: another household reads this household's first sight
|
||||
== MUTATION: a first sight older than the memory still ends the wait
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestD84_ABoxCannotPlantTheLargeRequestMarker (0.05s)
|
||||
ended_large_marker_test.go:56: a first sight older than `since` was returned
|
||||
== MUTATION: no limit on one household's rows
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestD84_TheLargeRequestRecordIsBoundedAndGoesWithTheHousehold (0.60s)
|
||||
ended_large_marker_test.go:74: 500 different requests left 500 rows (limit 50): <nil>
|
||||
|
||||
3 mutations, 0 not a red-proof
|
||||
== MUTATION: the record does not go with the household
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestD84_TheLargeRequestRecordIsBoundedAndGoesWithTheHousehold (0.26s)
|
||||
ended_large_marker_test.go:74: 500 different requests left 0 rows (limit 50): <nil>
|
||||
|
||||
1 mutations, 0 not a red-proof
|
||||
Reference in new issue
Block a user