Fix embedded HEIF media handling; land section 2-4 hardening - #19
Conversation
The same detect_format contract gap as the top-level router: HEIF-family
bytes are reported as "heif", never "heic", but all five embedded-media
branches (HTML data: URIs, OOXML zip media, EPUB media) matched "heic" —
an embedded HEIC image in a docx/odt/epub was never inspected nor
stripped, and its C2PA/XMP markers survived a "cleaned" document.
The strip gates also required the action verb "drop", while heif_meta
neutralizes in place ("neutralized"/"zeroed") to preserve offsets, so
even a routed HEIF would never have been written back. Gates now share
_media_strip_succeeded, which accepts both vocabularies and still rejects
the no-op case (unchanged bytes).
Concurrent hardening pass (master-list sections 2-4), verified green by the full suite: - server: /detect answers ok+kind=unknown with an explanatory report instead of falling through to a failed tempfile workflow; OpenAPI schemas admit the "unknown" kind and the detect report field - image_meta: bound PNG zTXt/iTXt decompression (MAX_PNG_TEXT_BYTES, fail closed on bomb/corrupt streams) via _zlib_decompress_bounded - inspect_file, score_synthid, score_stylometry, text_detectors, synthid_score_server: partial-read and error-path handling - rewrite_text, clean-user-facing-text: alias and validation fixes - compose-check: curl connect/total timeouts - tests: new test_stability_server, test_image_meta_bomb_and_notes, test_inspect_file_partial, test_lightweight_clean_text_aliases plus extensions to binary-guard, markllm-detect, rewrite, stylometry, and text-detector suites
|
Warning Review limit reached
Next review available in: 31 minutes Limit details: You’ve used all 3 included reviews currently available. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (23)
Comment |
subprocess_preexec_fn is None off POSIX (common.py), so the MarkLLM adapter correctly omits --rlimit-as on Windows; the boundary assertion only makes sense where resource limits exist.
What
"heic", whichdetect_formatnever returns. Embedded HEIC in docx/odt/epub/html kept its C2PA/XMP markers through a clean. Also widens the strip-success gates beyond thedropverb to heif_meta's in-placeneutralized/zeroedvocabulary (shared_media_strip_succeeded, no-op case still excluded by byte equality).unknownhandling + OpenAPI schema corrections, bounded PNG zTXt/iTXt decompression (decompression-bomb guard, fail-closed), partial-read/error-path handling across scorers and detectors, curl timeouts in compose-check, plus their test suites (4 new files, 5 extended).Verification