AI watermark remover. CLI and Python library to strip visible and invisible AI watermarks (Gemini / Nano Banana sparkle, SynthID) and provenance metadata (C2PA, EXIF, IPTC) from images.
This report presents the forensic synthetic code analysis of wiltodelta/remove-ai-watermarks, a Python project with 4,017 GitHub stars. SynthScan v2.0 examined 26,129 lines of code across 104 source files, recording 900 pattern matches distributed across 13 syntactic categories. The overall adjusted score of 46.0 places this repository in the Strong 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).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
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 900 distinct pattern matches across 13 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_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_pill_engine.py | 46 | def test_detects_composited_pill(self) -> None: | CODE |
| LOW | tests/test_pill_engine.py | 51 | def test_clean_frame_does_not_fire(self) -> None: | CODE |
| LOW | tests/test_pill_engine.py | 71 | def test_footprint_mask_top_left_geometry(self) -> None: | CODE |
| LOW⚡ | tests/test_pill_engine.py | 88 | def test_textured_frame_is_not_flat(self) -> None: | CODE |
| LOW⚡ | tests/test_pill_engine.py | 96 | def test_pill_registered_top_left(self) -> None: | CODE |
| LOW⚡ | tests/test_pill_engine.py | 101 | def test_pill_mask_is_top_left_via_registry(self) -> None: | CODE |
| LOW⚡ | tests/test_pill_engine.py | 133 | def test_pill_kept_with_metadata_on_flat_footprint(self, monkeypatch: pytest.MonkeyPatch) -> None: | CODE |
| LOW⚡ | tests/test_pill_engine.py | 139 | def test_pill_dropped_with_metadata_on_textured_footprint(self, monkeypatch: pytest.MonkeyPatch) -> None: | CODE |
| LOW⚡ | tests/test_pill_engine.py | 145 | def test_pill_kept_via_wordmark_ignores_texture(self, monkeypatch: pytest.MonkeyPatch) -> None: | CODE |
| LOW⚡ | tests/test_pill_engine.py | 152 | def test_pill_kept_via_assume_ai_on_flat_footprint(self, monkeypatch: pytest.MonkeyPatch) -> None: | CODE |
| LOW⚡ | tests/test_pill_engine.py | 158 | def test_pill_dropped_via_assume_ai_on_textured_footprint(self, monkeypatch: pytest.MonkeyPatch) -> None: | CODE |
| LOW⚡ | tests/test_pill_engine.py | 164 | def test_pill_dropped_without_metadata_or_wordmark(self, monkeypatch: pytest.MonkeyPatch) -> None: | CODE |
| LOW⚡ | tests/test_pill_engine.py | 169 | def test_pill_dropped_on_doubao_even_with_metadata(self, monkeypatch: pytest.MonkeyPatch) -> None: | CODE |
| LOW | tests/test_pill_engine.py | 181 | def test_detect_bgra_no_crash() -> None: | CODE |
| LOW⚡ | tests/test_synthid_pixel_probe.py | 39 | def test_flat_image_has_zero_carrier(self): | CODE |
| LOW⚡ | tests/test_synthid_pixel_probe.py | 44 | def test_carrier_is_unit_norm(self): | CODE |
| LOW⚡ | tests/test_synthid_pixel_probe.py | 52 | def test_ncc_mismatched_shape_is_zero(self): | CODE |
| LOW⚡ | tests/test_synthid_pixel_probe.py | 59 | def test_shared_carrier_correlates_high(self): | CODE |
| LOW⚡ | tests/test_synthid_pixel_probe.py | 64 | def test_random_fills_near_zero(self): | CODE |
| LOW⚡ | tests/test_synthid_pixel_probe.py | 69 | def test_random_baseline_near_zero(self): | CODE |
| LOW⚡ | tests/test_synthid_pixel_probe.py | 74 | def test_removed_carrier_collapses_correlation(self): | CODE |
| LOW | tests/test_synthid_pixel_probe.py | 94 | def test_consistency_command_runs(self, tmp_path: Path): | CODE |
| LOW | tests/test_synthid_pixel_probe.py | 101 | def test_consistency_needs_two_images(self, tmp_path: Path): | CODE |
| LOW | tests/test_img2img_runner.py | 33 | def test_mps_error_reloads_on_cpu_and_retries(self, monkeypatch: pytest.MonkeyPatch): | CODE |
| LOW | tests/test_img2img_runner.py | 54 | def test_happy_path_returns_original_device_without_reload(self, monkeypatch: pytest.MonkeyPatch): | CODE |
| LOW | tests/test_img2img_runner.py | 74 | def test_non_mps_runtime_error_propagates(self, monkeypatch: pytest.MonkeyPatch): | CODE |
| LOW | tests/test_img2img_runner.py | 92 | def test_mps_error_on_non_mps_device_propagates(self, monkeypatch: pytest.MonkeyPatch): | CODE |
| LOW | tests/test_img2img_runner.py | 113 | def test_returns_first_image_from_pipeline_result(self): | CODE |
| LOW | tests/test_img2img_runner.py | 121 | def test_typeerror_on_callback_retries_without_callback(self): | CODE |
| LOW⚡ | tests/test_jimeng_engine.py | 44 | def test_box_anchored_bottom_right(self): | CODE |
| 525 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_noai.py | 42 | # ── Constants ─────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_noai.py | 76 | # ── Extractor ─────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_noai.py | 337 | # ── ISOBMFF (AVIF / HEIF / JPEG-XL container stripping) ────────────── | COMMENT |
| MEDIUM | tests/test_noai.py | 113 | # ── Cleaner ───────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/test_noai.py | 132 | # ── C2PA ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/test_noai.py | 232 | # ── CBOR text extraction (parser internals) ───────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_metadata.py | 32 | # ── Key detection ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_metadata.py | 60 | # ── has_ai_metadata / get_ai_metadata ─────────────────────────────── | COMMENT |
| MEDIUM | tests/test_metadata.py | 480 | # ── SynthID-source detection (metadata proxy) ──────────────────────── | COMMENT |
| MEDIUM | tests/test_metadata.py | 545 | # ── 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 | 353 | # ── Local diffusion parameters (Stable Diffusion / ComfyUI) ───────── | COMMENT |
| MEDIUM⚡ | tests/test_identify.py | 459 | # ── Visible-sparkle fallback (mocked detector) ────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_identify.py | 635 | # ── Caveats and serialization ─────────────────────────────────────── | COMMENT |
| MEDIUM | tests/test_identify.py | 36 | # ── Pure attribution logic (no file IO) ───────────────────────────── | COMMENT |
| MEDIUM | tests/test_identify.py | 262 | # ── End-to-end verdicts on real fixtures ──────────────────────────── | COMMENT |
| MEDIUM | tests/test_identify.py | 387 | # ── China TC260 AIGC label as a PNG text chunk (Doubao) ───────────── | COMMENT |
| MEDIUM | tests/test_identify.py | 414 | # ── HuggingFace-hosted job marker (medium confidence) ─────────────── | COMMENT |
| MEDIUM | tests/test_identify.py | 836 | # ── Open invisible watermark (SD/SDXL/FLUX) integration ───────────── | COMMENT |
| MEDIUM | tests/test_identify.py | 903 | # ── Integrity clashes (contradictions between independent signals) ────── | COMMENT |
| MEDIUM⚡ | tests/test_platform.py | 29 | # ── Device detection ──────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_platform.py | 109 | # ── Model profiles ────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_platform.py | 388 | # ── Format utilities ──────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_platform.py | 426 | # ── Availability checks ──────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/test_platform.py | 450 | # ── Platform-specific path handling ───────────────────────────────── | COMMENT |
| MEDIUM | scripts/fidelity_metrics.py | 70 | # ── helpers ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | scripts/fidelity_metrics.py | 92 | # ── text: PaddleOCR (PP-OCRv6) ─────────────────────────────────────── | COMMENT |
| MEDIUM | scripts/fidelity_metrics.py | 173 | # ── face: detection + ArcFace + texture ────────────────────────────── | COMMENT |
| MEDIUM | scripts/fidelity_metrics.py | 245 | # ── whole image: LPIPS / SSIM / PSNR ───────────────────────────────── | COMMENT |
| MEDIUM | scripts/fidelity_metrics.py | 276 | # ── reporting ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | scripts/fidelity_metrics.py | 287 | # ── CLI ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/metadata.py | 28 | # ── Known AI metadata keys ────────────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/gemini_engine.py | 283 | # ── Detection ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/gemini_engine.py | 409 | # ── Fusion ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/gemini_engine.py | 535 | # ── Removal ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/identify.py | 545 | # ── C2PA Content Credentials ──────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/identify.py | 608 | # ── SynthID metadata proxy ────────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/identify.py | 666 | # ── Local diffusion parameters (Stable Diffusion / ComfyUI) ────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/identify.py | 685 | # ── xAI / Grok EXIF signature scheme (no C2PA/SynthID/IPTC) ────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/identify.py | 696 | # ── HuggingFace-hosted job marker (hf-job-id PNG text chunk) ───── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/identify.py | 708 | # ── Samsung Galaxy AI editing marker (genAIType) ───────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/identify.py | 724 | # ── Open invisible watermark (SD / SDXL / FLUX, dwtDct) ────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/identify.py | 743 | # ── Verdict so far (metadata + embedded watermark) ────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/humanizer.py | 90 | # ── Adaptive polish (target the input's detail level; spare text) ────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/_text_mark_engine.py | 173 | # ── Templates (delegate to the asset-keyed module cache) ──────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/_text_mark_engine.py | 184 | # ── Locate ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/_text_mark_engine.py | 200 | # ── Mask ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/_text_mark_engine.py | 244 | # ── Detect ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/_text_mark_engine.py | 292 | # ── Inpaint footprint (for the inpaint-fallback removal path) ──────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/noai/watermark_remover.py | 424 | # ── Preload ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/noai/watermark_remover.py | 435 | # ── Pipeline loading ───────────────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/noai/watermark_remover.py | 613 | # ── Core removal ───────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/noai/watermark_remover.py | 796 | # ── Img2img runner ─────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/remove_ai_watermarks/noai/watermark_remover.py | 834 | # ── ControlNet runner ──────────────────────────────────────────── | COMMENT |
| 8 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | README.md | 117 | Google embeds **SynthID** into every image generated by Gemini / Nano Banana. Other AI services use StableSignature, Tre | CODE |
| HIGH | README.md | 376 | # regenerate regardless when you know the image is AI-generated. | COMMENT |
| HIGH | README.md | 410 | # Metadata-stripped screenshot you know is AI-generated: relax detection to recover a | COMMENT |
| HIGH⚡ | tests/test_noai.py | 315 | assert "synthid_watermark" not in info # procedural, not AI-generated | CODE |
| HIGH⚡ | tests/test_metadata.py | 1639 | # verdict must stay 'unknown', not 'AI-generated'. | COMMENT |
| HIGH⚡ | tests/test_identify.py | 1065 | # TC260 AIGC label) -- a genuine camera capture is not AI-generated, so | COMMENT |
| HIGH | data/samples/openai-images-2/README.md | 3 | Reference image generated by OpenAI's ChatGPT Images 2.0 (`gpt-image-2`, launched 2026-04-21). Kept in the repo so the C | CODE |
| HIGH | src/remove_ai_watermarks/metadata.py | 526 | # without proving the whole image is AI-generated. Scoped to the Samsung editor | COMMENT |
| HIGH | src/remove_ai_watermarks/noai/c2pa.py | 388 | # vendor (Google/OpenAI) on AI-generated content implies an invisible | COMMENT |
| HIGH | src/remove_ai_watermarks/noai/constants.py | 16 | # AI-generated image metadata keys (Stable Diffusion, ComfyUI, Midjourney, etc.) | COMMENT |
| HIGH | src/remove_ai_watermarks/noai/constants.py | 177 | # Canva Magic Media signs AI-generated images as "Canva" with a generic | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| 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 | 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 | 103 | except Exception as exc: | 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/corpus_gap_scan.py | 157 | except Exception as exc: | CODE |
| LOW | scripts/controlnet_sweep.py | 279 | except Exception as exc: | CODE |
| LOW | src/remove_ai_watermarks/metadata.py | 325 | except Exception as exc: | CODE |
| LOW | src/remove_ai_watermarks/metadata.py | 404 | except Exception as exc: | CODE |
| LOW | src/remove_ai_watermarks/metadata.py | 508 | except Exception as exc: | CODE |
| LOW | src/remove_ai_watermarks/metadata.py | 682 | except Exception as exc: # unopenable format / malformed EXIF | CODE |
| LOW | src/remove_ai_watermarks/metadata.py | 690 | except Exception as exc: | CODE |
| LOW | src/remove_ai_watermarks/metadata.py | 738 | except Exception as exc: # unopenable format / malformed EXIF | CODE |
| LOW | src/remove_ai_watermarks/metadata.py | 861 | except Exception as exc: | CODE |
| LOW | src/remove_ai_watermarks/metadata.py | 1052 | except Exception: | CODE |
| LOW | src/remove_ai_watermarks/metadata.py | 1170 | except Exception: | CODE |
| LOW | src/remove_ai_watermarks/image_io.py | 76 | except Exception: | CODE |
| LOW | src/remove_ai_watermarks/image_io.py | 88 | except Exception: | CODE |
| LOW | src/remove_ai_watermarks/image_io.py | 171 | except Exception: | CODE |
| LOW | src/remove_ai_watermarks/invisible_watermark.py | 98 | except Exception as exc: # decode can fail on tiny images | CODE |
| LOW | src/remove_ai_watermarks/invisible_watermark.py | 106 | except Exception as exc: | CODE |
| LOW | src/remove_ai_watermarks/invisible_engine.py | 155 | except Exception as e: # never let an optional upscaler break removal | CODE |
| LOW | src/remove_ai_watermarks/trustmark_detector.py | 99 | except Exception as exc: # model download / decode failure / unreadable image | CODE |
| MEDIUM | src/remove_ai_watermarks/cli.py | 132 | console.print(f"Error: File not found: {path}") | CODE |
| MEDIUM | src/remove_ai_watermarks/cli.py | 618 | console.print(f"Error: Failed to read image: {source}") | CODE |
| LOW | src/remove_ai_watermarks/cli.py | 652 | except Exception as e: | CODE |
| MEDIUM | src/remove_ai_watermarks/cli.py | 719 | console.print(f"Error: Failed to read image: {source}") | CODE |
| LOW | src/remove_ai_watermarks/cli.py | 742 | except Exception as e: | CODE |
| MEDIUM | src/remove_ai_watermarks/cli.py | 1123 | console.print(f"Error: Failed to read image: {source}") | CODE |
| LOW | src/remove_ai_watermarks/cli.py | 1212 | except Exception as e: | CODE |
| MEDIUM | src/remove_ai_watermarks/cli.py | 1222 | console.print(f"Error: Failed to read intermediate file: {tmp_path}") | CODE |
| LOW | src/remove_ai_watermarks/cli.py | 1538 | except Exception as e: | CODE |
| LOW | src/remove_ai_watermarks/upscaler.py | 122 | except Exception as e: # GPU OOM / unsupported op: fall back to CPU | CODE |
| LOW | src/remove_ai_watermarks/identify.py | 436 | except Exception as exc: # cv2/engine assets missing | CODE |
| LOW | src/remove_ai_watermarks/identify.py | 467 | except Exception as exc: # cv2/engine assets missing | CODE |
| LOW | src/remove_ai_watermarks/identify.py | 478 | except Exception as exc: # one engine failing must not break identify | CODE |
| LOW | src/remove_ai_watermarks/identify.py | 769 | except Exception as exc: # cv2 missing - detectors fall back / no-op | CODE |
| LOW | src/remove_ai_watermarks/identify.py | 848 | except Exception: # unreadable / detector error -> do not skip the removal | CODE |
| LOW | src/remove_ai_watermarks/noai/watermark_remover.py | 168 | except Exception: # noqa: S110 | CODE |
| LOW | src/remove_ai_watermarks/noai/watermark_remover.py | 223 | except Exception: | CODE |
| LOW | src/remove_ai_watermarks/noai/watermark_remover.py | 523 | except Exception as exc: | CODE |
| LOW | src/remove_ai_watermarks/noai/watermark_remover.py | 776 | except Exception: | CODE |
| LOW | src/remove_ai_watermarks/noai/watermark_remover.py | 960 | except Exception as e: | CODE |
| LOW | src/remove_ai_watermarks/noai/watermark_profiles.py | 154 | except Exception: # metadata unreadable -> treat as unknown vendor | CODE |
| LOW⚡ | src/remove_ai_watermarks/noai/c2pa.py | 98 | except Exception as exc: # malformed manifest, unsupported container, etc. | CODE |
| LOW⚡ | src/remove_ai_watermarks/noai/c2pa.py | 106 | except Exception as exc: # pragma: no cover - reader opened but json() failed | CODE |
| LOW | src/remove_ai_watermarks/noai/c2pa.py | 161 | except Exception: | CODE |
| LOW | src/remove_ai_watermarks/noai/c2pa.py | 281 | except Exception: | CODE |
| LOW | src/remove_ai_watermarks/noai/c2pa.py | 483 | except Exception: | CODE |
| LOW | src/remove_ai_watermarks/noai/extractor.py | 39 | except Exception: | CODE |
| LOW | src/remove_ai_watermarks/noai/isobmff.py | 275 | except Exception: | CODE |
| LOW | src/remove_ai_watermarks/noai/progress.py | 104 | except Exception as error: # pragma: no cover - passthrough | CODE |
| MEDIUM | src/remove_ai_watermarks/noai/progress.py | 101 | def worker() -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_gemini_engine.py | 3 | CODE | |
| LOW | tests/test_pill_engine.py | 4 | CODE | |
| LOW | tests/conftest.py | 3 | CODE | |
| LOW | tests/test_synthid_pixel_probe.py | 9 | CODE | |
| LOW | tests/test_img2img_runner.py | 10 | CODE | |
| LOW | tests/test_jimeng_engine.py | 8 | CODE | |
| LOW | tests/test_security_clamp.py | 17 | CODE | |
| LOW | tests/test_trustmark_detector.py | 9 | CODE | |
| LOW | tests/test_synthid_corpus.py | 3 | CODE | |
| LOW | tests/test_tiling.py | 9 | CODE | |
| LOW | tests/test_noai.py | 4 | CODE | |
| LOW | tests/test_fidelity_matching.py | 12 | CODE | |
| LOW | tests/test_watermark_registry.py | 3 | CODE | |
| LOW | tests/test_invisible_watermark.py | 8 | CODE | |
| LOW | tests/test_region_eraser.py | 3 | CODE | |
| LOW | tests/test_metadata.py | 3 | CODE | |
| LOW | tests/test_image_io.py | 3 | CODE | |
| LOW | tests/test_invisible_engine.py | 3 | CODE | |
| LOW | tests/test_doubao_engine.py | 3 | CODE | |
| LOW | tests/test_identify.py | 7 | CODE | |
| LOW | tests/test_optional_deps.py | 3 | 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_upscaler.py | 8 | CODE | |
| LOW | scripts/_plain_console.py | 10 | CODE | |
| LOW | scripts/invisible_quality_audit.py | 20 | CODE | |
| LOW | scripts/synthid_pixel_probe.py | 26 | CODE | |
| LOW | scripts/synthid_corpus.py | 16 | CODE | |
| LOW | scripts/visible_removal_audit.py | 25 | CODE | |
| LOW | scripts/render_pill_silhouette.py | 19 | CODE | |
| LOW | scripts/visible_alpha_solve.py | 37 | CODE | |
| LOW | scripts/metadata_removal_audit.py | 21 | CODE | |
| LOW | scripts/fidelity_metrics.py | 54 | CODE | |
| LOW | scripts/corpus_gap_scan.py | 25 | CODE | |
| LOW | scripts/controlnet_sweep.py | 32 | CODE | |
| LOW | scripts/qwen_scrub_prototype.py | 38 | CODE | |
| LOW | src/remove_ai_watermarks/jimeng_engine.py | 22 | CODE | |
| LOW | src/remove_ai_watermarks/samsung_engine.py | 26 | CODE | |
| LOW | src/remove_ai_watermarks/metadata.py | 9 | CODE | |
| LOW | src/remove_ai_watermarks/gemini_engine.py | 21 | CODE | |
| LOW | src/remove_ai_watermarks/image_io.py | 22 | CODE | |
| LOW | src/remove_ai_watermarks/invisible_watermark.py | 26 | CODE | |
| LOW | src/remove_ai_watermarks/pill_engine.py | 21 | CODE | |
| LOW | src/remove_ai_watermarks/invisible_engine.py | 14 | CODE | |
| LOW | src/remove_ai_watermarks/region_eraser.py | 30 | CODE | |
| LOW | src/remove_ai_watermarks/__init__.py | 33 | CODE | |
| LOW | src/remove_ai_watermarks/__init__.py | 33 | CODE | |
| LOW | src/remove_ai_watermarks/watermark_registry.py | 27 | CODE | |
| LOW | src/remove_ai_watermarks/api.py | 17 | CODE | |
| LOW | src/remove_ai_watermarks/trustmark_detector.py | 22 | CODE | |
| LOW | src/remove_ai_watermarks/cli.py | 9 | CODE | |
| LOW | src/remove_ai_watermarks/upscaler.py | 22 | CODE | |
| LOW | src/remove_ai_watermarks/doubao_engine.py | 21 | CODE | |
| LOW | src/remove_ai_watermarks/identify.py | 20 | CODE | |
| LOW | src/remove_ai_watermarks/_text_mark_engine.py | 25 | CODE | |
| LOW | src/remove_ai_watermarks/optional_deps.py | 12 | CODE | |
| 12 more matches not shown… | ||||
| 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 | 61 | # primary, spec-tracking manifest parser for the identify/metadata path; the | COMMENT |
| LOW | pyproject.toml | 81 | "diffusers>=0.38.0", | COMMENT |
| LOW | pyproject.toml | 121 | # Lightweight inpaint backend -- MI-GAN via onnxruntime (andraniksargsyan/migan, | COMMENT |
| LOW | README.md | 321 | COMMENT | |
| LOW | README.md | 341 | # If no known visible mark is found, it writes no output and exits 2 (not 0), | COMMENT |
| LOW | README.md | 361 | # to regenerate in overlapping feather-blended tiles at native resolution (lossless). | COMMENT |
| LOW | maintain.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | scripts/fidelity_metrics.py | 1 | # /// script | COMMENT |
| LOW | scripts/qwen_scrub_prototype.py | 1 | # /// script | COMMENT |
| LOW | src/remove_ai_watermarks/metadata.py | 101 | # (Meta / Instagram / MidJourney) use ``trainedAlgorithmicMedia``. Including the bare | COMMENT |
| LOW | src/remove_ai_watermarks/metadata.py | 421 | return _parse(html.unescape(body.decode("utf-8", "replace")), require_tc260_field=False) | COMMENT |
| LOW | src/remove_ai_watermarks/metadata.py | 1141 | # box walker can't reach these, so strip container metadata losslessly via | COMMENT |
| LOW | src/remove_ai_watermarks/gemini_engine.py | 141 | """ | COMMENT |
| LOW | src/remove_ai_watermarks/gemini_engine.py | 161 | # Bright-background content false positives (2026-06-26 landing-page FPs: a snow+sky | COMMENT |
| LOW | src/remove_ai_watermarks/gemini_engine.py | 181 | # grad gate discards is the CORE COLOR: a real Gemini sparkle core is near-WHITE | COMMENT |
| LOW | src/remove_ai_watermarks/gemini_engine.py | 201 | # real-photo corner match (~0.78 across native + downscaled real photos) and a | 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 | 41 | COMMENT | |
| LOW | src/remove_ai_watermarks/watermark_registry.py | 221 | # bottom-right text -- a real Doubao mark scores ~0.40-0.42 as a gemini match, | COMMENT |
| LOW | src/remove_ai_watermarks/cli.py | 1361 | # visible-processed `out_path` whose C2PA is already gone. | COMMENT |
| LOW | src/remove_ai_watermarks/identify.py | 61 | COMMENT | |
| LOW | src/remove_ai_watermarks/identify.py | 141 | is_ai_generated: bool | None # True / False is never asserted; None = unknown | COMMENT |
| LOW | src/remove_ai_watermarks/identify.py | 181 | """ | COMMENT |
| LOW | src/remove_ai_watermarks/identify.py | 221 | return platform | COMMENT |
| LOW | src/remove_ai_watermarks/identify.py | 321 | return None | COMMENT |
| LOW | src/remove_ai_watermarks/identify.py | 561 | # trainedAlgorithmicMedia, so the registered generator name is the only signal. | COMMENT |
| LOW | src/remove_ai_watermarks/_text_mark_engine.py | 41 | COMMENT | |
| LOW | src/remove_ai_watermarks/noai/watermark_profiles.py | 41 | COMMENT | |
| LOW | src/remove_ai_watermarks/noai/watermark_profiles.py | 61 | # guess, which was speculative and never oracle-checked at that resolution. | COMMENT |
| LOW | src/remove_ai_watermarks/noai/watermark_profiles.py | 81 | # this is a MARGIN argument for `sdxl`, not a fresh certification -- there is no local | COMMENT |
| LOW | src/remove_ai_watermarks/noai/c2pa.py | 361 | c2pa_info["actions"] = ", ".join(actions) | COMMENT |
| LOW | src/remove_ai_watermarks/noai/constants.py | 101 | needle: str | None | COMMENT |
| LOW | src/remove_ai_watermarks/noai/constants.py | 121 | C2paAiVendor(b"OpenAI", "OpenAI", "OpenAI (ChatGPT / gpt-image / DALL-E / Sora)", "OpenAI", synthid=True), | COMMENT |
| LOW | src/remove_ai_watermarks/noai/constants.py | 141 | # JSON and the raw caBX bytes alike); it normalizes to the same "ByteDance" | COMMENT |
| LOW | src/remove_ai_watermarks/noai/constants.py | 161 | # Engine output, NO digitalSourceType assertion -- so the generator name is the | COMMENT |
| LOW | src/remove_ai_watermarks/noai/constants.py | 181 | C2paAiVendor(b"Canva", "Canva", "Canva (Magic Media)", "Canva"), | COMMENT |
| LOW | src/remove_ai_watermarks/noai/constants.py | 201 | # Both are excluded to avoid false-positive AI attribution; re-evaluate only | COMMENT |
| LOW | src/remove_ai_watermarks/noai/constants.py | 221 | # our API include both C2PA metadata and SynthID watermarks." OpenAI also | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/test_noai.py | 299 | assert "OpenAI" in info["issuer"] # issuer byte-search still robust | CODE |
| MEDIUM⚡ | tests/test_platform.py | 320 | # more-robust watermark, so it is higher. | COMMENT |
| MEDIUM⚡ | tests/test_platform.py | 369 | # The more-robust watermark wins -> safer (higher) strength. | COMMENT |
| MEDIUM | src/remove_ai_watermarks/identify.py | 190 | # on real samples), and more robust than parsing the claim generator (which | COMMENT |
| MEDIUM | src/remove_ai_watermarks/noai/watermark_remover.py | 771 | # The single, robust stripper (byte-level: lossless for JPEG, handles | COMMENT |
| MEDIUM | src/remove_ai_watermarks/noai/watermark_profiles.py | 18 | # oracle floors (2026-06-20): OpenAI **0.10** (seed-robust -- clean on seeds 0-4) and | COMMENT |
| MEDIUM | src/remove_ai_watermarks/noai/watermark_profiles.py | 65 | # tracks the Google (more robust watermark) value -> 0.15, still safe-by-default and the | COMMENT |
| MEDIUM | src/remove_ai_watermarks/noai/watermark_profiles.py | 95 | # SDXL ladder above: OpenAI 0.10 (seed-robust), Gemini 0.25 (HIGHER than controlnet's | COMMENT |
| MEDIUM | src/remove_ai_watermarks/noai/__init__.py | 29 | # Re-export the single, robust stripper (byte-level, lossless-for-JPEG, all | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/synthid_corpus.py | 77 | CODE | |
| LOW | scripts/visible_removal_audit.py | 69 | CODE | |
| LOW | scripts/metadata_removal_audit.py | 174 | CODE | |
| LOW | scripts/fidelity_metrics.py | 134 | CODE | |
| LOW | scripts/fidelity_metrics.py | 322 | CODE | |
| LOW | scripts/controlnet_sweep.py | 225 | CODE | |
| LOW | src/remove_ai_watermarks/metadata.py | 212 | CODE | |
| LOW | src/remove_ai_watermarks/metadata.py | 306 | CODE | |
| LOW | src/remove_ai_watermarks/metadata.py | 635 | CODE | |
| LOW | src/remove_ai_watermarks/metadata.py | 833 | CODE | |
| LOW | src/remove_ai_watermarks/metadata.py | 1079 | CODE | |
| LOW | src/remove_ai_watermarks/invisible_engine.py | 159 | CODE | |
| LOW | src/remove_ai_watermarks/watermark_registry.py | 248 | CODE | |
| LOW | src/remove_ai_watermarks/cli.py | 1264 | CODE | |
| LOW | src/remove_ai_watermarks/cli.py | 1441 | CODE | |
| LOW | src/remove_ai_watermarks/noai/watermark_remover.py | 173 | CODE | |
| LOW | src/remove_ai_watermarks/noai/watermark_remover.py | 186 | CODE | |
| LOW | src/remove_ai_watermarks/noai/c2pa.py | 111 | CODE | |
| LOW | src/remove_ai_watermarks/noai/c2pa.py | 242 | CODE | |
| LOW | src/remove_ai_watermarks/noai/c2pa.py | 433 | CODE | |
| LOW | src/remove_ai_watermarks/noai/extractor.py | 122 | CODE | |
| LOW | src/remove_ai_watermarks/noai/isobmff.py | 92 | CODE | |
| LOW | src/remove_ai_watermarks/noai/isobmff.py | 238 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/remove_ai_watermarks/metadata.py | 21 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/gemini_engine.py | 40 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/invisible_watermark.py | 34 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/invisible_engine.py | 37 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/region_eraser.py | 41 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/__init__.py | 30 | __all__ = ["__version__", "remove_visible", "visible_provenance"] | CODE |
| LOW | src/remove_ai_watermarks/watermark_registry.py | 38 | 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 | 111 | def _setup_logging(verbose: bool) -> None: | CODE |
| LOW | src/remove_ai_watermarks/upscaler.py | 32 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/identify.py | 60 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/_text_mark_engine.py | 40 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/noai/watermark_remover.py | 54 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/noai/watermark_remover.py | 417 | def _set_progress(self, message: str) -> None: | CODE |
| LOW | src/remove_ai_watermarks/noai/c2pa.py | 44 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/noai/__init__.py | 23 | __all__ = ["WatermarkRemover", "remove_ai_metadata", "remove_watermark"] | CODE |
| LOW | src/remove_ai_watermarks/noai/isobmff.py | 36 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/noai/tiling.py | 27 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/remove_ai_watermarks/noai/img2img_runner.py | 20 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/remove_ai_watermarks/noai/watermark_remover.py | 630 | Remove watermark from an image using regeneration attack. Args: image_path: Path to the watermarked | STRING |
| HIGH | src/remove_ai_watermarks/noai/progress.py | 77 | Execute *task* in a background thread while showing a progress animation. The animation renders two lines to ``sys. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/remove_ai_watermarks/invisible_engine.py | 159 | CODE | |
| LOW | src/remove_ai_watermarks/cli.py | 1264 | CODE | |
| LOW | src/remove_ai_watermarks/noai/watermark_remover.py | 615 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/test_metadata.py | 843 | assert xai_signature(_grok_jpeg(tmp_path, artist="John Doe")) is False | CODE |