Proposed changes

This PR removes the CGO dependency on go-tree-sitter by replacing BishopFox’s jsluice with a pure-Go implementation using dop251/goja parser.

Resolves #1367

Changes

  • Replace jsluice dependency with dop251/goja (pure-Go JavaScript parser)
  • Rewrite ExtractJsluiceEndpoints using goja’s AST walker
  • Remove platform-specific build constraints (parser_nojs.go deleted)
  • Enable jsluice functionality on all platforms (Windows, 32-bit, darwin/arm64)
  • Add recursion depth limit (500) and 5s parse timeout to prevent DoS
  • Add done channel for graceful goroutine cancellation on timeout
  • Update README: remove CGO_ENABLED=1 from install command, remove “(memory intensive)” from -jsl flag description, add -jsl flag to configuration help block

Benefits

  • No CGO required (CGO_ENABLED=0 builds work)
  • Simplified cross-platform compilation
  • Works on darwin/arm64 without cross-compilers

Proof

  • All existing tests pass
  • Added unit tests for JS endpoint extraction (complex JS, template literals, string concatenation)

Checklist

  • Pull request is created against the dev branch
  • All checks passed (lint, unit/integration/regression tests etc.) with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

/claim #1367

Claim

Total prize pool $400
Total paid $0
Status Pending
Submitted February 02, 2026
Last updated February 02, 2026

Contributors

HE

Hermes1118

@dalledajay-gmail-com

100%

Sponsors

PR

ProjectDiscovery

@projectdiscovery

$200
HE

Hermes1118

@dalledajay-gmail-com

$200