Repository Analysis

freedomofpress/dangerzone

Take potentially dangerous PDFs, office documents, or images and convert them to safe PDFs

16.5 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of freedomofpress/dangerzone, a Python project with 5,649 GitHub stars. SynthScan v2.0 examined 26,759 lines of code across 153 source files, recording 348 pattern matches distributed across 16 syntactic categories. The overall adjusted score of 16.5 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).

16.5
Adjusted Score
16.5
Raw Score
100%
Time Factor
2026-07-30
Last Push
5.6K
Stars
Python
Language
26.8K
Lines of Code
153
Files
348
Pattern Hits
2026-08-02
Scan Date
0.08
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

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.

CRITICAL 0HIGH 12MEDIUM 14LOW 322

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 348 distinct pattern matches across 16 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.

Hyper-Verbose Identifiers218 hits · 234 pts
SeverityFileLineSnippetContext
LOWdodo.py167def task_clean_container_runtime():CODE
LOWdodo.py177def task_check_container_runtime():CODE
LOWinstall/linux/build-rpm.py39def build_insecure_converter_rpm(dist_path):CODE
LOWtests/test_registry.py16def test_parse_image_location_no_tag() -> None:CODE
LOWtests/test_registry.py29def test_parse_image_location_with_tag() -> None:CODE
LOWtests/test_registry.py41def test_parse_image_location_tag_plus_digest() -> None:CODE
LOWtests/test_registry.py62def test_parse_invalid_image_location() -> None:CODE
LOWtests/test_registry.py77def test_replace_image_digest() -> None:CODE
LOWtests/test_registry.py159def test_get_manifest_digest_from_registry(mocker: MockerFixture) -> None:CODE
LOWtests/conftest.py193def pytest_collection_modifyitems(CODE
LOWtests/test_startup.py51def test_startup_fail_allowed(mock_startup_spy: StartupSpy) -> None:CODE
LOWtests/test_startup.py67def test_startup_fail_not_allowed(mock_startup_spy: StartupSpy) -> None:CODE
LOWtests/test_startup.py99def test_machine_stop_others_task(CODE
LOWtests/test_startup.py163def test_startup_skips_podman_tasks_if_custom_runtime_is_specified(CODE
LOWtests/test_util.py16def test_replace_control_chars(uncommon_text: str, sanitized_text: str) -> None:CODE
LOWtests/test_signatures.py77def test_load_valid_signatures(file: Path) -> None:CODE
LOWtests/test_signatures.py84def test_load_invalid_signatures(file: Path) -> None:CODE
LOWtests/test_signatures.py90def test_load_tampered_signatures(file: Path) -> None:CODE
LOWtests/test_signatures.py95def test_get_log_index_from_signatures() -> None:CODE
LOWtests/test_signatures.py100def test_get_log_index_from_signatures_empty() -> None:CODE
LOWtests/test_signatures.py105def test_get_log_index_from_malformed_signatures() -> None:CODE
LOWtests/test_signatures.py110def test_get_log_index_from_missing_log_index() -> None:CODE
LOWtests/test_signatures.py115def test_upgrade_container_without_signatures(mocker: Any) -> None:CODE
LOWtests/test_signatures.py127def test_upgrade_container_lower_log_index(mocker: Any) -> None:CODE
LOWtests/test_signatures.py153def test_get_remote_signatures_error(fp: FakeProcess, mocker: Any) -> None:CODE
LOWtests/test_signatures.py164def test_get_remote_signatures_empty(fp: FakeProcess, mocker: Any) -> None:CODE
LOWtests/test_signatures.py175def test_get_remote_signatures_cosign_error(mocker: Any, fp: FakeProcess) -> None:CODE
LOWtests/test_signatures.py188def test_store_signatures_with_different_digests(CODE
LOWtests/test_signatures.py226def test_stores_signatures_updates_last_log_index(CODE
LOWtests/test_signatures.py258def test_get_remote_digest_and_logindex_when_remote_image_available(CODE
LOWtests/test_signatures.py296def test_verify_signature_tampered(tampered_signature: dict[str, Any]) -> None:CODE
LOWtests/test_signatures.py307def test_verify_signatures_empty_list() -> None:CODE
LOWtests/test_container_utils.py30def test_create_containers_conf(mocker: MockerFixture, tmp_path: pathlib.Path) -> None:CODE
LOWtests/test_container_utils.py72def test_init_podman_command_custom_runtime(mocker: MockerFixture) -> None:CODE
LOWtests/test_container_utils.py113def test_list_containers_empty(mocker: MockerFixture) -> None:CODE
LOWtests/test_container_utils.py140def test_kill_container_timeout(mocker: MockerFixture, caplog: Any) -> None:CODE
LOWtests/test_container_utils.py155def test_kill_container_exception(mocker: MockerFixture, caplog: Any) -> None:CODE
LOWtests/test_container_utils.py179def test_clear_old_images_deletes_digests(mocker: MockerFixture) -> None:CODE
LOWtests/test_releases.py35def test_new_dz_versions_are_skipped_on_linux(CODE
LOWtests/test_releases.py86def test_new_sandbox_is_checked_on_all_platforms(CODE
LOWtests/test_releases.py142def test_updates_are_postponed_if_needed(CODE
LOWtests/test_releases.py178def test_updates_proceed_after_cooldown_expires(CODE
LOWtests/test_releases.py230def test_cached_github_release_is_returned_on_subsequent_checks(CODE
LOWtests/test_releases.py264def test_error_report_is_returned_on_exception(CODE
LOWtests/test_updater_installer.py14def test_install_raise_if_local_image_cant_be_installed(CODE
LOWtests/test_updater_installer.py28def test_user_installs_dangerzone_for_the_first_time(mocker: MockerFixture) -> None:CODE
LOWtests/test_updater_installer.py46def test_upgrades_disabled_detect_wrong_container_upgrade(CODE
LOWtests/test_updater_installer.py89def test_building_dangerzone_from_source_first_time(mocker: MockerFixture) -> None:CODE
LOWtests/test_updater_installer.py107def test_building_dangerzone_from_source_nth_time(mocker: MockerFixture) -> None:CODE
LOWtests/test_updater_installer.py129def test_enable_updates_after_some_time(mocker: MockerFixture) -> None:CODE
LOWtests/test_updater_installer.py176def test_enable_updates_no_new_image_available(mocker: MockerFixture) -> None:CODE
LOWtests/test_updater_installer.py199def test_downgrade_dangerzone_application(mocker: MockerFixture) -> None:CODE
LOWtests/test_updater_installer.py243def test_podman_state_reset_updates_enabled(mocker: MockerFixture) -> None:CODE
LOWtests/test_updater_installer.py262def test_podman_state_reset_updates_disabled(mocker: MockerFixture) -> None:CODE
LOWtests/test_updater_installer.py280def test_upgrade_to_latest_container_via_cli(mocker: MockerFixture) -> None:CODE
LOWtests/test_updater_installer.py303def test_install_new_dangerzone_version_updates_enabled(mocker: MockerFixture) -> None:CODE
LOWtests/test_updater_installer.py326def test_airgapped_installation_container_tarball(mocker: MockerFixture) -> None:CODE
LOWtests/test_updater_installer.py348def test_no_bundled_container_tar_first_install(mocker: MockerFixture) -> None:CODE
LOWtests/test_updater_installer.py372def test_no_bundled_container_tar_updates_disabled(mocker: MockerFixture) -> None:CODE
LOWtests/test_cli.py196 def test_other_machine_running_error(CODE
158 more matches not shown…
Cross-Language Confusion8 hits · 40 pts
SeverityFileLineSnippetContext
HIGHdev_scripts/env.py68RUN touch /var/mail/ubuntu && chown ubuntu /var/mail/ubuntu && userdel -r ubuntuCODE
HIGHdev_scripts/env.py95 && apt-get install -y passt || echo "Skipping installation of passt package" \CODE
HIGHdev_scripts/env.py123RUN dnf install -y mupdf thunar && dnf clean allCODE
HIGHdev_scripts/env.py163RUN cd /home/user/dangerzone && poetry --no-ansi installCODE
HIGHdev_scripts/env.py174RUN dnf install -y mupdf thunar && dnf clean allCODE
HIGHdev_scripts/env.py194RUN apt-get update && apt-get install -y gpg ca-certificatesCODE
HIGHdev_scripts/env.py201RUN . /etc/os-release && echo "deb [signed-by=/etc/apt/keyrings/fpf-apt-tools-archive-keyring.gpg] \CODE
HIGHdev_scripts/env.py670 install_cmd = "apt-get update && apt-get install -y"CODE
Self-Referential Comments12 hits · 36 pts
SeverityFileLineSnippetContext
MEDIUMinstall/windows/build-wxs.py260 # Create the directory structure for the installed productCOMMENT
MEDIUMinstall/windows/build-wxs.py263 # Create a component group for application componentsCOMMENT
MEDIUMtests/test_registry.py144 # Create a sample manifest contentCOMMENT
MEDIUMtests/test_signatures.py239 # Create an existing last_log_index file with a lower valueCOMMENT
MEDIUMdev_scripts/env.py133# Create a non-root user to run DangerzoneCOMMENT
MEDIUMdev_scripts/env.py221# Create a non-root user to run DangerzoneCOMMENT
MEDIUMdev_scripts/sign-assets.py111 # Create a file that holds the SHA-256 hashes of the assets.COMMENT
MEDIUMdev_scripts/qa.py540 # The following class method is available since Python 3.6. For more details, see:COMMENT
MEDIUMdangerzone/capture_output.py7# This module provides patching utilities to redirect the standard output andCOMMENT
MEDIUMdangerzone/gui/main_window.py331 # Create the hamburger button, whose main purpose is to inform the user aboutCOMMENT
MEDIUMdangerzone/gui/main_window.py347 # Create the menu for the hamburger buttonCOMMENT
MEDIUMdangerzone/gui/run.py48 # Create the Qt appCOMMENT
Unused Imports36 hits · 36 pts
SeverityFileLineSnippetContext
LOWdangerzone/podman/__init__.py1CODE
LOWdangerzone/podman/__init__.py2CODE
LOWdangerzone/podman/command/__init__.py6CODE
LOWdangerzone/podman/command/__init__.py7CODE
LOWdangerzone/podman/errors/__init__.py32CODE
LOWdangerzone/podman/errors/__init__.py32CODE
LOWdangerzone/podman/errors/__init__.py32CODE
LOWdangerzone/podman/errors/__init__.py32CODE
LOWdangerzone/podman/errors/__init__.py32CODE
LOWdangerzone/podman/errors/__init__.py32CODE
LOWdangerzone/podman/errors/__init__.py32CODE
LOWdangerzone/podman/errors/__init__.py32CODE
LOWdangerzone/podman/errors/__init__.py32CODE
LOWdangerzone/podman/errors/__init__.py32CODE
LOWdangerzone/podman/errors/__init__.py32CODE
LOWdangerzone/podman/errors/__init__.py32CODE
LOWdangerzone/podman/errors/__init__.py68CODE
LOWdangerzone/podman/errors/exceptions.py7CODE
LOWdangerzone/podman/errors/exceptions.py12CODE
LOWdangerzone/podman/errors/exceptions.py13CODE
LOWdangerzone/updater/__init__.py5CODE
LOWdangerzone/updater/__init__.py5CODE
LOWdangerzone/updater/__init__.py6CODE
LOWdangerzone/updater/__init__.py9CODE
LOWdangerzone/updater/__init__.py9CODE
LOWdangerzone/updater/__init__.py9CODE
LOWdangerzone/updater/__init__.py14CODE
LOWdangerzone/updater/__init__.py15CODE
LOWdangerzone/updater/__init__.py15CODE
LOWdangerzone/updater/__init__.py15CODE
LOWdangerzone/updater/__init__.py16CODE
LOWdangerzone/updater/__init__.py16CODE
LOWdangerzone/updater/__init__.py16CODE
LOWdangerzone/updater/__init__.py16CODE
LOWdangerzone/updater/__init__.py16CODE
LOWdangerzone/updater/__init__.py16CODE
Docstring Block Structure4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHdangerzone/podman/command/cli_runner.py198Run the specified Podman command. Args: cmd (list[str]): The command to run, as a list of strings. STRING
HIGHdangerzone/podman/command/cli_runner.py229Run the command without additional construction. Mostly for internal use. Args: cmd (list[str]): ThSTRING
HIGHdangerzone/podman/command/command.py62Run the specified Podman command. Args: cmd (list[str]): The command to run, as a list of strings. STRING
HIGHdangerzone/windows/shellexec.py44Executes a command using the Windows ShellExecuteEx API. This allows for features like running executables with priSTRING
Modern Structural Boilerplate19 hits · 18 pts
SeverityFileLineSnippetContext
LOWinstall/linux/debian-vendor-pymupdf.py10logger = logging.getLogger(__name__)CODE
LOWdev_scripts/qa.py15logger = logging.getLogger(__name__)CODE
LOWdangerzone/startup.py21logger = logging.getLogger(__name__)CODE
LOWdangerzone/shutdown.py7logger = logging.getLogger(__name__)CODE
LOWdangerzone/__init__.py5logger = logging.getLogger(__name__)CODE
LOWdangerzone/document.py179 def set_output_dir(self, path: str) -> None:CODE
LOWdangerzone/podman/machine.py14logger = logging.getLogger(__name__)CODE
LOWdangerzone/podman/cli.py14logger = logging.getLogger(__name__)CODE
LOWdangerzone/podman/command/__init__.py9__all__ = ["GlobalOptions", "PodmanCommand"]CODE
LOWdangerzone/podman/errors/__init__.py14__all__ = [CODE
LOWdangerzone/gui/main_window.py241 def set_status_ok(self, message: str) -> None:CODE
LOWdangerzone/gui/main_window.py248 def set_status_working(self, message: str) -> None:CODE
LOWdangerzone/gui/main_window.py255 def set_status_error(self, message: str) -> None:CODE
LOWdangerzone/gui/main_window.py1468 def set_safe_extension_invalid_label(self, string: str) -> None:CODE
LOWdangerzone/gui/main_window.py1492 def update_ui(self) -> None:CODE
LOWdangerzone/gui/main_window.py1511 def update_doc_n_labels(self) -> None:CODE
LOWdangerzone/gui/main_window.py1734 def update_progress(self, error: bool, text: str, percentage: int) -> None:CODE
LOWdangerzone/gui/main_window.py1752 def update_status_image(self) -> None:CODE
LOWdangerzone/gui/main_window.py223 def _update_style(self) -> None:STRING
Excessive Try-Catch Wrapping15 hits · 15 pts
SeverityFileLineSnippetContext
LOWdev_scripts/qa.py799 except Exception: # noqa: BLE001CODE
LOWdangerzone/container_utils.py52 except Exception as e:CODE
LOWdangerzone/container_utils.py285 except Exception:CODE
LOWdangerzone/startup.py325 except Exception as e: # NOQA -- Actually catch all exceptions hereCODE
LOWdangerzone/logic.py65 except Exception:CODE
LOWdangerzone/settings.py124 except Exception as e: # noqa: BLE001CODE
LOWdangerzone/updater/releases.py110 except Exception as e: # noqa: BLE001CODE
LOWdangerzone/updater/releases.py246 except Exception as e: # noqa: BLE001CODE
LOWdangerzone/updater/cli.py72 except Exception as e: # noqa: BLE001CODE
LOWdangerzone/updater/signatures.py59 except Exception: # noqa: BLE001CODE
LOWdangerzone/updater/signatures.py140 except Exception as e: # noqa: BLE001CODE
LOWdangerzone/gui/logic.py138 except Exception:CODE
LOWdangerzone/isolation_provider/base.py41 except Exception:CODE
LOWdangerzone/isolation_provider/base.py116 except Exception as e: # NOQA -- Catch all exceptions here.CODE
LOWdangerzone/isolation_provider/base.py154 except Exception as e:CODE
Deep Nesting14 hits · 14 pts
SeverityFileLineSnippetContext
LOWinstall/windows/build-wxs.py7CODE
LOWtests/gui/test_startup.py97CODE
LOWtests/gui/test_startup.py118CODE
LOWtests/gui/test_startup.py139CODE
LOWdangerzone/startup.py103CODE
LOWdangerzone/util.py45CODE
LOWdangerzone/settings.py106CODE
LOWdangerzone/podman/command/cli_runner.py130CODE
LOWdangerzone/gui/main_window.py1752CODE
LOWdangerzone/gui/startup.py121CODE
LOWdangerzone/gui/logic.py66CODE
LOWdangerzone/gui/logic.py97CODE
LOWdangerzone/isolation_provider/qubes.py87CODE
LOWdangerzone/isolation_provider/base.py183CODE
Over-Commented Block10 hits · 10 pts
SeverityFileLineSnippetContext
LOWtests/isolation_provider/test_qubes.py21COMMENT
LOWdangerzone/container_utils.py101 #COMMENT
LOWdangerzone/container_utils.py141COMMENT
LOWdangerzone/podman/command/command.py141 ret = self.proc_service.wait(timeout=timeout)COMMENT
LOWdangerzone/podman/command/command.py161 # Args:COMMENT
LOWdangerzone/updater/installer.py61 and the released container images if updates are enabled.COMMENT
LOWdangerzone/updater/installer.py81 # This log index and the corresponding signatures have been verifiedCOMMENT
LOWdangerzone/updater/installer.py141 elif bundled_log_index == max_log_index:COMMENT
LOWdangerzone/isolation_provider/container.py141 #COMMENT
LOWdangerzone/windows/wsl.py81 log.info(f"Attempting to install WSL via '{cmd}'")COMMENT
Redundant / Tautological Comments5 hits · 8 pts
SeverityFileLineSnippetContext
LOWtests/test_settings.py67 # Check if settings file was reset to the defaultCOMMENT
LOWtests/test_settings.py105 # Check if new setting persistedCOMMENT
LOWdev_scripts/qa.py466 # Check if there have been any changes from the cached section stored in thisCOMMENT
LOWdangerzone/isolation_provider/container.py158 # Check if the container no longer exists, either because we successfully killedCOMMENT
LOWdangerzone/isolation_provider/base.py393 # Check if the process completed.COMMENT
Slop Phrases2 hits · 4 pts
SeverityFileLineSnippetContext
LOW.github/workflows/check_repos.yml5# NOTE: When you change either place, please make sure to keep the two files inCOMMENT
MEDIUMdangerzone/container_utils.py354 # There is a "digest" filter that you can use withCOMMENT
Decorative Section Separators1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUM.github/workflows/check_repos.yml2# ====================================================COMMENT
AI Slop Vocabulary1 hit · 2 pts
SeverityFileLineSnippetContext
LOWdangerzone/container_utils.py145 # We cannot simply use the vendored Podman binary in order to start a PodmanCOMMENT
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtests/test_registry.py117 mock_response_auth.json.return_value = {"token": "dummy_token"}CODE
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWdangerzone/startup.py304 def run_task(self, task: Task) -> None:CODE
AI Structural Patterns1 hit · 1 pts
SeverityFileLineSnippetContext
LOWdangerzone/podman/command/machine_manager.py39CODE