This PR replaces the github.com/BishopFox/jsluice dependency (and its CGO requirement github.com/smacker/go-tree-sitter) with a pure-Go JavaScript endpoint extractor using github.com/dop251/goja’s AST parser.
jsluice parser was previously guarded by //go:build !(386 || windows), meaning Windows/386 users had reduced functionality. This PR enables full JavaScript analysis on all platforms.jsluice and go-tree-sitter from the dependency graph.dop251/goja/parser and dop251/goja/ast.fetch() callsXMLHttpRequest.open()window.open()location.href / img.src assignments$.ajax) and axios calls.goreleaser/*.yml to remove CGO_ENABLED=1 and cross-compiler requirements.I have added a comprehensive test suite in pkg/utils/jsluice_test.go covering 25+ scenarios including all supported extraction patterns and edge cases.
New Tests Passing:
=== RUN TestExtractJsluiceEndpoints
--- PASS: TestExtractJsluiceEndpoints (0.01s)
--- PASS: TestExtractJsluiceEndpoints/fetch_call (0.00s)
--- PASS: TestExtractJsluiceEndpoints/XMLHttpRequest_open (0.00s)
--- PASS: TestExtractJsluiceEndpoints/window.open (0.00s)
--- PASS: TestExtractJsluiceEndpoints/location.href_assignment (0.00s)
--- PASS: TestExtractJsluiceEndpoints/malformed_JS_falls_back_to_regex (0.00s)
...
Cross-Platform Build Verification: Builds now succeed without CGO on previously problematic platforms:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build ./cmd/katana/
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build ./cmd/katana/
CGO_ENABLED=0 GOOS=windows GOARCH=386 go build ./cmd/katana/
/claim #1367
New Features
Chores
Platform
Tests
Harsh Pratap Singh
@harsh-pratap9904-gmail-com
ProjectDiscovery
@projectdiscovery
Hermes1118
@dalledajay-gmail-com