Remove visible and invisible AI watermarks and provenance metadata from images and video. Python library and CLI for SynthID, C2PA, EXIF, IPTC, XMP, and common generative-AI marks.
This report presents the forensic synthetic code analysis of wiltodelta/remove-ai-watermarks, a Python project with 5,308 GitHub stars. SynthScan v2.0 examined 60,829 lines of code across 201 source files, recording 1599 pattern matches distributed across 12 syntactic categories. The overall adjusted score of 29.2 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 1599 distinct pattern matches across 12 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_liblib_engine.py | 46 | def test_box_horizontally_centered(self): | CODE |
| LOW | tests/test_liblib_engine.py | 53 | def test_box_scales_with_width(self): | CODE |
| LOW⚡ | tests/test_liblib_engine.py | 64 | def test_strict_only_no_provenance_relaxation(self): | CODE |
| LOW⚡ | tests/test_liblib_engine.py | 67 | def test_gate_above_clean_arm_max(self): | CODE |
| LOW⚡ | tests/test_liblib_engine.py | 71 | def test_small_image_size_floor(self): | CODE |
| LOW⚡ | tests/test_liblib_engine.py | 85 | def test_detects_composed_mark(self): | CODE |
| LOW⚡ | tests/test_liblib_engine.py | 91 | def test_clean_frame_stays_quiet(self): | CODE |
| LOW⚡ | tests/test_liblib_engine.py | 96 | def test_mask_covers_logo_and_wordmark(self): | CODE |
| LOW⚡ | tests/test_liblib_engine.py | 109 | def test_no_mask_on_clean_frame(self): | CODE |
| LOW⚡ | tests/test_liblib_engine.py | 114 | def test_confident_liblib_detection_suppresses_the_jimeng_pill(self): | CODE |
| LOW⚡ | tests/test_liblib_engine.py | 122 | def test_force_masks_the_whole_locate_box_on_a_clean_frame(self): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 26 | def test_small_image_gets_small_watermark(self): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 29 | def test_large_image_gets_large_watermark(self): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 32 | def test_boundary_image_stays_small(self): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 40 | def test_config_small_returns_correct_values(self): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 46 | def test_config_large_returns_correct_values(self): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 52 | def test_position_calculation(self): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 65 | def test_pure_black_gives_zero_alpha(self): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 71 | def test_pure_white_gives_one_alpha(self): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 99 | def test_engine_loads_alpha_maps(self): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 105 | def test_detect_on_grayscale_does_not_crash(self): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 140 | def test_footprint_mask_covers_detected_sparkle(self): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 149 | def test_fill_lowers_confidence(self): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 159 | def test_footprint_mask_bgra_input(self): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 177 | def test_detect_returns_result_object(self, tmp_image_path): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 183 | def test_detect_empty_image_returns_no_detection(self): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 189 | def test_detect_none_image_returns_no_detection(self): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 193 | def test_detect_random_image_low_confidence(self, tmp_image_path): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 239 | def test_bright_core_has_high_margin(self): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 245 | def test_flat_region_has_low_margin(self): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 255 | def test_strong_sparkle_not_demoted(self): | CODE |
| LOW⚡ | tests/test_gemini_engine.py | 261 | def test_strong_sparkle_on_white_kept(self): | CODE |
| LOW | tests/test_gemini_engine.py | 205 | def test_returns_float_in_range_for_real_image(self, tmp_image_path): | CODE |
| LOW | tests/test_gemini_engine.py | 210 | def test_returns_none_for_unreadable_file(self, tmp_path): | CODE |
| LOW | tests/test_gemini_engine.py | 273 | def test_low_margin_blurred_blob_is_demoted(self): | CODE |
| LOW | tests/test_gemini_engine.py | 295 | def test_bright_white_blurred_sparkle_rescued(self): | CODE |
| LOW | tests/test_gemini_engine.py | 319 | def test_bright_colored_blob_still_demoted(self): | CODE |
| LOW | tests/test_gemini_engine.py | 379 | def test_small_corner_sparkle_is_detected_and_localized(self): | CODE |
| LOW | tests/test_gemini_engine.py | 387 | def test_size_weighted_search_alone_traps_on_the_decoy(self): | CODE |
| LOW | tests/test_gemini_engine.py | 410 | def test_no_promotion_on_clean_flat_image(self): | CODE |
| LOW | tests/test_gemini_engine.py | 415 | def test_low_gradient_decoy_loses_to_high_gradient_corner_sparkle(self, monkeypatch): | CODE |
| LOW⚡ | tests/test_metadata_internals.py | 53 | def test_supported_formats_include_png(self): | CODE |
| LOW⚡ | tests/test_metadata_internals.py | 56 | def test_supported_formats_include_jpg(self): | CODE |
| LOW⚡ | tests/test_metadata_internals.py | 59 | def test_supported_formats_include_heic_avif(self): | CODE |
| LOW⚡ | tests/test_metadata_internals.py | 64 | def test_supported_formats_exclude_jpeg_xl(self): | CODE |
| LOW⚡ | tests/test_metadata_internals.py | 68 | def test_ai_metadata_keys_not_empty(self): | CODE |
| LOW⚡ | tests/test_metadata_internals.py | 71 | def test_ai_keywords_not_empty(self): | CODE |
| LOW⚡ | tests/test_metadata_internals.py | 87 | def test_extract_metadata_returns_dict(self, tmp_clean_png): | CODE |
| LOW⚡ | tests/test_metadata_internals.py | 91 | def test_extract_metadata_gets_standard_keys(self, tmp_clean_png): | CODE |
| LOW⚡ | tests/test_metadata_internals.py | 95 | def test_extract_ai_metadata_from_ai_image(self, tmp_png_with_ai_metadata): | CODE |
| LOW⚡ | tests/test_metadata_internals.py | 99 | def test_extract_ai_metadata_from_clean_image(self, tmp_clean_png): | CODE |
| LOW⚡ | tests/test_metadata_internals.py | 103 | def test_has_ai_metadata_detects(self, tmp_png_with_ai_metadata): | CODE |
| LOW⚡ | tests/test_metadata_internals.py | 106 | def test_has_ai_metadata_clean(self, tmp_clean_png): | CODE |
| LOW⚡ | tests/test_metadata_internals.py | 355 | def test_current_openai_watermark_action_asserts_synthid(self): | CODE |
| LOW⚡ | tests/test_metadata_internals.py | 361 | def test_extract_info_adobe_has_no_synthid(self): | CODE |
| LOW⚡ | tests/test_metadata_internals.py | 366 | def test_extract_chunk_returns_bytes(self): | CODE |
| LOW⚡ | tests/test_metadata_internals.py | 399 | def test_reader_reports_intact_but_untrusted_credentials(self): | CODE |
| LOW⚡ | tests/test_metadata_internals.py | 408 | def test_reader_reports_post_signing_container_mutation(self, tampered_chatgpt_png): | CODE |
| LOW⚡ | tests/test_metadata_internals.py | 415 | def test_fallback_to_png_parser_when_reader_unavailable(self, monkeypatch): | CODE |
| LOW⚡ | tests/test_metadata_internals.py | 456 | def test_key_not_found_returns_none(self): | CODE |
| 1052 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/test_gemini_engine.py | 20 | # ── WatermarkSize / config helpers ────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_gemini_engine.py | 59 | # ── Alpha map ─────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_gemini_engine.py | 89 | # ── GeminiEngine ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_gemini_engine.py | 113 | # ── Removal: localize -> fill ─────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_gemini_engine.py | 167 | # ── Detection ─────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_metadata_internals.py | 47 | # ── Constants ─────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_metadata_internals.py | 81 | # ── Extractor ─────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_metadata_internals.py | 545 | # ── ISOBMFF (AVIF / HEIF / JPEG-XL container stripping) ────────────── | COMMENT |
| MEDIUM | tests/test_metadata_internals.py | 118 | # ── Cleaner ───────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/test_metadata_internals.py | 137 | # ── C2PA ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/test_metadata_internals.py | 435 | # ── CBOR text extraction (parser internals) ───────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_metadata.py | 56 | # ── Key detection ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_metadata.py | 84 | # ── has_ai_metadata / get_ai_metadata ─────────────────────────────── | COMMENT |
| MEDIUM | tests/test_metadata.py | 538 | # ── SynthID-source detection (metadata proxy) ──────────────────────── | COMMENT |
| MEDIUM | tests/test_metadata.py | 630 | # ── remove_ai_metadata ────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_doubao_engine.py | 58 | # ── Detection: alpha-template NCC ─────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_doubao_engine.py | 126 | # ── Alpha asset + footprint mask + localize -> fill removal ───────── | COMMENT |
| MEDIUM⚡ | tests/test_identify.py | 840 | # ── Local diffusion parameters (Stable Diffusion / ComfyUI) ───────── | COMMENT |
| MEDIUM⚡ | tests/test_identify.py | 946 | # ── Visible-sparkle fallback (mocked detector) ────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_identify.py | 1137 | # ── Caveats and serialization ─────────────────────────────────────── | COMMENT |
| MEDIUM | tests/test_identify.py | 341 | # ── Pure attribution logic (no file IO) ───────────────────────────── | COMMENT |
| MEDIUM | tests/test_identify.py | 620 | # ── End-to-end verdicts on real fixtures ──────────────────────────── | COMMENT |
| MEDIUM | tests/test_identify.py | 874 | # ── China TC260 AIGC label as a PNG text chunk (Doubao) ───────────── | COMMENT |
| MEDIUM | tests/test_identify.py | 901 | # ── Hugging Face-hosted job marker (medium confidence) ───────────── | COMMENT |
| MEDIUM | tests/test_identify.py | 1386 | # ── Open invisible watermark (SD/SDXL/FLUX) integration ───────────── | COMMENT |
| MEDIUM | tests/test_identify.py | 1453 | # ── Integrity clashes (contradictions between independent signals) ────── | COMMENT |
| MEDIUM⚡ | tests/test_platform.py | 31 | # ── Device detection ──────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_platform.py | 367 | # ── Format utilities ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/test_platform.py | 405 | # ── Availability checks ──────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/test_platform.py | 451 | # ── Platform-specific path handling ───────────────────────────────── | COMMENT |
| MEDIUM | scripts/render_visible_examples.py | 161 | # ── Video mark examples ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | scripts/fidelity_metrics.py | 73 | # ── helpers ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | scripts/fidelity_metrics.py | 95 | # ── text: PaddleOCR defaults ───────────────────────────────────────── | COMMENT |
| MEDIUM | scripts/fidelity_metrics.py | 174 | # ── face: detection + ArcFace + texture ────────────────────────────── | COMMENT |
| MEDIUM | scripts/fidelity_metrics.py | 246 | # ── whole image: LPIPS / SSIM / PSNR ───────────────────────────────── | COMMENT |
| MEDIUM | scripts/fidelity_metrics.py | 277 | # ── reporting ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | scripts/fidelity_metrics.py | 288 | # ── CLI ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/metadata.py | 33 | # ── Known AI metadata keys ────────────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/metadata.py | 1635 | # ── Per-file probe memoization ────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/metadata.py | 1719 | # ── Shared with the portable metadata record ──────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/identify.py | 1160 | # ── C2PA Content Credentials ──────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/identify.py | 1259 | # ── SynthID provenance evidence ───────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/identify.py | 1399 | # ── Local diffusion parameters (Stable Diffusion / ComfyUI) ────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/identify.py | 1418 | # ── xAI / Grok EXIF signature scheme (no C2PA/SynthID/IPTC) ────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/identify.py | 1429 | # ── Hugging Face-hosted job marker (hf-job-id PNG text chunk) ───── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/identify.py | 1441 | # ── Samsung Galaxy AI editing marker (genAIType) ───────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/identify.py | 1457 | # ── Open invisible watermark (SD / SDXL / FLUX, dwtDct) ────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/identify.py | 1476 | # ── Verdict so far (metadata + embedded watermark) ────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/humanizer.py | 83 | # ── Adaptive polish (target the input's detail level; spare text) ────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/_text_mark_engine.py | 289 | # ── Templates (delegate to the asset-keyed module cache) ──────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/_text_mark_engine.py | 334 | # ── Locate ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/_text_mark_engine.py | 523 | # ── Mask ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/_text_mark_engine.py | 567 | # ── Detect ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/_text_mark_engine.py | 670 | # ── Inpaint footprint (for the inpaint-fallback removal path) ──────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_cpu_offload.py | 9 | CODE | |
| LOW | tests/test_liblib_engine.py | 9 | CODE | |
| LOW | tests/test_gemini_engine.py | 3 | CODE | |
| LOW | tests/test_metadata_internals.py | 4 | CODE | |
| LOW | tests/test_pill_engine.py | 4 | CODE | |
| LOW | tests/conftest.py | 3 | CODE | |
| LOW | tests/test_baidu_engine.py | 11 | CODE | |
| LOW | tests/test_forensic_metadata.py | 3 | CODE | |
| LOW | tests/test_synthid_pixel_probe.py | 9 | CODE | |
| LOW | tests/test_registered_mark_calibrate.py | 3 | CODE | |
| LOW | tests/test_kling_engine.py | 9 | CODE | |
| LOW | tests/test_packaging.py | 3 | CODE | |
| LOW | tests/test_cli_robustness.py | 20 | CODE | |
| LOW | tests/test_jimeng_engine.py | 8 | CODE | |
| LOW | tests/test_security_clamp.py | 17 | CODE | |
| LOW | tests/test_microsoft_engine.py | 9 | CODE | |
| LOW | tests/test_designer_synthid_suppression.py | 11 | CODE | |
| LOW | tests/test_trustmark_detector.py | 9 | CODE | |
| LOW | tests/test_video_synthid_sweep.py | 3 | CODE | |
| LOW | tests/test_synthid_corpus.py | 3 | CODE | |
| LOW | tests/test_tiling.py | 9 | CODE | |
| LOW | tests/test_video_temporal.py | 3 | CODE | |
| LOW | tests/test_qwen_zimage_pipeline.py | 3 | CODE | |
| LOW | tests/test_fidelity_matching.py | 12 | CODE | |
| LOW | tests/test_watermark_registry.py | 3 | CODE | |
| LOW | tests/test_invisible_watermark.py | 7 | CODE | |
| LOW | tests/test_visible_examples.py | 12 | CODE | |
| LOW | tests/test_region_eraser.py | 3 | CODE | |
| LOW | tests/test_video_fidelity_probe.py | 8 | CODE | |
| LOW | tests/test_metadata.py | 3 | CODE | |
| LOW | tests/test_video.py | 3 | CODE | |
| LOW | tests/test_text_mark_faint_mask.py | 11 | CODE | |
| LOW | tests/test_image_io.py | 3 | CODE | |
| LOW | tests/test_distribution_boundary.py | 3 | CODE | |
| LOW | tests/test_script_help.py | 3 | CODE | |
| LOW | tests/test_text_draft.py | 3 | CODE | |
| LOW | tests/test_yuanbao_engine.py | 3 | CODE | |
| LOW | tests/test_invisible_engine.py | 3 | CODE | |
| LOW | tests/test_doubao_engine.py | 3 | CODE | |
| LOW | tests/test_infer_text_lines.py | 1 | CODE | |
| LOW | tests/test_identify.py | 7 | CODE | |
| LOW | tests/test_qwen_engine.py | 9 | CODE | |
| LOW | tests/test_contentseal_corpus.py | 9 | CODE | |
| LOW | tests/test_video_invisible.py | 3 | CODE | |
| LOW | tests/test_video_invisible.py | 24 | CODE | |
| LOW | tests/test_optional_deps.py | 3 | CODE | |
| LOW | tests/test_pixel_evidence.py | 9 | CODE | |
| LOW | tests/test_selective_text_restoration.py | 1 | CODE | |
| LOW | tests/test_platform.py | 7 | CODE | |
| LOW | tests/test_samsung_engine.py | 9 | CODE | |
| LOW | tests/test_api.py | 4 | CODE | |
| LOW | tests/test_text_mark_memory.py | 9 | CODE | |
| LOW | tests/test_cli.py | 3 | CODE | |
| LOW | tests/test_inpaint_fallback.py | 9 | CODE | |
| LOW | tests/test_evaluation_data.py | 3 | CODE | |
| LOW | tests/test_metadata_record.py | 8 | CODE | |
| LOW | tests/test_runninghub_engine.py | 11 | CODE | |
| LOW | tests/test_text_restoration.py | 3 | CODE | |
| LOW | scripts/detection_timing.py | 45 | CODE | |
| LOW | scripts/video_synthid_sweep.py | 33 | CODE | |
| 102 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_metadata_internals.py | 974 | def outcome(fn): | CODE |
| LOW | tests/test_metadata_internals.py | 977 | except Exception as exc: | CODE |
| LOW | tests/test_pill_engine.py | 20 | except Exception: | CODE |
| MEDIUM | tests/test_pill_engine.py | 16 | def _font_ok() -> bool: | CODE |
| LOW | tests/test_image_io.py | 120 | except Exception: | CODE |
| LOW⚡ | tests/test_image_io.py | 167 | except Exception: | CODE |
| LOW | tests/test_video_invisible.py | 55 | except Exception as exc: # pragma: no cover - mutation cleanup path | CODE |
| MEDIUM | tests/test_video_invisible.py | 51 | def write_frames() -> None: | CODE |
| LOW | scripts/detection_timing.py | 123 | except Exception: # unreadable or an unsupported container | CODE |
| LOW | scripts/detection_timing.py | 170 | except Exception as exc: | CODE |
| LOW | scripts/detection_timing.py | 179 | except Exception as exc: | CODE |
| LOW | scripts/vendor_mark_calibrate.py | 101 | except Exception: | CODE |
| LOW | scripts/vendor_mark_calibrate.py | 159 | except Exception: # noqa: S112 -- one bad file must not kill the sweep | CODE |
| LOW | scripts/vendor_mark_calibrate.py | 329 | except Exception: # noqa: S112 -- one bad file must not kill the fit | CODE |
| LOW | scripts/vendor_mark_calibrate.py | 464 | except Exception: | CODE |
| LOW | scripts/vendor_mark_calibrate.py | 504 | except Exception: # noqa: S112 -- one bad file must not kill the pool | CODE |
| LOW | scripts/pill_gate_audit.py | 93 | except Exception as e: | CODE |
| LOW | scripts/pill_gate_audit.py | 182 | except Exception: # noqa: S112 | CODE |
| LOW | scripts/pill_gate_audit.py | 198 | except Exception: # noqa: S112 | CODE |
| LOW | scripts/pill_gate_audit.py | 217 | except Exception: # noqa: S112 | CODE |
| LOW | scripts/record_parity_audit.py | 93 | except Exception as exc: | CODE |
| LOW | scripts/record_parity_audit.py | 98 | except Exception as exc: | CODE |
| LOW | scripts/fill_quality.py | 219 | except Exception: # noqa: S112 -- an unreadable local file is not a candidate | CODE |
| LOW | scripts/fill_quality.py | 271 | except Exception as e: | CODE |
| LOW | scripts/visible_groundtruth.py | 68 | except Exception: | CODE |
| LOW | scripts/synthid_corpus.py | 97 | except Exception: # sips missing/odd output; dims stay unknown | CODE |
| LOW | scripts/synthid_corpus.py | 109 | except Exception as exc: # unknown/user formats can raise non-OSError; see CLAUDE.md | CODE |
| LOW | scripts/visible_removal_audit.py | 109 | except Exception as exc: | CODE |
| LOW | scripts/detector_response.py | 196 | except Exception: # noqa: S112 -- tolerate a torn last line | CODE |
| LOW | scripts/detector_response.py | 210 | except Exception as e: # a crashed source must not kill the sweep | CODE |
| LOW | scripts/visible_positives.py | 58 | except Exception as e: | CODE |
| LOW | scripts/visible_positives.py | 101 | except Exception: # noqa: S112 -- tolerate a torn last line | CODE |
| LOW | scripts/visible_positives.py | 126 | except Exception: # noqa: S112 | CODE |
| LOW | scripts/metadata_removal_audit.py | 72 | except Exception: | CODE |
| LOW⚡ | scripts/metadata_removal_audit.py | 100 | except Exception as exc: | CODE |
| LOW⚡ | scripts/metadata_removal_audit.py | 110 | except Exception as exc: | CODE |
| LOW⚡ | scripts/metadata_removal_audit.py | 118 | except Exception as exc: | CODE |
| LOW | scripts/metadata_removal_audit.py | 140 | except Exception: # noqa: S112 -- skip an unreadable identify JSON, not security-relevant | CODE |
| LOW | scripts/resource_ceilings.py | 76 | except Exception as e: | CODE |
| LOW | scripts/corpus_gap_scan.py | 157 | except Exception as exc: | CODE |
| LOW | scripts/ladder_headroom.py | 135 | except Exception: | CODE |
| LOW | scripts/ladder_headroom.py | 147 | except Exception: | CODE |
| LOW | scripts/ladder_headroom.py | 219 | except Exception: # noqa: S112 -- one bad file must not kill the sweep | CODE |
| LOW | scripts/vendor_cohort_harvest.py | 76 | except Exception: | CODE |
| LOW | scripts/vendor_cohort_harvest.py | 116 | except Exception: # noqa: S112 -- one bad file must not kill the scan | CODE |
| LOW | scripts/smoke_matrix.py | 133 | except Exception as e: | CODE |
| LOW | scripts/smoke_matrix.py | 158 | except Exception as e: | CODE |
| LOW | scripts/smoke_matrix.py | 397 | except Exception: | CODE |
| LOW | scripts/sidecar_regression.py | 133 | except Exception as e: # a corrupt sidecar must not kill the sweep | CODE |
| LOW | scripts/sidecar_regression.py | 148 | except Exception as e: # record and continue; a crash IS a finding | CODE |
| LOW | scripts/sidecar_regression.py | 187 | except Exception: # noqa: S112 -- tolerate a torn last line from an interrupted run | CODE |
| LOW⚡ | scripts/cjk_tail_probe.py | 128 | except Exception: | CODE |
| LOW⚡ | scripts/cjk_tail_probe.py | 136 | except Exception: | CODE |
| LOW⚡ | scripts/cjk_tail_probe.py | 144 | except Exception: | CODE |
| LOW | scripts/cjk_tail_probe.py | 196 | except Exception: # noqa: S112 -- one bad file must not kill the sweep | CODE |
| LOW | scripts/controlnet_sweep.py | 279 | except Exception as exc: | CODE |
| LOW | src/remove_ai_watermarks/pixel_evidence.py | 178 | except Exception as exc: | CODE |
| LOW | src/remove_ai_watermarks/pixel_evidence.py | 292 | except Exception as exc: | CODE |
| LOW⚡ | src/remove_ai_watermarks/pixel_evidence.py | 433 | except Exception as exc: | CODE |
| LOW⚡ | src/remove_ai_watermarks/pixel_evidence.py | 443 | except Exception as exc: | CODE |
| 60 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_pixel_evidence.py | 167 | CODE | |
| LOW | tests/test_evaluation_data.py | 14 | CODE | |
| LOW | scripts/vendor_mark_calibrate.py | 470 | CODE | |
| LOW | scripts/pill_gate_audit.py | 112 | CODE | |
| LOW | scripts/pill_gate_audit.py | 167 | CODE | |
| LOW | scripts/selective_text_restoration.py | 344 | CODE | |
| LOW | scripts/fill_quality.py | 225 | CODE | |
| LOW | scripts/visible_groundtruth.py | 80 | CODE | |
| LOW | scripts/synthid_corpus.py | 77 | CODE | |
| LOW | scripts/visible_removal_audit.py | 75 | CODE | |
| LOW | scripts/visible_eval.py | 67 | CODE | |
| LOW | scripts/render_visible_examples.py | 171 | CODE | |
| LOW | scripts/detector_response.py | 127 | CODE | |
| LOW | scripts/detector_response.py | 174 | CODE | |
| LOW | scripts/visible_positives.py | 79 | CODE | |
| LOW | scripts/real_examples_e2e.py | 101 | CODE | |
| LOW | scripts/metadata_removal_audit.py | 180 | CODE | |
| LOW | scripts/detection_timing_report.py | 147 | CODE | |
| LOW | scripts/fidelity_metrics.py | 137 | CODE | |
| LOW | scripts/fidelity_metrics.py | 323 | CODE | |
| LOW | scripts/sidecar_regression.py | 154 | CODE | |
| LOW | scripts/controlnet_sweep.py | 225 | CODE | |
| LOW | src/remove_ai_watermarks/video_invisible.py | 318 | CODE | |
| LOW | src/remove_ai_watermarks/video_invisible.py | 353 | CODE | |
| LOW | src/remove_ai_watermarks/metadata.py | 245 | CODE | |
| LOW | src/remove_ai_watermarks/metadata.py | 289 | CODE | |
| LOW | src/remove_ai_watermarks/metadata.py | 462 | CODE | |
| LOW | src/remove_ai_watermarks/metadata.py | 889 | CODE | |
| LOW | src/remove_ai_watermarks/metadata.py | 930 | CODE | |
| LOW | src/remove_ai_watermarks/metadata.py | 1130 | CODE | |
| LOW | src/remove_ai_watermarks/metadata.py | 1440 | CODE | |
| LOW | src/remove_ai_watermarks/metadata_record.py | 222 | CODE | |
| LOW | src/remove_ai_watermarks/invisible_engine.py | 138 | CODE | |
| LOW | src/remove_ai_watermarks/video_visible.py | 1375 | CODE | |
| LOW | src/remove_ai_watermarks/cli.py | 1351 | CODE | |
| LOW | src/remove_ai_watermarks/forensic_metadata.py | 199 | CODE | |
| LOW | src/remove_ai_watermarks/forensic_metadata.py | 252 | CODE | |
| LOW | src/remove_ai_watermarks/forensic_metadata.py | 315 | CODE | |
| LOW | src/remove_ai_watermarks/forensic_metadata.py | 402 | CODE | |
| LOW | src/remove_ai_watermarks/forensic_metadata.py | 499 | CODE | |
| LOW | src/remove_ai_watermarks/forensic_metadata.py | 526 | CODE | |
| LOW | src/remove_ai_watermarks/forensic_metadata.py | 590 | CODE | |
| LOW | src/remove_ai_watermarks/forensic_metadata.py | 672 | CODE | |
| LOW | src/remove_ai_watermarks/forensic_metadata.py | 708 | CODE | |
| LOW | src/remove_ai_watermarks/forensic_metadata.py | 769 | CODE | |
| LOW | src/remove_ai_watermarks/identify.py | 202 | CODE | |
| LOW | src/remove_ai_watermarks/identify.py | 1120 | CODE | |
| LOW | src/remove_ai_watermarks/identify.py | 233 | CODE | |
| LOW | src/remove_ai_watermarks/video.py | 573 | CODE | |
| LOW | src/remove_ai_watermarks/_internal/ebml.py | 112 | CODE | |
| LOW | src/remove_ai_watermarks/_internal/ebml.py | 131 | CODE | |
| LOW | src/remove_ai_watermarks/_internal/riff.py | 44 | CODE | |
| LOW | src/remove_ai_watermarks/_internal/c2pa.py | 134 | CODE | |
| LOW | src/remove_ai_watermarks/_internal/c2pa.py | 261 | CODE | |
| LOW | src/remove_ai_watermarks/_internal/c2pa.py | 416 | CODE | |
| LOW | src/remove_ai_watermarks/_internal/isobmff.py | 219 | CODE | |
| LOW | src/remove_ai_watermarks/_internal/isobmff.py | 239 | CODE | |
| LOW | src/remove_ai_watermarks/_internal/isobmff.py | 345 | CODE | |
| LOW | src/remove_ai_watermarks/_internal/isobmff.py | 478 | CODE | |
| LOW | src/remove_ai_watermarks/_internal/isobmff.py | 633 | CODE | |
| 1 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | tests/test_metadata_internals.py | 518 | assert "synthid_watermark" not in info # procedural, not AI-generated | CODE |
| HIGH⚡ | tests/test_metadata.py | 1969 | # verdict must stay 'unknown', not 'AI-generated'. | COMMENT |
| HIGH⚡ | tests/test_identify.py | 1650 | # TC260 AIGC label) -- a genuine camera capture is not AI-generated, so | COMMENT |
| HIGH | tests/test_identify.py | 1777 | # A JUMBF-wrapped manifest from a SynthID-pairing signer on AI-generated content: | COMMENT |
| HIGH | src/remove_ai_watermarks/metadata.py | 717 | # without proving the whole image is AI-generated. Scoped to the Samsung editor | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/test_jimeng_engine.py | 0 | a bright blob is not the glyph shape -> low correlation, not detected. | STRING |
| HIGH | tests/test_doubao_engine.py | 0 | a bright blob is not the glyph shape -> low correlation, not detected. | STRING |
| HIGH | tests/test_samsung_engine.py | 0 | a bright blob is not the glyph shape -> low correlation, not detected. | STRING |
| HIGH | tests/test_jimeng_engine.py | 0 | the glyph silhouette correlates with itself, not with a filled block. | STRING |
| HIGH | tests/test_doubao_engine.py | 0 | the glyph silhouette correlates with itself, not with a filled block. | STRING |
| HIGH | tests/test_samsung_engine.py | 0 | the glyph silhouette correlates with itself, not with a filled block. | STRING |
| HIGH | tests/test_jimeng_engine.py | 0 | footprint_mask must not crash on degenerate sizes or non-3-channel inputs. | STRING |
| HIGH | tests/test_doubao_engine.py | 0 | footprint_mask must not crash on degenerate sizes or non-3-channel inputs. | STRING |
| HIGH | tests/test_samsung_engine.py | 0 | footprint_mask must not crash on degenerate sizes or non-3-channel inputs. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pyproject.toml | 101 | # Generation`` (its ``nucleusmoe_image`` pipeline), which only exists in | COMMENT |
| LOW | pyproject.toml | 141 | # TrustMark requires NumPy <2, whose last release has no CPython 3.13+ | COMMENT |
| LOW | maintain.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | scripts/selective_text_restoration.py | 1 | # /// script | COMMENT |
| LOW | scripts/infer_text_lines.py | 1 | # /// script | COMMENT |
| LOW | scripts/render_vendor_silhouettes.py | 41 | # Kling (可灵) stamps a thin light-gray one-line "可灵AI 3.0" bottom-right (an | COMMENT |
| LOW | scripts/fidelity_metrics.py | 1 | # /// script | COMMENT |
| LOW | scripts/qwen_scrub_prototype.py | 1 | # /// script | COMMENT |
| LOW | src/remove_ai_watermarks/jimeng_engine.py | 41 | TOPHAT_DELTA = 12 | COMMENT |
| LOW | src/remove_ai_watermarks/metadata.py | 101 | b"compositeWithTrainedAlgorithmicMedia", | COMMENT |
| LOW | src/remove_ai_watermarks/metadata.py | 701 | return None | COMMENT |
| LOW | src/remove_ai_watermarks/metadata.py | 1521 | if source_path.suffix.lower() in _FFMPEG_STRIP_EXTS: | COMMENT |
| LOW | src/remove_ai_watermarks/metadata_record.py | 61 | # opens a blind spot: past the window only ``png_late_metadata``'s ALLOWLIST is | COMMENT |
| LOW | src/remove_ai_watermarks/pill_engine.py | 41 | # Geometry (fractions of image WIDTH unless noted); top-left corner. | COMMENT |
| LOW | src/remove_ai_watermarks/watermark_registry.py | 61 | # stays strict. Safe: it only escalates where the mark is corroborated. | COMMENT |
| LOW | src/remove_ai_watermarks/watermark_registry.py | 81 | Trust = Literal["strict", "confirmed"] | COMMENT |
| LOW | src/remove_ai_watermarks/watermark_registry.py | 221 | (the full-frame footprint mask; used by removal).""" | COMMENT |
| LOW | src/remove_ai_watermarks/watermark_registry.py | 241 | # confidence sparkle path, and the capture-less pill is too weak to attribute. | COMMENT |
| LOW | src/remove_ai_watermarks/watermark_registry.py | 341 | # would report a sparkle while removal declined it, or vice versa, whenever the | COMMENT |
| LOW | src/remove_ai_watermarks/watermark_registry.py | 361 | # north-west) drops a real sparkle into this band, and the fixed-slot detector demotes | COMMENT |
| LOW | src/remove_ai_watermarks/watermark_registry.py | 381 | # Precision is flat above 0.42 and collapses below it, and that bottom band alone is | COMMENT |
| LOW | src/remove_ai_watermarks/doubao_engine.py | 41 | MAX_SATURATION = 55 # max channel spread to count a pixel as "grayish" | COMMENT |
| LOW | src/remove_ai_watermarks/identify.py | 81 | # Stable JSON contract for callers that pass a verdict between services. Bump this | COMMENT |
| LOW | src/remove_ai_watermarks/identify.py | 481 | ai_source_kind: str | None = None | COMMENT |
| LOW | src/remove_ai_watermarks/identify.py | 601 | PNG has a structured claim_generator; for JPEG/WebP/AVIF/HEIF/JXL the | COMMENT |
| LOW | src/remove_ai_watermarks/identify.py | 721 | COMMENT | |
| LOW | src/remove_ai_watermarks/identify.py | 841 | # another vendor's engine, e.g. Microsoft+OpenAI or Microsoft+Google; or an edit | COMMENT |
| LOW | src/remove_ai_watermarks/identify.py | 881 | clashes: list[str] = [] | COMMENT |
| LOW | src/remove_ai_watermarks/identify.py | 941 | """ | COMMENT |
| LOW | src/remove_ai_watermarks/identify.py | 1161 | has_c2pa = bool(info) or c2pa_marker_in(head) | COMMENT |
| LOW | src/remove_ai_watermarks/identify.py | 1261 | # `synthid_watermark`), then the byte scan for the containers that keep the | COMMENT |
| LOW | src/remove_ai_watermarks/_text_mark_engine.py | 41 | # genuine mark while killing the icon/thumbnail noise band (<=96 px). Detection is | COMMENT |
| LOW | src/remove_ai_watermarks/_text_mark_engine.py | 61 | # [0.340,0.400) 91% 73-98% 23 | COMMENT |
| LOW | src/remove_ai_watermarks/_text_mark_engine.py | 101 | max_saturation: float | COMMENT |
| LOW | src/remove_ai_watermarks/_text_mark_engine.py | 121 | # "gray" correlates the silhouette against the raw GRAYSCALE of the locate box: | COMMENT |
| LOW | …c/remove_ai_watermarks/_internal/watermark_profiles.py | 41 | COMMENT | |
| LOW | …c/remove_ai_watermarks/_internal/watermark_profiles.py | 61 | # older SDXL pipeline. OpenAI is the easier oracle: the profile already cleared | COMMENT |
| LOW | …c/remove_ai_watermarks/_internal/watermark_profiles.py | 81 | COMMENT | |
| LOW | src/remove_ai_watermarks/_internal/constants.py | 201 | # TC260 producer identity -> the mark key whose vendor signs with it now lives on the | COMMENT |
| LOW | …remove_ai_watermarks/_internal/qwen_zimage_pipeline.py | 61 | # 20B model runnable on a consumer card at all; at or above it, streaming is pure | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/remove_ai_watermarks/pixel_evidence.py | 56 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/video_invisible.py | 51 | __all__ = ["build_temporal_reference", "temporal_residual_ratio"] | CODE |
| LOW | src/remove_ai_watermarks/metadata.py | 26 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/gemini_engine.py | 24 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/invisible_watermark.py | 36 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/metadata_record.py | 57 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/invisible_engine.py | 40 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/region_eraser.py | 46 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/yuanbao_engine.py | 36 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/text_draft.py | 30 | __all__ = [ | CODE |
| LOW | src/remove_ai_watermarks/__init__.py | 37 | __all__ = [ | CODE |
| LOW | src/remove_ai_watermarks/runninghub_engine.py | 58 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/watermark_registry.py | 45 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/trustmark_detector.py | 31 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/cli.py | 129 | def _setup_logging(verbose: bool) -> None: | CODE |
| LOW | src/remove_ai_watermarks/forensic_metadata.py | 41 | __all__ = [ | CODE |
| LOW | src/remove_ai_watermarks/forensic_metadata.py | 244 | def _set_jpeg_trailer(result: dict[str, Any], data: bytes, eoi: int) -> None: | CODE |
| LOW | src/remove_ai_watermarks/identify.py | 79 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/_text_mark_engine.py | 31 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/_internal/watermark_remover.py | 31 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/_internal/c2pa.py | 27 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/_internal/isobmff.py | 50 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/_internal/tiling.py | 27 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/test_metadata_internals.py | 502 | assert "OpenAI" in info["issuer"] # issuer byte-search still robust | CODE |
| MEDIUM⚡ | tests/test_platform.py | 348 | # The more-robust watermark wins -> safer (higher) strength. | COMMENT |
| MEDIUM | scripts/video_synthid_sweep.py | 181 | # scaling-factor gate lives there, and the harness that produces the certified | COMMENT |
| MEDIUM | scripts/resource_ceilings.py | 71 | # cv2 figure, and it GROWS with the input, so the harness would partly manufacture | COMMENT |
| MEDIUM | src/remove_ai_watermarks/pixel_evidence.py | 58 | # Analysis resolution. Every statistic here is scale-robust, and a 2048px cap keeps | COMMENT |
| MEDIUM | src/remove_ai_watermarks/identify.py | 613 | # on real samples), and more robust than parsing the claim generator (which | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/remove_ai_watermarks/video_invisible.py | 353 | CODE | |
| LOW | src/remove_ai_watermarks/invisible_engine.py | 138 | CODE | |
| LOW | src/remove_ai_watermarks/video.py | 488 | CODE | |
| LOW | src/remove_ai_watermarks/video.py | 573 | CODE | |
| LOW | src/remove_ai_watermarks/video.py | 745 | CODE | |
| LOW | src/remove_ai_watermarks/_internal/watermark_remover.py | 182 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/test_metadata.py | 981 | assert xai_signature(_grok_jpeg(tmp_path, artist="John Doe")) is False | CODE |