diff options
Diffstat (limited to 'CHANGELOG.md')
| -rw-r--r-- | CHANGELOG.md | 86 |
1 files changed, 56 insertions, 30 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index b0296f8..f34c309 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,39 +4,65 @@ ## 0.0.7 — 2026-09-14 -Security and correctness hardening, from a threat model (spec §15.1) and the -tests that hold it. +Security and correctness hardening, from a threat model (spec §15.1), an +independent review, and the tests that hold both. -- File names, paths and tool messages can no longer control the terminal: - control characters, bidirectional controls and invalid UTF-8 are printed - as escapes (`\x1b`, `\u202e`) everywhere krino prints them. -- A placeholder can no longer rename a file to "", "." or "..", or add a - ".." to a destination; such a step is skipped with a reason. +Hostile names and contents +- File names, paths, tool messages, errors, explain traces, JSON plans and + log fields can no longer control or reorder the terminal: control + characters, every bidirectional control, line and paragraph separators + and invalid UTF-8 are printed as escapes (`\x1b`, `\u202e`). +- A placeholder can no longer take a destination outside the directory the + rule names: a capture of "..", "~" or nothing is refused with a reason, + and so is a rename to "", "." or "..". - A file swapped between planning and applying - for a symlink, or for - another file with the same size and modification time - is not acted on. -- Undo refuses a trash entry name that is not a plain name inside the - Trash, and a trashinfo whose path is not absolute. + another file with the same size and modification time - is not acted on; + a step that had to take a free name stops the rest of its chain. +- `on-conflict overwrite` never trashes a directory, or another file of the + same plan; it skips or takes a free name instead. +- A content exclude holds when its content test cannot read the file + (fails closed), so a protected file krino could not read is left alone. +- Extraction tools are only found through absolute PATH entries. + +Apply and undo +- Every step is logged as soon as it has run; SIGHUP is handled like + SIGTERM. A run killed mid-chain can be undone as far as it got. - Undo reverses a file its run renamed and then moved, moved twice, or - moved and then sent to the Trash. Before, undo judged the first step - against the disk as it is now, found its destination empty (the later - step had moved the file on) and refused the whole file as "missing". Found - by the new generated apply-and-undo test. -- Folding maps the capital sharp s (ẞ) to "SS", as the other capitals - already were: "STRAẞE" in a document now matches the keyword "straße". -- Folding replaces invalid UTF-8 with U+FFFD first, so a stray invalid byte - no longer stops the letter after it from losing its accent. -- `krino new` refuses a directory whose path is not valid UTF-8 with that - reason, instead of reporting a broken template. -- The keyword cache is also discarded when normalisation changes, so answers - cached before these fixes are recomputed once. -- Builds need Go 1.25 or newer and use the Go 1.26.8 toolchain, which an - older `go` downloads itself. `golang.org/x/text` is updated to v0.41.0. - This fixes an infinite loop a crafted file's text could cause - (GO-2026-5970) and, through the toolchain, the XML nesting guard - (GO-2026-6088) and the `os/exec` and `os` fixes govulncheck reported. -- Tests: fuzz targets for every decoder of outside data (`make fuzz`), a - generated apply-and-undo round trip (`KRINO_PROPERTY_RUNS`), - enum-completeness tests, `make race` and `make vulncheck`. + moved and then trashed (it refused them before). +- Undo restores a trash entry only while it is still the file the run put + there, re-checks every file just before acting, keeps same-named files + of two directories apart, and leaves no directory behind. +- An undo that stopped part way can be finished by undoing the run again; + plain `krino undo` after an undo does that. +- The log restores a missing final newline, so a crash mid-line no longer + breaks the next run's undo. +- Trash entries skip names left orphaned in the Trash, and long names are + shortened to fit. + +Matching and the keyword cache +- Folding maps the capital sharp s (ẞ) to "SS", and replaces invalid UTF-8 + first so a stray byte no longer stops the next letter losing its accent. +- The cache keys on the extension too (it picks the extractor), and is + discarded when max-read, the Go release or the Unicode tables change; + removed keywords leave it, and an unused cache is removed. + +Command line +- Undo's per-file review behaves like review's (`w` leaves the rest + unreviewed, choices echoed). +- `w` stops krino even when applying fails. +- `--min-age` is refused by commands it does not apply to, and an empty + value is an error; a file dated in the future counts as brand new. +- `krino new` refuses a path that is not valid UTF-8, with that reason. +- A rule name cannot start with "(". +- Builds need Go 1.25 or newer and use the Go 1.26.8 toolchain; + `golang.org/x/text` is v0.41.0 (GO-2026-5970, and through the toolchain + GO-2026-6088 and the `os/exec` and `os` fixes). + +Tests +- Fuzz targets for every decoder of outside data (`make fuzz`), a generated + apply-and-undo round trip comparing files and directories + (`KRINO_PROPERTY_RUNS`), enum-completeness tests, `make race`, + `make vulncheck`, and a dependency gate that checks modules. ## 0.0.6 — 2026-09-14 |
