Skip to content

Commit 0d6ff56

Browse files
committed
Surface full scan data in the dashboard and add deeper checks
Make the dashboard a complete data view, not just a findings list: - New cards from data we already gather: full DNS records (A/AAAA/MX/NS/SOA/TXT), raw HTTP headers, cookies, social tags with an Open Graph preview, robots.txt rules, sitemap pages, linked domains, security.txt, and server status with response time. - New checks: TLS connection detail (cipher suite, ALPN, forward secrecy) and certificate serial / SHA-256 fingerprint / extended key usage; reverse DNS host names; a server-location map; DNS blocklist checks (Cloudflare, Quad9, AdGuard and others); and Cross-Origin-Resource-Policy / Embedder-Policy. - A "Passes" roll-up showing what the domain gets right, and an active-scan toggle in the dashboard (off by default).
1 parent 9fc5aef commit 0d6ff56

20 files changed

Lines changed: 506 additions & 21 deletions

‎CHANGELOG.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ All notable changes to this project are documented here. The format is loosely
44
based on [Keep a Changelog](https://keepachangelog.com/), and the project aims
55
to follow semantic versioning once it reaches 1.0.
66

7+
## [1.1.0] - 2026-06-29
8+
9+
### Added
10+
11+
- Much deeper data in the dashboard: full DNS records (A/AAAA/MX/NS/SOA/TXT),
12+
raw HTTP headers, cookies, social tags with an Open Graph image preview,
13+
robots.txt rules, sitemap pages, linked domains, a security.txt card, and a
14+
server-status card with response time.
15+
- New checks: TLS connection detail (cipher suite, ALPN, forward secrecy) and
16+
certificate serial / SHA-256 fingerprint / extended key usage; reverse DNS host
17+
names; a server-location map; DNS blocklist checks (Cloudflare, Quad9, AdGuard,
18+
and others); and Cross-Origin-Resource-Policy / Embedder-Policy headers.
19+
- A "Passes" roll-up that shows what the domain gets right.
20+
- An active-scan toggle in the dashboard (off by default, runs the port scan).
21+
722
## [1.0.0] - 2026-06-28
823

924
### Added

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,13 @@ own footprint.
173173
| --- | --- |
174174
| **DNS** | Resolution, CAA issuance control, DNSSEC, nameserver redundancy, IPv6 (AAAA) readiness, DANE/TLSA |
175175
| **HTTP** | HTTPS reachability, HTTP to HTTPS redirect, security headers + value quality, CORS policy, cookie flags + SameSite, Cross-Origin-Opener-Policy, security.txt, version disclosure |
176-
| **TLS** | Trust and failure reason (expired, self-signed, hostname mismatch, untrusted), expiry, protocol version, key strength, signature algorithm, hostname match, supported-protocol enumeration, and a Mozilla-style config grade |
176+
| **TLS** | Trust and failure reason (expired, self-signed, hostname mismatch, untrusted), expiry, protocol version, key strength, signature algorithm, hostname match, supported-protocol enumeration, Mozilla-style config grade, cipher suite, ALPN, forward secrecy, and certificate serial/fingerprint/EKU |
177177
| **Email** | MX, SPF (policy, multiple records, 10-lookup limit), DMARC (policy, subdomain policy, enforcement coverage), DKIM (presence + key strength), MTA-STS (record + policy validation), TLS-RPT, BIMI |
178178
| **Domain** | Registrar, registration age, and expiry via RDAP |
179179
| **Subdomains** | Public subdomain discovery via certificate transparency (crt.sh, CertSpotter) and passive DNS (HackerTarget), sensitive-name flagging, and dangling-CNAME takeover detection |
180180
| **Recon** | Technology fingerprint (CMS, framework, web server, CDN, analytics, with versions), vulnerable JavaScript libraries, and public cloud-storage (S3/GCS/Azure) exposure |
181-
| **Infrastructure** | IP geolocation + ASN/hosting, full redirect chain, WAF/CDN detection, robots.txt, sitemap.xml, link analysis, and social meta tags |
182-
| **Threat intel** | Typosquatting / lookalike-domain detection, malware/phishing reputation (URLhaus), and Wayback archive history |
181+
| **Infrastructure** | IP geolocation + ASN/hosting, reverse DNS, server response time, full redirect chain, WAF/CDN detection, robots.txt, sitemap.xml, link analysis, and social meta tags |
182+
| **Threat intel** | Typosquatting / lookalike-domain detection, malware/phishing reputation (URLhaus), DNS blocklist checks (Cloudflare, Quad9, AdGuard…), and Wayback archive history |
183183

184184
Every issue is scored by severity into a 0 to 100 risk score and an A to F grade.
185185

‎src/sentineldeck/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""SentinelDeck: passive attack-surface visibility for small businesses."""
22

3-
__version__ = "1.0.0"
3+
__version__ = "1.1.0"

‎src/sentineldeck/dashboard.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def _emit(self, event: str, data: dict) -> None:
7979
def _scan(self) -> None:
8080
params = parse_qs(urlparse(self.path).query)
8181
target = (params.get("domain") or [""])[0].strip()
82+
active = (params.get("active") or ["0"])[0] == "1"
8283
self._sse_open()
8384
try:
8485
domain = normalize_domain(target)
@@ -87,7 +88,8 @@ def _scan(self) -> None:
8788
return
8889
try:
8990
report = scan_domain(
90-
domain, timeout=timeout, progress=lambda label: self._emit("progress", {"label": label})
91+
domain, timeout=timeout, active=active,
92+
progress=lambda label: self._emit("progress", {"label": label}),
9193
)
9294
self._emit("done", report.to_dict())
9395
except Exception as exc: # noqa: BLE001 - report the failure to the page

‎src/sentineldeck/risk/scoring.py‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,70 @@ def build_findings(checks: dict) -> list[Finding]:
233233
evidence={"ports": risky_ports},
234234
))
235235

236+
blocked = checks.get("blocklists", {}).get("blocked_security", [])
237+
if blocked:
238+
findings.append(Finding(
239+
id="domain-on-dns-blocklist",
240+
title="Domain is blocked by a security DNS filter",
241+
severity="medium",
242+
description=(
243+
f"The domain is blocked by {', '.join(blocked)}, which usually means it is flagged "
244+
"as malware or phishing."
245+
),
246+
recommendation="If unexpected, investigate for compromise and request review after cleanup.",
247+
evidence={"filters": blocked},
248+
))
249+
236250
return findings
237251

238252

253+
def compute_passes(checks: dict) -> list[str]:
254+
"""What the domain gets right, for the dashboard's 'Passes' roll-up."""
255+
passes: list[str] = []
256+
tls = checks.get("tls", {})
257+
if tls.get("valid"):
258+
passes.append("TLS certificate valid and trusted")
259+
if tls.get("forward_secrecy"):
260+
passes.append("TLS uses forward secrecy")
261+
tls_config = checks.get("tls_config", {})
262+
if tls_config.get("status") == "ok" and not tls_config.get("weak_protocols"):
263+
passes.append("No deprecated TLS protocols")
264+
email = checks.get("email_security", {})
265+
if email.get("spf", {}).get("present"):
266+
passes.append("SPF record present")
267+
if email.get("dmarc", {}).get("policy") in ("quarantine", "reject"):
268+
passes.append("DMARC is enforced")
269+
if email.get("dkim", {}).get("present"):
270+
passes.append("DKIM detected")
271+
if email.get("mta_sts", {}).get("present"):
272+
passes.append("MTA-STS configured")
273+
hygiene = checks.get("dns_hygiene", {})
274+
if hygiene.get("dnssec", {}).get("enabled"):
275+
passes.append("DNSSEC enabled")
276+
if hygiene.get("caa", {}).get("present"):
277+
passes.append("CAA records present")
278+
if hygiene.get("ipv6", {}).get("present"):
279+
passes.append("Reachable over IPv6")
280+
if checks.get("http", {}).get("https_redirect"):
281+
passes.append("HTTP redirects to HTTPS")
282+
missing = checks.get("missing_security_headers") or {}
283+
for header in SECURITY_HEADERS:
284+
if header not in missing:
285+
passes.append(f"{header} present")
286+
reputation = checks.get("reputation", {})
287+
if reputation.get("status") == "ok" and not reputation.get("listed"):
288+
passes.append("Not on threat feeds")
289+
blocklists = checks.get("blocklists", {})
290+
if blocklists.get("status") == "ok" and not blocklists.get("blocked_security"):
291+
passes.append("Not on security DNS blocklists")
292+
takeover = checks.get("takeover", {})
293+
if takeover.get("status") == "ok" and not takeover.get("candidates"):
294+
passes.append("No subdomain takeover detected")
295+
if not checks.get("cloud_assets", {}).get("buckets"):
296+
passes.append("No exposed cloud buckets")
297+
return passes
298+
299+
239300
def _technology_findings(technologies: dict) -> list[Finding]:
240301
findings: list[Finding] = []
241302
for vuln in technologies.get("vulnerable_js", []):

‎src/sentineldeck/scanner.py‎

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55

66
from sentineldeck.models import ScanReport
77
from sentineldeck.remediation import attach_remediations
8-
from sentineldeck.risk.scoring import build_findings, grade, score_findings
8+
from sentineldeck.risk.scoring import build_findings, compute_passes, grade, score_findings
99
from sentineldeck.scanners.archive import archive_history
10+
from sentineldeck.scanners.blocklists import check_blocklists
1011
from sentineldeck.scanners.cloud_assets import analyze_cloud_assets
1112
from sentineldeck.scanners.dns_hygiene import analyze_dns_hygiene
1213
from sentineldeck.scanners.dns_lookup import Resolver, resolve # noqa: F401 - resolve re-exported for tests
@@ -53,6 +54,7 @@
5354
"archive": "Archive history (Wayback)",
5455
"tls_config": "TLS configuration",
5556
"ports": "Open ports (active)",
57+
"blocklists": "DNS blocklists",
5658
}
5759

