From 4bad84d087069dd518288c7db6f5d534887cbb47 Mon Sep 17 00:00:00 2001 From: Lilleman Date: Tue, 24 Nov 2026 20:41:01 +0100 Subject: [PATCH 1/2] File item 537: flag $ anchors in whole-input validation regexes --- todo.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/todo.md b/todo.md index 21640c83..8d60a08b 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 0.1` -`Next ID = 537` +`Next ID = 538` ## Items @@ -21,6 +21,7 @@ | 477 | 0.17.0 | | question | **Rewrite `## Goals` and `## Audience` for a setup others install and run apart from their own `~/.claude`.** | 1 | 1 | 2 | 2 | 2 | | 0.0 | | 478 | 0.17.0 | | question | **Name the project, its repo and its two commands, today proposed as `do-release` and `do-epic`.** | 1 | 1 | 2 | 2 | 1 | | 0.0 | | 523 | 0.17.0 | | | **Make the security pass and stability-reviewer check that a new secret's docs name its scope and its reach, such as the other repositories its account can use.** | 1 | 1 | 2 | 2 | 1 | 1.1 by 2 | 0.9 | +| 537 | 0.17.0 | | | **Flag regexes that use `$` to validate a whole input, since `$` also matches before a final newline.** | 1 | 2 | 2 | 3 | 1 | 1.1 by 2 | 0.9 | | 480 | 0.18.0 | | owner | **Resolve every path the tools use in one module: the release root (the folder the running code ships in), the config folder, the state folder and the Claude home. Then only that module names `~/.claude`, and the loop still runs from `~/.claude`.** | 3 | 2 | 3 | 6 | 6 | 1.6 by 3, code health by 3 | 2.4 | | 481 | 0.18.0 | 480 | owner | **Put the release's tools on `PATH` for every session the loop starts and every hook it runs, name them bare in the prose in place of `~/.claude/bin/`, and refuse the old spelling in new prose.** | 3 | 2 | 3 | 6 | 6 | 1.4 by 2, code health by 2 | 1.6 | | 482 | 0.19.0 | 478, 481 | owner | **Install the setup with `uv tool install` from a release tag, with `do-release` and `do-epic` on `PATH`, and replace `deploy-release` with `do-release self-update`.** | 3 | 2 | 3 | 6 | 7 | 1.6 by 4, 1.3 by 3 | 1.3 | @@ -199,6 +200,13 @@ Part of the standalone-install plan lilleman approved on 2026-11-20. Later items An outside reviewer found it on a client project's PR that added a secret: a Gitea token documented as able to run Actions on one repository, "and nothing wider". The token reaches every repository its owning account can, so the docs had to require a dedicated account with access to that repository only. Neither `/security-review` nor stability-reviewer raised it. Where a change adds a secret or a token, ask each to check that the doc beside it states what the credential can reach, not only what the change uses it for. +### 537. Flag regexes that use `$` to validate a whole input, since `$` also matches before a final newline. + +An outside auto-reviewer found a validation regex anchored with `$` that accepted a value with a trailing newline; neither the stability standard nor any tool flags this. In PCRE (PHP's `preg_match`, Laravel's `regex:` rule) and in Python's `re.match`, `^…$` accepts `"value\n"`. Add a bullet to stability-reviewer's "Edge Cases & Input Validation": where a change validates a whole input with a regex anchored by `$`, report it and ask for `\z` (PCRE, Python's `\Z`), PCRE's `D` modifier, or a full-match call such as Python's `re.fullmatch`. A deterministic check doesn't fit: no tool in this setup scans a project's diff for code patterns, and the regex syntax differs by language. + +Touches: +- `agents/stability-reviewer.md`: `### 5. Edge Cases & Input Validation` (small) + ### 480. Resolve every path the tools use in one module: the release root (the folder the running code ships in), the config folder, the state folder and the Claude home. Then only that module names `~/.claude`, and the loop still runs from `~/.claude`. Part of the standalone-install plan lilleman approved on 2026-11-20. `do-release` and `do-epic` stand for the names item 478 picks. Today about 160 references in some 40 modules name `~/.claude`; `bin/loop_state/paths.py` holds a few. This item changes no behaviour. -- 2.52.0 From a70ea1a726c2db0efef6a8018756d06e8b0eed37 Mon Sep 17 00:00:00 2001 From: Lilleman Date: Wed, 25 Nov 2026 08:58:18 +0100 Subject: [PATCH 2/2] File item 538: flag validation of a value other than the one the code uses --- todo.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/todo.md b/todo.md index 8d60a08b..992c34f4 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 0.1` -`Next ID = 538` +`Next ID = 539` ## Items @@ -22,6 +22,7 @@ | 478 | 0.17.0 | | question | **Name the project, its repo and its two commands, today proposed as `do-release` and `do-epic`.** | 1 | 1 | 2 | 2 | 1 | | 0.0 | | 523 | 0.17.0 | | | **Make the security pass and stability-reviewer check that a new secret's docs name its scope and its reach, such as the other repositories its account can use.** | 1 | 1 | 2 | 2 | 1 | 1.1 by 2 | 0.9 | | 537 | 0.17.0 | | | **Flag regexes that use `$` to validate a whole input, since `$` also matches before a final newline.** | 1 | 2 | 2 | 3 | 1 | 1.1 by 2 | 0.9 | +| 538 | 0.17.0 | | | **Flag validation that checks a value other than the one the code goes on to use, such as before trimming, stripping or converting it.** | 1 | 2 | 2 | 3 | 1 | 1.1 by 2 | 0.9 | | 480 | 0.18.0 | | owner | **Resolve every path the tools use in one module: the release root (the folder the running code ships in), the config folder, the state folder and the Claude home. Then only that module names `~/.claude`, and the loop still runs from `~/.claude`.** | 3 | 2 | 3 | 6 | 6 | 1.6 by 3, code health by 3 | 2.4 | | 481 | 0.18.0 | 480 | owner | **Put the release's tools on `PATH` for every session the loop starts and every hook it runs, name them bare in the prose in place of `~/.claude/bin/`, and refuse the old spelling in new prose.** | 3 | 2 | 3 | 6 | 6 | 1.4 by 2, code health by 2 | 1.6 | | 482 | 0.19.0 | 478, 481 | owner | **Install the setup with `uv tool install` from a release tag, with `do-release` and `do-epic` on `PATH`, and replace `deploy-release` with `do-release self-update`.** | 3 | 2 | 3 | 6 | 7 | 1.6 by 4, 1.3 by 3 | 1.3 | @@ -207,6 +208,13 @@ An outside auto-reviewer found a validation regex anchored with `$` that accepte Touches: - `agents/stability-reviewer.md`: `### 5. Edge Cases & Input Validation` (small) +### 538. Flag validation that checks a value other than the one the code goes on to use, such as before trimming, stripping or converting it. + +An outside human reviewer found input validation that checked the value the client sent, while the code then searched with a normalised value, with its leading zeros stripped. A value passed the minimum-length rule, but the search ran on far fewer characters and matched broadly. Stability-reviewer didn't flag it. The implementer's unit test listed the bad value as accepted: its expected values came from the code, not the requirement, which the technical principles' test bullet already bans and section 11 already asks about. Add a bullet to stability-reviewer's "Edge Cases & Input Validation": where a change validates a value and then trims, strips, converts or otherwise normalises it before use, check that each rule, such as a minimum length, holds for the value the code uses, and report an input that passes the check but reaches the code as something the check would refuse. A deterministic check doesn't fit: whether two values are the same one is semantic, and no tool here scans a project's diff for code patterns. Kept apart from item 537, since the two catch different faults, though one chunk may take both. + +Touches: +- `agents/stability-reviewer.md`: `### 5. Edge Cases & Input Validation` (small) + ### 480. Resolve every path the tools use in one module: the release root (the folder the running code ships in), the config folder, the state folder and the Claude home. Then only that module names `~/.claude`, and the loop still runs from `~/.claude`. Part of the standalone-install plan lilleman approved on 2026-11-20. `do-release` and `do-epic` stand for the names item 478 picks. Today about 160 references in some 40 modules name `~/.claude`; `bin/loop_state/paths.py` holds a few. This item changes no behaviour. -- 2.52.0