Skip to content
Open
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
16 changes: 12 additions & 4 deletions plugins/subdomain_discovery/parser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Dict, Any, List
from typing import Dict, Any

def parse(output: str) -> Dict[str, Any]:
"""
Expand All @@ -13,10 +13,18 @@ def parse(output: str) -> Dict[str, Any]:
"title": f"Subdomain Discovered: {sub}",
"category": "Subdomain",
"severity": "info",
"description": f"Discovered subdomain: {sub}",
"remediation": "Verify if this subdomain is intended to be public and secure.",
"description": (
f"Discovered subdomain: {sub}. "
"Confidence: high based on passive enumeration output."
),
"remediation": (
"Verify if this subdomain is intended to be public and secure."
),
"metadata": {
"subdomain": sub
"subdomain": sub,
"source": "subfinder",
"evidence": f"Subdomain discovered from subfinder output: {sub}",
"confidence": "high"
}
})

Expand Down
9 changes: 8 additions & 1 deletion testing/backend/unit/test_subdomain_finder_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,14 @@ def test_subdomain_discovery_parser_fixture_produces_stable_findings(plugin_mana
assert first["title"] == "Subdomain Discovered: api.secuscan.in"
assert first["category"] == "Subdomain"
assert first["severity"] == "info"
assert first["metadata"]["subdomain"] == "api.secuscan.in"

metadata = first["metadata"]

assert metadata["subdomain"] == "api.secuscan.in"
assert metadata["source"] == "subfinder"
assert metadata["confidence"] == "high"
assert "evidence" in metadata
assert "api.secuscan.in" in metadata["evidence"]


def test_subdomain_discovery_parser_empty_output_is_deterministic(plugin_manager):
Expand Down
Loading