5860

@@ -97,6 +99,7 @@ def _notify(label: str) -> None:
9799
"reputation": pool.submit(check_reputation, domain),
98100
"archive": pool.submit(archive_history, domain),
99101
"tls_config": pool.submit(analyze_tls_config, domain),
102+
"blocklists": pool.submit(check_blocklists, domain),
100103
}
101104
if active:
102105
futures["ports"] = pool.submit(scan_ports, domain)
@@ -143,8 +146,23 @@ def _notify(label: str) -> None:
143146

144147
addresses = results["dns"].get("addresses") or []
145148
ip_intel = analyze_ip_intel(addresses[0] if addresses else None, timeout)
149+
if addresses and addresses[0].count(".") == 3:
150+
reverse = ".".join(reversed(addresses[0].split("."))) + ".in-addr.arpa"
151+
ptr, _ = resolver(reverse, "PTR")
152+
ip_intel["hostnames"] = ptr
146153
_notify("IP intelligence (geo, ASN)")
147154

155+
dns_hygiene_result = results["dns_hygiene"]
156+
dns_records = {
157+
"A": addresses,
158+
"AAAA": dns_hygiene_result.get("ipv6", {}).get("records", []),
159+
"MX": results["email"].get("mx", {}).get("records", []),
160+
"NS": dns_hygiene_result.get("ns", {}).get("records", []),
161+
"SOA": dns_hygiene_result.get("soa", {}).get("records", []),
162+
"TXT": dns_hygiene_result.get("txt", {}).get("records", []),
163+
"CAA": dns_hygiene_result.get("caa", {}).get("records", []),
164+
}
165+
148166
report.checks = {
149167
"dns": results["dns"],
150168
"http": http,
@@ -166,8 +184,11 @@ def _notify(label: str) -> None:
166184
"archive": results["archive"],
167185
"tls_config": results["tls_config"],
168186
"ports": results.get("ports", {"status": "skipped", "open": []}),
187+
"blocklists": results["blocklists"],
188+
"dns_records": dns_records,
169189
}
170190
report.findings = build_findings(report.checks)
191+
report.checks["passes"] = compute_passes(report.checks)
171192
attach_remediations(report.findings, domain)
172193
if suppressions:
173194
apply_suppressions(report.findings, suppressions)
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
"""DNS blocklist checks: query the domain through public filtering resolvers and
2+
see whether any of them block it. A malware/security filter blocking the domain
3+
is a strong signal it is flagged as malicious. Uses DNS-over-HTTPS JSON, so it
4+
works where port 53 is blocked. Queries are injectable for offline tests.
5+
"""
6+
from __future__ import annotations
7+
8+
import json
9+
import urllib.parse
10+
import urllib.request
11+
from concurrent.futures import ThreadPoolExecutor
12+
13+
USER_AGENT = "SentinelDeck/0.1"
14+
15+
# (name, DoH JSON endpoint, is_security_filter)
16+
FILTERS = [
17+
("Cloudflare Security", "https://security.cloudflare-dns.com/dns-query", True),
18+
("Cloudflare Family", "https://family.cloudflare-dns.com/dns-query", False),
19+
("Quad9", "https://dns.quad9.net/dns-query", True),
20+
("AdGuard", "https://dns.adguard-dns.com/dns-query", True),
21+
("AdGuard Family", "https://family.adguard-dns.com/dns-query", False),
22+
("Google DNS", "https://dns.google/resolve", False),
23+
]
24+
# Sinkhole IPs that filtering resolvers return for blocked domains (not a bind address).
25+
SINKHOLES = {"0.0.0.0", "::", "146.112.61.104", "146.112.61.106", "146.112.61.108"} # nosec B104
26+
27+
28+
def _doh_query(endpoint: str, domain: str, timeout: int = 8) -> dict | None:
29+
url = endpoint + "?" + urllib.parse.urlencode({"name": domain, "type": "A"})
30+
request = urllib.request.Request(
31+
url, headers={"Accept": "application/dns-json", "User-Agent": USER_AGENT}
32+
)
33+
try:
34+
with urllib.request.urlopen(request, timeout=timeout) as response:
35+
return json.loads(response.read().decode("utf-8", "replace"))
36+
except Exception: # noqa: BLE001 - an unreachable filter is inconclusive
37+
return None
38+
39+
40+
def _is_blocked(data: dict | None) -> bool | None:
41+
if data is None:
42+
return None
43+
if data.get("Status") == 3: # NXDOMAIN
44+
return True
45+
answers = [a.get("data") for a in data.get("Answer", []) if a.get("type") == 1]
46+
if answers:
47+
return all(a in SINKHOLES for a in answers)
48+
return data.get("Status") == 0 # NOERROR with no answer = filtered
49+
50+
51+
def check_blocklists(domain: str, query=_doh_query) -> dict:
52+
"""Return each filter's verdict for ``domain`` and which security filters block it."""
53+
def check(item):
54+
name, endpoint, security = item
55+
return {"filter": name, "blocked": _is_blocked(query(endpoint, domain)), "security": security}
56+
57+
with ThreadPoolExecutor(max_workers=8) as pool:
58+
results = list(pool.map(check, FILTERS))
59+
blocked_security = [r["filter"] for r in results if r["blocked"] and r["security"]]
60+
return {"status": "ok", "results": results, "blocked_security": blocked_security}

