mirror of
https://github.com/garrytan/gstack.git
synced 2026-08-09 07:46:08 +02:00
fix: security hardening + issue triage (v0.8.3) (#205)
* fix: check for bun before running setup (#147) Users without bun installed got a cryptic "command not found" error. Now prints a clear message with install instructions. Closes #147 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: block SSRF via URL validation in browse commands (#17) Adds validateNavigationUrl() that blocks non-HTTP(S) schemes (file://, javascript:, data:) and cloud metadata endpoints (169.254.169.254, metadata.google.internal). Applied to goto, diff, and newTab commands. Localhost and private IPs remain allowed for local dev QA. Closes #17 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: replace eval $(gstack-slug) with source <(...) (#133) Eliminates unnecessary use of eval across all skill templates and generated files. source <(...) has identical behavior without the shell injection surface. Also hardens gstack-diff-scope usage. Closes #133 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: rename /debug to /investigate to avoid Claude Code conflict (#190) Claude Code has a built-in /debug command that shadows the gstack skill. Renaming to /investigate which better reflects the systematic root-cause investigation methodology. Closes #190 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * test: add unit tests for path validation helpers validateOutputPath() and validateReadPath() are security-critical functions with zero test coverage. Adds 14 tests covering safe paths, traversal attacks, and prefix collision edge cases. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: bump version and changelog (v0.8.3) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: update /debug → /investigate references in docs CLAUDE.md, README.md, and docs/skills.md still referenced the old /debug skill name after the rename. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: harden URL validation against hostname bypasses (Codex P1) Codex review found that metadata IPs could be reached via hex (0xA9FEA9FE), decimal (2852039166), octal, trailing dot, and IPv6 bracket forms. Now normalizes hostnames before checking the blocklist and probes numeric IP representations via URL constructor. Also moves URL validation before page allocation in newTab() to prevent zombie tabs on rejection (Codex P3). 5 new test cases for bypass variants. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
3a315b338b
commit
c0f3c3a91a
@@ -512,25 +512,25 @@ Shipped as `/careful`, `/freeze`, `/guard`, and `/unfreeze` in v0.6.5. Includes
|
||||
|
||||
Shipped in v0.6.5. TemplateContext in gen-skill-docs.ts bakes skill name into preamble telemetry line. Analytics CLI (`bun run analytics`) for querying. /retro integration shows skills-used-this-week.
|
||||
|
||||
### /debug scoped debugging enhancements (gated on telemetry)
|
||||
### /investigate scoped debugging enhancements (gated on telemetry)
|
||||
|
||||
**What:** Six enhancements to /debug auto-freeze, contingent on telemetry showing the freeze hook actually fires in real debugging sessions.
|
||||
**What:** Six enhancements to /investigate auto-freeze, contingent on telemetry showing the freeze hook actually fires in real debugging sessions.
|
||||
|
||||
**Why:** /debug v0.7.1 auto-freezes edits to the module being debugged. If telemetry shows the hook fires often, these enhancements make the experience smarter. If it never fires, the problem wasn't real and these aren't worth building.
|
||||
**Why:** /investigate v0.7.1 auto-freezes edits to the module being debugged. If telemetry shows the hook fires often, these enhancements make the experience smarter. If it never fires, the problem wasn't real and these aren't worth building.
|
||||
|
||||
**Context:** All items are prose additions to `debug/SKILL.md.tmpl`. No new scripts.
|
||||
**Context:** All items are prose additions to `investigate/SKILL.md.tmpl`. No new scripts.
|
||||
|
||||
**Items:**
|
||||
1. Stack trace auto-detection for freeze directory (parse deepest app frame)
|
||||
2. Freeze boundary widening (ask to widen instead of hard-block when hitting boundary)
|
||||
3. Post-fix auto-unfreeze + full test suite run
|
||||
4. Debug instrumentation cleanup (tag with DEBUG-TEMP, remove before commit)
|
||||
5. Debug session persistence (~/.gstack/debug-sessions/ — save investigation for reuse)
|
||||
5. Debug session persistence (~/.gstack/investigate-sessions/ — save investigation for reuse)
|
||||
6. Investigation timeline in debug report (hypothesis log with timing)
|
||||
|
||||
**Effort:** M (all 6 combined)
|
||||
**Priority:** P3
|
||||
**Depends on:** Telemetry data showing freeze hook fires in real /debug sessions
|
||||
**Depends on:** Telemetry data showing freeze hook fires in real /investigate sessions
|
||||
|
||||
## Completed
|
||||
|
||||
|
||||
Reference in New Issue
Block a user