Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bbot/modules/retirejs.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ async def handle_event(self, event):
"severity": severity,
"confidence": "HIGH",
"component": component,
"url": event.parent.data["url"],
"url": event.parent.parsed_url.geturl(),
}
await self.emit_event(
data,
Expand Down
2 changes: 2 additions & 0 deletions bbot/test/test_step_2/module_tests/test_module_retirejs.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ def check(self, module_test, events):
for finding in retirejs_findings:
assert "description" in finding.data, "Finding should have description"
assert "url" in finding.data, "Finding should have url"
# url field should point to the page that loaded the JS, not the JS file itself
assert finding.data["url"] == "http://127.0.0.1:8888/", "url should be the parent page URL"
assert finding.parent.type == "URL_UNVERIFIED", "Parent should be URL_UNVERIFIED"


Expand Down
Loading