Skip to content

Scrub the recorded fixtures before the first one lands in a public tree #109

Description

@iderex

#21 builds the fake server out of responses recorded from real servers. A
response recorded from a real server carries what that server holds: the titles
in somebody's library, a user identifier, a device identifier, a session token,
an address, and in a watch history a fairly complete account of how somebody
spends their evenings.

This repository is public, and a fixture committed once is in the history whether
or not a later change deletes the file. M8 holds the position that personal data
stays on the operator's host unless the operator deliberately federates. A public
fixture directory carrying one real library breaks that position through the test
suite, before a client exists, in the one place nobody thinks to look for it.

The order is the argument #99 already makes for line endings. A rule added after
fixtures have landed does nothing about the ones already recorded, and the repair
is a history rewrite rather than a commit.

What this produces

A named set of fields that never appear in a fixture. It is the same list the
error payload rule in #4 and the logging rule in #71 need, so it is written once
and referred to twice rather than written three times and drifting.

A recording procedure that replaces those fields with values that are obviously
synthetic and stable across recordings. Obviously synthetic so that a reader can
tell at a glance whether a fixture was scrubbed, and stable because identifiers
that change on every recording turn every re-recording into a diff nobody can
read, which is how a real value slips through in the noise.

A check over the fixture directories that refuses a value matching any of the
named shapes, so the rule is held by a failure rather than by whoever is
recording a fixture at eleven at night remembering it.

The same check applied to the re-recording run in #104, since that is the path
that would otherwise put back exactly what this removes.

Done when

The check runs in the gate, a fixture carrying a token, a server address or a
real user identifier reddens it and names the file and the field, every fixture
in the tree passes it, and the recording procedure sits where somebody about to
record a fixture will read it. Blocked on #21. The field list is shared with #4
and #71, so whichever lands first writes it and the others name it rather than
restating it.

Metadata

Metadata

Assignees

Labels

legalLicensing, data protection, and the intended-use positionsecuritytests

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions