Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages
This report presents the forensic synthetic code analysis of PyO3/maturin, a Rust project with 5,697 GitHub stars. SynthScan v2.0 examined 77,383 lines of code across 545 source files, recording 184 pattern matches distributed across 13 syntactic categories. The overall adjusted score of 3.8 places this repository in the Likely human-written 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 184 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 | deny.toml | 1 | # This template contains all of the possible sections and their default values | COMMENT |
| LOW | deny.toml | 21 | # `target_family = "unix"` configuration, that only having windows targets in | COMMENT |
| LOW | deny.toml | 41 | # from the view of cargo-deny. This is an extremely heavy hammer, as if a crate | COMMENT |
| LOW | deny.toml | 61 | # option can be used to specify the depth at which feature edges will be added. | COMMENT |
| LOW | deny.toml | 81 | #"a-crate-that-is-yanked@0.1.1", # you can also ignore yanked crate versions if you wish | COMMENT |
| LOW | deny.toml | 121 | # Each entry is the crate and version constraint, and its specific allow | COMMENT |
| LOW | deny.toml | 141 | # the license expression. If the contents match, the clarification will be used | COMMENT |
| LOW | deny.toml | 161 | # is only published to private registries, and ignore is true, the crate will | COMMENT |
| LOW | deny.toml | 181 | # The default lint level for `default` features for crates that are members of | COMMENT |
| LOW | deny.toml | 201 | ] | COMMENT |
| LOW | deny.toml | 221 | #] | COMMENT |
| LOW | deny.toml | 241 | # More documentation about the 'sources' section can be found here: | COMMENT |
| LOW | guide/src/config.md | 21 | # Features can also be conditional on the target Python version | COMMENT |
| LOW | guide/src/config.md | 61 | auditwheel = "repair" | COMMENT |
| LOW | tests/common/integration.rs | 21 | /// | COMMENT |
| LOW | .github/workflows/test.yml | 241 | bin/maturin build -i python3.12 -m test-crates/pyo3-mixed/Cargo.toml --target x86_64-pc-windows-msvc | COMMENT |
| LOW | src/cargo_options.rs | 81 | COMMENT | |
| LOW | src/cross_compile.rs | 101 | /// | COMMENT |
| LOW | src/build_options.rs | 21 | #[arg(short = 'f', long, conflicts_with = "interpreter")] | COMMENT |
| LOW | src/build_options.rs | 41 | /// PyPI are used. The linux-specific options are `manylinux` tags (for example | COMMENT |
| LOW | src/build_options.rs | 61 | pub auditwheel: Option<AuditWheelMode>, | COMMENT |
| LOW | src/build_options.rs | 81 | #[serde(default)] | COMMENT |
| LOW | src/build_options.rs | 101 | /// | COMMENT |
| LOW | src/metadata.rs | 21 | /// The metadata required to generate the .dist-info directory | COMMENT |
| LOW | src/lib.rs | 1 | //! Builds wheels from a crate that exposes python bindings through pyo3 | COMMENT |
| LOW | src/upload.rs | 21 | use std::time::Duration; | COMMENT |
| LOW | src/upload.rs | 41 | /// | COMMENT |
| LOW | src/upload.rs | 81 | } | COMMENT |
| LOW | src/project_layout.rs | 21 | /// Contains the canonicalized (i.e. absolute) path to the python part of the project | COMMENT |
| LOW | src/project_layout.rs | 301 | format!( | COMMENT |
| LOW | src/pyproject_toml.rs | 21 | } | COMMENT |
| LOW | src/pyproject_toml.rs | 61 | /// A glob pattern for the include and exclude configuration. | COMMENT |
| LOW | src/pyproject_toml.rs | 141 | } | COMMENT |
| LOW | src/pyproject_toml.rs | 161 | /// Binary executable target | COMMENT |
| LOW | src/pyproject_toml.rs | 201 | pub macos_deployment_target: Option<String>, | COMMENT |
| LOW | src/pyproject_toml.rs | 221 | /// Generate an SBOM for Rust crates. Defaults to `true`. | COMMENT |
| LOW | src/pyproject_toml.rs | 241 | /// features = [ | COMMENT |
| LOW | src/pyproject_toml.rs | 341 | /// TODO: add fields like `target_os`, `target_arch`, etc. for | COMMENT |
| LOW | src/pyproject_toml.rs | 361 | /// Patterns are resolved relative to the directory containing `pyproject.toml`. | COMMENT |
| LOW | src/pyproject_toml.rs | 381 | /// Source distribution generator | COMMENT |
| LOW | src/pyproject_toml.rs | 401 | /// Each entry can be a plain feature name string, or a conditional object | COMMENT |
| LOW | src/pyproject_toml.rs | 421 | // | COMMENT |
| LOW | src/pyproject_toml.rs | 441 | #[derive(Serialize, Deserialize, Debug, Clone, Default)] | COMMENT |
| LOW | src/pyproject_toml.rs | 481 | /// Shared CI configuration overrides used by both platform-level and | COMMENT |
| LOW | src/pyproject_toml.rs | 501 | /// Extra arguments to pass to maturin | COMMENT |
| LOW | src/pyproject_toml.rs | 521 | #[serde(rename_all = "kebab-case")] | COMMENT |
| LOW | src/main.rs | 41 | struct Opt { | COMMENT |
| LOW | src/main.rs | 61 | #[command(name = "build", alias = "b")] | COMMENT |
| LOW | src/main.rs | 81 | pgo: bool, | COMMENT |
| LOW | src/main.rs | 101 | #[arg(long)] | COMMENT |
| LOW | src/main.rs | 121 | /// This command is a workaround for [pypa/pip#6041](https://github.com/pypa/pip/issues/6041) | COMMENT |
| LOW | src/main.rs | 141 | /// Create a new cargo project | COMMENT |
| LOW | src/main.rs | 161 | publish: PublishOpt, | COMMENT |
| LOW | src/main.rs | 181 | /// The commands are meant to be called from the python PEP 517 | COMMENT |
| LOW | src/compile.rs | 61 | /// Library search paths for this architecture | COMMENT |
| LOW | src/compile.rs | 81 | #[derive(Debug, Clone)] | COMMENT |
| LOW | src/compile.rs | 101 | /// `copy_back_cargo_outputs` has restored unpatched bytes at the | COMMENT |
| LOW | src/compile.rs | 121 | /// per-arch dependency analysis during macOS wheel repair. | COMMENT |
| LOW | src/build_context/repair.rs | 321 | /// path becomes empty until [`finalize_staged_artifacts`] renames it | COMMENT |
| LOW | src/build_context/repair.rs | 341 | let maturin_build = crate::compile::ensure_target_maturin_dir(&self.project.target_dir); | COMMENT |
| 53 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | Cargo.toml | 113 | # project scaffolding, maturin new/init/generate-ci | COMMENT |
| MEDIUM | Cargo.toml | 213 | # project scaffolding | COMMENT |
| MEDIUM | tests/cli.rs | 18 | #[cfg(not(feature = "scaffolding"))] | COMMENT |
| MEDIUM | tests/cli.rs | 25 | #[cfg(not(all(feature = "upload", feature = "zig", feature = "scaffolding")))] | COMMENT |
| MEDIUM | src/lib.rs | 43 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM | src/lib.rs | 63 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM | src/lib.rs | 73 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM | src/main.rs | 18 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM⚡ | src/main.rs | 133 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM⚡ | src/main.rs | 142 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM⚡ | src/main.rs | 150 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM⚡ | src/main.rs | 262 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM⚡ | src/main.rs | 264 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM⚡ | src/main.rs | 266 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM | src/commands/mod.rs | 9 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM⚡ | src/commands/mod.rs | 66 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM⚡ | src/commands/mod.rs | 73 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM⚡ | src/commands/mod.rs | 80 | #[cfg(feature = "scaffolding")] | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | src/build_orchestrator.rs | 521 | self.context.project.project_layout.data.as_deref(), | CODE |
| CRITICAL⚡ | src/build_orchestrator.rs | 825 | if !self.context.project.metadata24.scripts.is_empty() { | CODE |
| CRITICAL⚡ | src/build_orchestrator.rs | 831 | if !self.context.project.metadata24.entry_points.is_empty() { | CODE |
| CRITICAL⚡ | src/build_orchestrator.rs | 835 | if self.context.project.project_layout.python_module.is_some() { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | maturin/bootstrap.py | 12 | CODE | |
| LOW | maturin/bootstrap.py | 19 | CODE | |
| LOW | maturin/__init__.py | 11 | CODE | |
| LOW | maturin/__main__.py | 1 | CODE | |
| LOW | …licit/python/cffi_mixed_implicit/some_rust/__init__.py | 1 | CODE | |
| LOW | …licit/python/cffi_mixed_implicit/some_rust/__init__.py | 1 | CODE | |
| LOW | …ixed-py-subdir/python/cffi_mixed_py_subdir/__init__.py | 1 | CODE | |
| LOW | …ixed-py-subdir/python/cffi_mixed_py_subdir/__init__.py | 1 | CODE | |
| LOW | test-crates/uniffi-mixed/uniffi_mixed/__init__.py | 1 | CODE | |
| LOW | test-crates/cffi-mixed/cffi_mixed/__init__.py | 1 | CODE | |
| LOW | test-crates/cffi-mixed/cffi_mixed/__init__.py | 1 | CODE | |
| LOW | test-crates/cffi-mixed/cffi_mixed/__init__.py | 2 | CODE | |
| LOW | …xed-with-path-dep/cffi_mixed_with_path_dep/__init__.py | 1 | CODE | |
| LOW | …xed-with-path-dep/cffi_mixed_with_path_dep/__init__.py | 1 | CODE | |
| LOW | …t-crates/cffi-mixed-src/src/cffi_mixed_src/__init__.py | 1 | CODE | |
| LOW | …t-crates/cffi-mixed-src/src/cffi_mixed_src/__init__.py | 1 | CODE | |
| LOW | test-crates/pyo3-mixed/pyo3_mixed/__init__.py | 1 | CODE | |
| LOW | …/cffi-mixed-submodule/cffi_mixed_submodule/__init__.py | 1 | CODE | |
| LOW | …submodule/cffi_mixed_submodule/rust_module/__init__.py | 1 | CODE | |
| LOW | …include-exclude/cffi_mixed_include_exclude/__init__.py | 1 | CODE | |
| LOW | …include-exclude/cffi_mixed_include_exclude/__init__.py | 1 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …licit/python/cffi_mixed_implicit/some_rust/__init__.py | 3 | __all__ = ["ffi", "lib"] | CODE |
| LOW | …ixed-py-subdir/python/cffi_mixed_py_subdir/__init__.py | 3 | __all__ = ["ffi", "lib"] | CODE |
| LOW | test-crates/cffi-mixed/cffi_mixed/__init__.py | 4 | __all__ = ["ffi", "lib", "Line"] | CODE |
| LOW | …xed-with-path-dep/cffi_mixed_with_path_dep/__init__.py | 3 | __all__ = ["ffi", "lib"] | CODE |
| LOW | …t-crates/cffi-mixed-src/src/cffi_mixed_src/__init__.py | 3 | __all__ = ["ffi", "lib"] | CODE |
| LOW | …/cffi-mixed-submodule/cffi_mixed_submodule/__init__.py | 3 | __all__ = ["rust"] | CODE |
| LOW | …submodule/cffi_mixed_submodule/rust_module/__init__.py | 3 | __all__ = ["rust"] | CODE |
| LOW | …include-exclude/cffi_mixed_include_exclude/__init__.py | 3 | __all__ = ["ffi", "lib"] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | noxfile.py | 94 | def _resolve_pyodide_platform_inputs(info: dict) -> dict: | CODE |
| LOW | maturin/bootstrap.py | 22 | def get_requires_for_build_wheel(config_settings: dict[str, Any] | None = None) -> list[str]: | CODE |
| LOW | maturin/bootstrap.py | 28 | def get_requires_for_build_sdist(config_settings: dict[str, Any] | None = None) -> list[str]: | CODE |
| LOW | maturin/__init__.py | 165 | def get_requires_for_build_wheel(config_settings: Optional[Mapping[str, Any]] = None) -> List[str]: | CODE |
| LOW | maturin/__init__.py | 189 | def get_requires_for_build_sdist(config_settings: Optional[Mapping[str, Any]] = None) -> List[str]: | CODE |
| LOW | maturin/__init__.py | 197 | def prepare_metadata_for_build_wheel( | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/common/other.rs | 718 | // Step 1: Build the sdist | COMMENT |
| LOW | tests/common/other.rs | 742 | // Step 2: Unpack sdist and build wheels from it | COMMENT |
| LOW | src/python_interpreter/resolver.rs | 240 | // Step 1: PYO3_CONFIG_FILE is an explicit override that trumps everything | COMMENT |
| LOW | src/python_interpreter/resolver.rs | 255 | // Step 2: Discover candidates (unified for native/cross) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/common/other.rs | 718 | // Step 1: Build the sdist | COMMENT |
| LOW | tests/common/other.rs | 742 | // Step 2: Unpack sdist and build wheels from it | COMMENT |
| LOW | src/python_interpreter/resolver.rs | 240 | // Step 1: PYO3_CONFIG_FILE is an explicit override that trumps everything | COMMENT |
| LOW | src/python_interpreter/resolver.rs | 255 | // Step 2: Discover candidates (unified for native/cross) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | test-crates/cffi-mixed/test_cffi_mixed.py | 25 | assert line.length() == 5 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test-crates/pyo3-pure/tests/test_pyo3_pure.py | 16 | def test_function(): | CODE |
| LOW | test-crates/pyo3-abi3t/tests/test_pyo3_abi3t.py | 16 | def test_function(): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/ci/github/render.rs | 147 | "# This file is autogenerated by maturin v{version} | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/workflows/test.yml | 576 | # Check if all needs were successful or skipped. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | noxfile.py | 40 | CODE |