‎src/sentineldeck/scanners/dns_hygiene.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ def analyze_dns_hygiene(domain: str, resolver: Resolver = resolve) -> dict:
1515
ns, ns_status = resolver(domain, "NS")
1616
aaaa, aaaa_status = resolver(domain, "AAAA")
1717
tlsa, tlsa_status = resolver(f"_443._tcp.{domain}", "TLSA")
18+
soa, soa_status = resolver(domain, "SOA")
19+
txt, txt_status = resolver(domain, "TXT")
1820
return {
21+
"soa": {"records": soa, "status": soa_status},
22+
"txt": {"records": txt, "status": txt_status},
1923
"caa": {
2024
"present": bool(caa),
2125
"records": caa,

‎src/sentineldeck/scanners/http_headers.py‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import re
4+
import time
45
import urllib.error
56
import urllib.parse
67
import urllib.request
@@ -32,10 +33,12 @@ def fetch_headers(domain: str, timeout: int = 10) -> dict[str, Any]:
3233

3334
for method in ("HEAD", "GET"):
3435
request = urllib.request.Request(url, method=method, headers={"User-Agent": USER_AGENT})
36+
start = time.perf_counter()
3537
try:
3638
with urllib.request.urlopen(request, timeout=timeout) as response:
3739
result["reachable"] = True
3840
result["status"] = response.status
41+
result["response_time_ms"] = round((time.perf_counter() - start) * 1000)
3942
result["headers"] = {key.lower(): value for key, value in response.headers.items()}
4043
result["cookies"] = response.headers.get_all("set-cookie") or []
4144
return result
@@ -45,6 +48,7 @@ def fetch_headers(domain: str, timeout: int = 10) -> dict[str, Any]:
4548
continue
4649
result["reachable"] = True
4750
result["status"] = exc.code
51+
result["response_time_ms"] = round((time.perf_counter() - start) * 1000)
4852
result["headers"] = {key.lower(): value for key, value in exc.headers.items()}
4953
result["cookies"] = exc.headers.get_all("set-cookie") or []
5054
return result
@@ -223,6 +227,20 @@ def evaluate_headers(headers: dict[str, str], cookies: list[str] | None = None)
223227
"Set Cross-Origin-Opener-Policy: same-origin where compatible.", {},
224228
))
225229

