codebase-snapshot 0.20.4 → 0.20.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -30,6 +30,51 @@ deprecated with an explanatory message instead. `latest` has pointed at 0.9.0 si
30
30
 
31
31
  ---
32
32
 
33
+ ## 0.20.5
34
+
35
+ **The second 0.20 audit found twelve regressions and bypasses left by the first hardening pass.
36
+ This release closes all of them and records the regression that pins each route.**
37
+
38
+ Security and confinement:
39
+
40
+ - A tracked symlink is now emitted only when its target survived the snapshot's own filters. The
41
+ previous check compared the target to the sensitive-file list but not to include, exclude, the
42
+ built-in deny-list or .gitignore, so notes.txt -> .git/config shipped the CI token in the
43
+ repository config. The authorization-header rule is case-insensitive again without making its
44
+ mixed-case credential tests case-insensitive.
45
+ - snapshot://prompt, snapshot://reports/*, snapshot://manifest, snapshot_history,
46
+ snapshot_workspace, GET /api/snapshot and the web manifest read now go through one confined
47
+ reader that refuses a symlink and requires the canonical target inside the snapshot directory.
48
+ - reports/diff.md now runs git with core.quotepath=false and diff.noprefix=false, fails closed when
49
+ a section header cannot be attributed to a path, redacts before truncation using the diffed
50
+ file's own extension, and honours --only and the built-in ignore list.
51
+ - Owner-brief headings, project-overview prose and commit subjects/bodies use the full content
52
+ scanner, not the path-only rule set. A PEM body or a token in "## Incident ghp_..." no longer
53
+ reaches PROMPT.md.
54
+ - MCP regex tools refuse nested quantifiers and multiple unbounded repetitions instead of running a
55
+ main-thread ReDoS; HTTP MCP caps in-flight tool calls at four, evicts the oldest session at 64,
56
+ and prunes rate windows.
57
+ - serve confines a local config's tmpDir as well as its outDir; a failed or oversized remote clone
58
+ removes its temporary directory.
59
+ - init --install-hook refuses a symlinked hooks directory or hook file, and a hard-linked hook.
60
+
61
+ State and contract:
62
+
63
+ - If the Windows/OneDrive in-place swap removes the old snapshot and then cannot move the new one
64
+ in, staging is left on disk and named, instead of being deleted by the failure handler.
65
+ - generate --workspace --dry-run writes nothing, and a workspace output root equal to the working
66
+ directory or an ancestor is refused.
67
+ - validate --staged accepts a staged file that was deleted from the working tree by reading the
68
+ index and passing the staged paths to discovery.
69
+ - snapshot_validate, snapshot_explain and snapshot_plan accept only/ignore; --port 0 works again and
70
+ ports are bounded at 65535.
71
+ - The config-key parity proof is a real satisfies assertion rather than an inert as never. It
72
+ immediately found two accepted aliases, exclude and secretRules, that the TypeScript config type
73
+ could not spell; both are now in SnapshotConfig.
74
+ - Emitted-body lines count a trailing blank line, so a full file no longer reports "34 of 35 lines"
75
+ with incompleteCount: 0. The README ingestion guide numbers its steps once, and a YAML secret:
76
+ section that is a mapping is no longer masked wholesale.
77
+
33
78
  ## 0.20.4
34
79
 
35
80
  **The 0.20 hardening audit found fifteen material defects, almost all of them a guard that existed
package/README.md CHANGED
@@ -211,7 +211,7 @@ Everything an agent needs is available as data, and the tool can install its own
211
211
  ```bash
212
212
  npx codebase-snapshot describe --format json # contract: workflow, options, exit codes
213
213
  npx codebase-snapshot skill --install # into .claude/skills + .cursor/rules
214
- npx -y codebase-snapshot@0.20.4 mcp # or serve it over MCP
214
+ npx -y codebase-snapshot@0.20.5 mcp # or serve it over MCP
215
215
  ```
216
216
 
217
217
  An agent told only "use `npx codebase-snapshot`" can read the contract, follow its ordered