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
@@ -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