singularity-forge/.plans
Jeremy McSpadden 45bff3456c feat(gsd): add directory safeguards for system/home paths (#1053)
* feat(gsd): add directory safeguards to prevent running in system/home paths

GSD previously had no protection against being launched from dangerous
directories like $HOME, /, /usr, or /etc. This adds layered validation:

- Blocked system paths (hard stop): /, /usr, /etc, /var, $HOME, tmpdir, etc.
- High entry count heuristic (>200 entries triggers confirmation dialog)
- Symlink resolution via realpathSync to prevent bypass
- Integrated at three chokepoints: projectRoot(), showSmartEntry(), bootstrapGsdDirectory()

Includes 19 tests covering all blocked categories, boundary conditions, and
the assertSafeDirectory throw/return behavior.

* fix: make directory safeguard tests cross-platform (Windows CI)

- Skip Unix-specific blocked path tests on Windows (/, /usr, /etc, etc.)
- Add Windows-specific blocked path tests (C:\, C:\Windows)
- Use platform-appropriate path separator in trailing slash test
- Fix root path normalization for Windows drive letters (C:\ not C:)
2026-03-17 21:57:53 -06:00
..
autocomplete-qol-improvements.md feat(autocomplete): add /thinking completions, GSD subcommand descriptions, and test coverage (#1019) 2026-03-17 18:27:17 -06:00
directory-safeguards.md feat(gsd): add directory safeguards for system/home paths (#1053) 2026-03-17 21:57:53 -06:00
dynamic-model-discovery.md feat: dynamic model discovery & provider management UX (#581) 2026-03-16 06:23:18 -06:00
fix-high-cpu-process-lifecycle.md fix: reduce CPU usage on long auto-mode sessions (#921) 2026-03-17 13:58:14 -06:00
issue-125-provider-fallback.md feat: add cross-provider fallback when rate/quota limits are hit (#125) 2026-03-14 15:45:44 -05:00
issue-524-git2-migration.md feat: move git operations to Rust via git2 crate (#572) 2026-03-15 20:02:10 -06:00
issue-575-dynamic-model-routing.md feat: dynamic model routing for token consumption optimization (#579) 2026-03-16 07:53:53 -06:00
issue-672-parallel-milestone-orchestration.md feat: parallel milestone orchestration foundation (#672) 2026-03-16 20:32:10 -06:00
native-perf-optimizations.md feat: native perf optimizations — deriveState, JSONL, paths, parsing (#576) 2026-03-15 20:16:42 -06:00
onboarding-detection-wizard.md feat: add project onboarding detection and init wizard 2026-03-17 17:31:52 -05:00
preferences-wizard-completeness.md feat: dynamic model discovery & provider management UX (#581) 2026-03-16 06:23:18 -06:00
startup-performance.md Perf/gsd startup speed (#497) 2026-03-15 13:33:43 -06:00
tui-dashboard-cleanup.md refactor: TUI dashboard cleanup, dedup, and feature improvements (#931) 2026-03-17 14:02:26 -06:00