230+
if headers and "cross-origin-resource-policy" not in headers:
231+
issues.append(_issue(
232+
"no-corp", "No Cross-Origin-Resource-Policy", "info",
233+
"Cross-Origin-Resource-Policy is not set, so other origins can embed this site's resources.",
234+
"Set Cross-Origin-Resource-Policy: same-origin or same-site where appropriate.", {},
235+
))
236+
237+
if headers and "cross-origin-embedder-policy" not in headers:
238+
issues.append(_issue(
239+
"no-coep", "No Cross-Origin-Embedder-Policy", "info",
240+
"Cross-Origin-Embedder-Policy is not set, which is required for cross-origin isolation.",
241+
"Set Cross-Origin-Embedder-Policy: require-corp to enable cross-origin isolation.", {},
242+
))
243+
226244
if "x-powered-by" in headers:
227245
issues.append(_issue(
228246
"info-disclosure-x-powered-by", "Server discloses technology via X-Powered-By", "low",

‎src/sentineldeck/scanners/ip_intel.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
import urllib.request
99

1010
USER_AGENT = "SentinelDeck/0.1"
11-
IPAPI_URL = "http://ip-api.com/json/{ip}?fields=status,country,countryCode,city,regionName,isp,org,as,query"
11+
IPAPI_URL = (
12+
"http://ip-api.com/json/{ip}"
13+
"?fields=status,country,countryCode,city,regionName,isp,org,as,query,lat,lon,timezone"
14+
)
1215

1316

1417
def _default_fetch(ip: str, timeout: int = 10) -> dict | None:
@@ -38,4 +41,7 @@ def analyze_ip_intel(ip: str | None, timeout: int = 10, fetcher=_default_fetch)
3841
"isp": data.get("isp"),
3942
"org": data.get("org"),
4043
"asn": data.get("as"),
44+
"lat": data.get("lat"),
45+
"lon": data.get("lon"),
46+
"timezone": data.get("timezone"),
4147
}

0 commit comments

Comments
 (0)