mirror of
https://github.com/elementalsouls/Claude-BugHunter.git
synced 2026-11-24 20:30:23 +01:00
Builds on @sseshachala's security fixes (#15 / closes #13). Triage found two defects in those fixes, corrected here: 1. Path containment was `str(resolved).startswith(str(safe))` in both cmd_recon and --out — bypassable by a sibling sharing the prefix (recon ⊂ recon-evil, <cwd> ⊂ <cwd>-evil). Replaced with a real ancestry test (`resolved == safe or safe in resolved.parents`). Verified: ../recon-evil/x and ../<cwd>-evil/x.md now rejected; valid targets accepted. 2. hunt.sh switched the scaffold heredocs to quoted (<<'EOF') to kill the $target injection (good), but left the old `\`` backslash-escapes that were only needed under the *unquoted* heredoc — under a quoted heredoc they were written literally, corrupting every generated CLAUDE.md/scope.md/etc. De-escaped all `\`` → ` inside the quoted bodies. Verified: backticks render, injection still neutralized ($(id) written literally, not executed). Bug 5 (TLS CERT_NONE under --proxy) retains #15's loud warning rather than a hard --insecure gate, since disabling verification is inherent to routing through Burp's self-signed CA — gating it would break the primary workflow. Co-Authored-By: Sudhi Seshachala <sseshachala@users.noreply.github.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>