Repository navigation
v0.12.28
v0.12.28 — a log line that contains one of logscry's own placeholders is no longer mixed up with a real value
With --llm-anonymize, a log line that already contained text shaped like logscry's own placeholders, such as <HOST_1> (logscry's output fed back in, or a test log), got that same placeholder assigned to a real value. login as <HOST_1> from db.corp.internal was sent as login as <HOST_1> from <HOST_1>, so the model was told the same host appeared twice. On the card the explanation came back as login as db.corp.internal from db.corp.internal: a real value where the log had literal text. A literal in a context line could take the alerting line's value the same way. In v0.12.27, a line with an escaped URL and such a collision was refused instead of sent. Present since v0.4.0.
This was a correctness defect, not a leak: nothing more reached the model endpoint.
Found while working on GHSA-p47p-xrhj-3x7p.
What changed:
- Before masking a request, the anonymizer reserves every placeholder that already appears in it as text, and never assigns a reserved one: the line above is now sent as
login as <HOST_1> from <HOST_2>, and the card showslogin as <HOST_1> from db.corp.internal. - A placeholder the anonymizer never assigned is restored as the literal text it was.
- Escaped lines with such text, refused in v0.12.27, are sent again.
- Lines without placeholder-shaped text are masked exactly as before.
Measured:
- Against v0.12.27, over more than 300,000 inputs, including 174,516 records from 10 real journald boots: no masked byte moves; only placeholder numbering changes, and only on lines that carry placeholder text.
- Wire check against a capturing endpoint: v0.12.27 sends one placeholder for two different things and the card shows the wrong value; v0.12.28 sends distinct placeholders and the card shows what the log said.
- No measurable cost on ordinary lines.
Install: download the binary for your OS from the assets below, or go install github.com/maxie7/logscry/cmd/logscry@latest.
Known limitations:
- No new ones from this change. The full list is in the README's Known limitations.
Tracked as #142.