Commit Graph
20 Commits
Author SHA1 Message Date
Julio César SuásteguiandGitHub 34a1669974 Fix XMind reports for modern readers (#2930)
* fix(report): add XMind manifest for modern readers

* docs: document modern XMind reader compatibility
2026-08-10 22:54:35 +02:00
AshvinandGitHub 0fd5bf66e8 fix: block SSRF / local-file reads via report image URLs during PDF generation (#2908)
* fix: block SSRF and local-file reads via report image URLs in PDF generation

save_pdf_report() rendered scraped profile image URLs (ids_data['image'])
straight into xhtml2pdf, which fetches <img src> while building the PDF.
The image field is attacker-influenced and pisaDocument ran with no
link_callback, so a profile carrying image = "file:///etc/passwd" or an
intranet/metadata URL turned report generation into a local file read or
an SSRF from the machine running maigret. In the web UI this is
server-side and fires on every search, since save_pdf_report is always
called.

Add a link_callback that only lets public http(s) images through and
diverts everything else (file://, data:, other schemes, and hosts that
resolve to loopback/private/link-local/reserved addresses) to a bundled
1x1 placeholder, so no fetch or read happens. Diverting rather than
raising keeps report generation working when a scanned profile carries a
hostile image URL.

Tests cover the URL classifier, the callback's placeholder diversion, and
an end-to-end check that PDF generation does not fetch an internal image.

* fix: use is_global to also block CGNAT (100.64.0.0/10) report image hosts

The flag chain missed 100.64.0.0/10, which is neither is_private nor
is_global and is routable inside many cloud and k8s networks. is_global
covers it along with private, loopback, link-local and unspecified.

Multicast and reserved stay explicit: both are still is_global on
CPython, and 64:ff9b::/96 reaches IPv4 through a NAT64 gateway.
2026-07-27 17:57:08 +05:00
AliandGitHub e41c4d7ee3 Add Neo4j Cypher export (--neo4j) (#2774)
Serialize the maigret graph (the same one --graph builds) into an idempotent Cypher script importable into Neo4j. Reuses MaigretGraph via an extracted _build_maigret_graph() helper, leaving save_graph_report behavior unchanged; no new runtime dependency. Adds the --neo4j flag, the neo4j_report setting, docs, and a unit test.

Closes #2630
2026-06-29 15:41:57 +02:00
Sushanth012andGitHub 0a414c2e1c fix: preserve report error reasons (#2802) 2026-06-29 15:06:03 +02:00
SoxojandGitHub f2e4f8d3a2 Merge commit from fork 2026-06-17 15:15:32 +02:00
SoxojandGitHub a7338e97f3 Make xhtml2pdf optional, fix install on Linux without libcairo (#2659)
* Make xhtml2pdf optional, fix install on Linux without libcairo

Move xhtml2pdf to the new [pdf] extra so default `pip install maigret`
no longer pulls pycairo (which has no Linux/macOS wheels and breaks the
build without libcairo2-dev). save_pdf_report now raises a clear
RuntimeError pointing to `pip install 'maigret[pdf]'`, and the CLI
turns it into a friendly warning instead of a crash. Adds tests
covering the missing-extra path, plus per-OS install docs.

Fix for #2657, #2534

* Make arabic-reshaper and python-bidi optional; idempotent update of db_meta.json and sites.md

* Regenerated poerty.lock

* Update CI workflow to cover minimal installation without PDF deps
2026-05-15 14:33:55 +02:00
SoxojandGitHub 25026e21ea Fix site checks: 4 → ip_reputation, 9 fixed, 16 disabled, 3 dead dele… (#2555)
* Fix site checks: 4 → ip_reputation, 9 fixed, 16 disabled, 3 dead deleted; clarify ip_reputation tag semantics

* Improved test coverage
2026-04-23 21:17:07 +02:00
SoxojandGitHub d136014576 Multiple lint and types fixes (#2454) 2026-04-02 21:01:49 +02:00
SoxojandGitHub c66d776f8a Refactoring, test coverage increased to 60% (#1943) 2024-12-08 02:13:28 +01:00
SoxojandGitHub 4b1317789d Refactored self-check method, code formatting, small lint fixes (#1942) 2024-12-07 18:05:30 +01:00
Soxoj a914283a15 Skipped broken tests 2022-03-18 01:51:14 +03:00
Soxoj 13e1b6f4d1 Added some domains for new DNS checker, fixed reports generation crashes 2021-06-02 23:16:44 +03:00
Soxoj 28835204f5 Added text report to CLI output 2021-05-15 16:55:05 +03:00
Soxoj 188edc1b7f Fixed json report generation bug, bump to 0.2.1 2021-05-02 20:06:15 +03:00
Soxoj 5ee91f6659 Introduced --retries flag, made thorough refactoring
- updated sites list
- test scripts linting
2021-05-01 23:54:01 +03:00
Soxoj 631de7b346 Added reports of JSON format (simple, njdson); improved submit logic; added several sites 2021-02-13 01:06:05 +03:00
Soxoj d1f7343832 Tags and custom checks bugfixes 2021-01-16 14:25:13 +03:00
Soxoj 9b2f8f20ed Reports refactoring & improving 2021-01-16 00:50:04 +03:00
Ping-uu 81e92b365b test fix 2021-01-11 14:47:58 +01:00
Soxoj e4765d1ed9 HTLM reports draft, 500 sites scanning by default 2021-01-07 23:52:29 +03:00