Skip to content

Fix retirejs crash on URL_UNVERIFIED parent events from gowitness#2987

Merged
liquidsec merged 1 commit into3.0from
fix-retirejs-parent-url
Mar 24, 2026
Merged

Fix retirejs crash on URL_UNVERIFIED parent events from gowitness#2987
liquidsec merged 1 commit into3.0from
fix-retirejs-parent-url

Conversation

@liquidsec
Copy link
Contributor

Summary

  • Fix string indices must be integers, not 'str' crash in retirejs.handle_event() at line 191
  • event.parent.data["url"] assumed the parent event's data was a dict, but URL_UNVERIFIED parents (e.g. from gowitness) have string data
  • Changed to event.parent.parsed_url.geturl() which works for all URL-bearing parent types (URL, URL_UNVERIFIED, HTTP_RESPONSE)
  • Added test assertion verifying the url field points to the parent page, not the JS file itself

Use event.parent.parsed_url.geturl() to get the source page URL
instead of event.parent.data["url"] which crashes on URL_UNVERIFIED
parents (string data, not dict).
@liquidsec liquidsec changed the title Fix retirejs crash on URL_UNVERIFIED parent events Fix retirejs crash on URL_UNVERIFIED parent events from gowitness Mar 24, 2026
@github-actions
Copy link
Contributor

📊 Performance Benchmark Report

Comparing 3.0 (baseline) vs fix-retirejs-parent-url (current)

📈 Detailed Results (All Benchmarks)

📋 Complete results for all benchmarks - includes both significant and insignificant changes

🧪 Test Name 📏 Base 📏 Current 📈 Change 🎯 Status
Bloom Filter Dns Mutation Tracking Performance 4.33ms 4.33ms +0.1%
Bloom Filter Large Scale Dns Brute Force 17.42ms 17.55ms +0.8%
Large Closest Match Lookup 366.75ms 335.91ms -8.4%
Realistic Closest Match Workload 192.82ms 179.33ms -7.0%
Event Memory Medium Scan 1769 B/event 1766 B/event -0.1%
Event Memory Large Scan 1757 B/event 1757 B/event +0.0%
Event Validation Full Scan Startup Small Batch 369.39ms 369.59ms +0.1%
Event Validation Full Scan Startup Large Batch 524.65ms 518.35ms -1.2%
Make Event Autodetection Small 25.31ms 25.26ms -0.2%
Make Event Autodetection Large 256.28ms 256.17ms -0.0%
Make Event Explicit Types 10.79ms 10.92ms +1.2%
Excavate Single Thread Small 3.545s 3.474s -2.0%
Excavate Single Thread Large 8.924s 8.739s -2.1%
Excavate Parallel Tasks Small 3.690s 3.685s -0.1%
Excavate Parallel Tasks Large 7.045s 6.819s -3.2%
Is Ip Performance 3.14ms 3.17ms +1.1%
Make Ip Type Performance 11.49ms 11.30ms -1.6%
Mixed Ip Operations 4.52ms 4.47ms -1.2%
Typical Queue Shuffle 61.32µs 62.12µs +1.3%
Priority Queue Shuffle 712.20µs 710.01µs -0.3%

🎯 Performance Summary

No significant performance changes detected (all changes <10%)


🐍 Python Version 3.11.15

@codecov
Copy link

codecov bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91%. Comparing base (de31418) to head (f3c59c6).
⚠️ Report is 28 commits behind head on 3.0.

Additional details and impacted files
@@          Coverage Diff          @@
##             3.0   #2987   +/-   ##
=====================================
- Coverage     91%     91%   -0%     
=====================================
  Files        436     436           
  Lines      36918   36919    +1     
=====================================
- Hits       33567   33549   -18     
- Misses      3351    3370   +19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@liquidsec liquidsec merged commit 3a6f2ec into 3.0 Mar 24, 2026
16 checks passed
@liquidsec liquidsec deleted the fix-retirejs-parent-url branch March 24, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants