Yogesh OjhaandClaude Opus 5 47e1c1663e fix(scans): NUL reaches the inventories too, and the guard has to catch it
The fieldmap scrubber covers every tool record that maps through it, which is not
how endpoints and ports are written: a sitemap entry, an archive record and a
service banner go straight from a provider dataclass into a row. gov.np's URL
discovery lost its whole run to one of them.

Both inventory row builders now scrub, at the same single-writer choke point the
fieldmap uses for tools. `endpoint_inventory._changes` scrubs too — the update path
writes the same untrusted text as the insert.

The savepoint guards added for exactly this caught nothing, because psycopg raises
the NUL complaint while *binding parameters*: SQLAlchemy wraps that above DBAPIError,
so `except DatabaseError` never fired. Both guards catch StatementError now.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPueZXQMbjLXMokXeA8LFP
2026-09-06 07:48:59 +05:30
2026-01-26 15:02:53 +05:30
2026-09-05 18:40:23 +05:30
2026-01-26 15:02:53 +05:30
2023-12-31 14:52:05 +01:00
2026-01-26 15:02:53 +05:30
2026-01-26 15:02:53 +05:30
Languages
HTML 38.7%
Python 33%
JavaScript 21.8%
CSS 5.1%
Shell 0.9%
Other 0.5%