Web Safety Checker
A Python backend with a Streamlit UI and REST APIs for web, email, and network safety checks, combined analysis, and downloadable PDF reports — runnable locally or on the cloud.
Overview
The tool checks URLs and outbound links, domain email hygiene (MX, SPF, DMARC, DKIM, and more), and host reachability / TLS posture. You can use the hosted Streamlit app without running a server yourself, or run the same checks via the API for automation and integrations.
Major updates (since the earlier version)
- Streamlit UI — same checks as the API through a browser app; deployable on Streamlit Community Cloud.
- API-first modules — dedicated endpoints for web, email, network, combined
/check/all, and/report/pdf. - Deeper web checks — security headers, cookie flags, mixed content, third-party scripts vs SRI, DNSSEC/CAA, TLS/cipher/cert chain, OCSP (via OpenSSL when available), Certificate Transparency, HSTS preload, optional live threat intel (Safe Browsing / VirusTotal when API keys are set).
- Richer email checks — SPF/DMARC/DKIM (including optional DKIM discovery from sample headers or a source URL), MTA-STS, TLS-RPT, BIMI, and STARTTLS probe to primary MX where reachable.
- Network checks — DNS, port reachability, TLS expiry on 443, optional service banner on first open port.
- PDF reports — full downloadable report with recommendations after checks.
Main API endpoints
POST /check/web— URL and link safety.POST /check/email— domain email hygiene.POST /check/network— host reachability and TLS posture.POST /check/all— combined web + email + network with section breakdown.POST /report/pdf— downloadable full PDF report.GET /health— health check.
Run locally
- API:
python3 backend_api.py→http://127.0.0.1:8787 - Streamlit:
pip install -r requirements.txtthenstreamlit run streamlit_app.py - Static
index.htmlUI can call the API when the backend is running; set API base in page options if needed.