Repository navigation
Commit 988be27
committed
fix(memory): close the two remaining ways a secret reached disk
Both from PR #64 review, both correct, both the same shape — the redaction
boundary had gaps I had not walked.
**The supersede history.** `factControl(…, by)` stored a SECOND copy of the
replacing fact's text, taken from the model's raw output (`r.facts[0] ||
r.summary` in extension.js) rather than from the observation `factObservation`
had already scrubbed. It persists to facts.jsonl and surfaces as `supersededBy`
in the panel. Same text, different door.
**Edited file paths.** `outcomeEntry` redacted the title and summary and passed
`filesEdited` through untouched — and `digestMarkdown` prints those straight into
MEMORY.md ("- did X (a.js, b.js)"). A path is attacker-influenced in a hostile
repo and user-influenced everywhere else: a downloaded `key-ghp_….txt`, an .env
backup named after the token it holds. No legitimate path carries a credential
prefix, so redacting costs nothing.
Also adds a COMPLETENESS test that walks every writer with the same poisoned
string and asserts the SERIALIZED entry — exactly what appendJournal/appendFacts
put on disk — contains no secret. Both gaps here were found by review rather than
by the suite; a new field on any of these writers now fails that test instead of
shipping.
37 cases (was 34). Both new guards verified non-vacuous: reverting the `by`
redaction fails at 31/37, reverting the file-path redaction at 32/37. All 32
extension suites green.1 parent 13b90cf commit 988be27
2 files changed
Lines changed: 54 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
196 | 200 | | |
197 | 201 | | |
198 | 202 | | |
199 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
200 | 208 | | |
201 | 209 | | |
202 | 210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
164 | 208 | | |
165 | 209 | | |
166 | 210 | | |
| |||
0 commit comments