Skip to content

Fix/redaction linear - #3

Merged
drobison00 merged 2 commits into
mainfrom
fix/redaction-linear
Oct 31, 2026
Merged

drobison00 merged 2 commits into
mainfrom
fix/redaction-linear

Conversation

@drobison00

Copy link
Copy Markdown
Owner

No description provided.

…ry shape

The private-key shape searched lazily for an END from every BEGIN, so
text with many BEGINs and no END was rescanned to its end from each one:
quadratic in a journal message, a model's answer or an SSH key comment,
all of which reach redact() with no length cap (112 KB took 2.9 s, on
the service loop or as root). A block with no END now takes the rest of
the text: one scan, and a key cut short by a field cap is no longer
passed through in clear, which the old shape also did.

The JWT shape started at \b, which allows a fresh start after every `-`
in one run (`eyJ-eyJ-...`), each scanning to the run's end. It is now
anchored at the start of a run, as the KEY= shape is; a JWT glued after
a hyphen is no longer cut.

The shapes are now named (SHAPES), and redact_test holds a hostile
repetition for every name, with a test that the two key sets match. The
timing list had grown one fix at a time and covered every shape but
these two; a new shape without its measurement now fails the suite.
Four valid authorized_keys files of 3000 keys fit the GLOB read caps but
expanded about threefold into key records, past the 1 MiB event limit,
so the whole ssh.keys.home observation failed to publish and every
home's keys went unread for the day. Crontabs already have a budget for
this (_table); the key parser did not.

Each file now keeps at most MAX_KEYS_PER_FILE keys, and all files
together KEPT_BYTES of JSON, as _table does; what is not kept is counted
per file and in all (`dropped`), and the evaluator's keys view carries
it. A comment goes through _clean like every other free-text field:
redacted from its first REDACT_CHARS and cut to ARGS_CHARS, rather than
reaching the collector's redaction whole. The key type is cut to
IDENT_CHARS.
@drobison00
drobison00 merged commit f69635f into main Oct 31, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant