Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages
This report summarizes scanner evidence for PyO3/maturin, a Rust project with 5,860 GitHub stars. SynthScan examined 80,651 lines of code across 560 source files, recording 195 pattern matches distributed across 15 syntactic categories. The legacy adjusted pattern signal is 3.9 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 160 finding(s).
Are imports declared and package/API names verified? 26 finding(s).
Are wrappers, guards, and repeated structures necessary? 15 finding(s).
Which changes need focused human review? 195 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 195 distinct pattern matches across 15 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| 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 | # zip >=9 fixes these, but xwin 0.10.0 still requires zip ^8. | COMMENT |
| LOW | deny.toml | 141 | # licensing information | COMMENT |
| LOW | deny.toml | 161 | [licenses.private] | COMMENT |
| LOW | deny.toml | 181 | wildcards = "allow" | COMMENT |
| LOW | deny.toml | 201 | # List of crates to deny | COMMENT |
| LOW | deny.toml | 221 | # "__tls", | COMMENT |
| LOW | deny.toml | 241 | # by default infinite. | COMMENT |
| LOW | guide/src/config.md | 21 | # Features can also be conditional on the target Python version | COMMENT |
| LOW | guide/src/config.md | 61 | # Bindings type | COMMENT |
| LOW | guide/src/config.md | 81 | sdist-generator = "cargo" | COMMENT |
| LOW | tests/common/mod.rs | 101 | pub fn case_target_dir(case_id: &str) -> PathBuf { | COMMENT |
| LOW | tests/common/integration.rs | 21 | /// | COMMENT |
| LOW | src/cargo_options.rs | 81 | COMMENT | |
| LOW | src/cross_compile.rs | 101 | /// Finds the `_sysconfigdata*.py` file in the library path. | COMMENT |
| LOW | src/cross_compile.rs | 121 | /// | COMMENT |
| LOW | src/build_options.rs | 21 | /// Find interpreters from the host machine | COMMENT |
| LOW | src/build_options.rs | 41 | /// The `pypi` option applies on all platforms and ensure that only tags that can be uploaded to | COMMENT |
| LOW | src/build_options.rs | 61 | #[arg(long, conflicts_with = "skip_auditwheel")] | COMMENT |
| LOW | src/build_options.rs | 81 | #[derive(Debug, Default, Serialize, Deserialize, clap::Parser, Clone, Eq, PartialEq)] | COMMENT |
| LOW | src/build_options.rs | 101 | /// High level API for building wheels from a crate, also used for the CLI. | COMMENT |
| LOW | src/metadata.rs | 21 | /// The metadata required to generate the .dist-info directory | COMMENT |
| LOW | src/metadata.rs | 841 | } | COMMENT |
| LOW | src/lib.rs | 1 | //! Builds wheels from a crate that exposes python bindings through pyo3 | COMMENT |
| LOW | src/lib.rs | 21 | //! - auditwheel: Enables dependency auditing and wheel repair for macOS (install-name/rpath | 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 | pub maturin: Option<ToolMaturin>, | COMMENT |
| LOW | src/pyproject_toml.rs | 61 | #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] | COMMENT |
| LOW | src/pyproject_toml.rs | 141 | } | COMMENT |
| LOW | src/pyproject_toml.rs | 161 | pub enum CargoCrateType { | COMMENT |
| LOW | src/pyproject_toml.rs | 201 | #[serde(alias = "macosx-deployment-target")] | COMMENT |
| LOW | src/pyproject_toml.rs | 221 | pub struct SbomConfig { | COMMENT |
| LOW | src/pyproject_toml.rs | 241 | /// [tool.maturin] | COMMENT |
| LOW | src/pyproject_toml.rs | 341 | /// | COMMENT |
| LOW | src/pyproject_toml.rs | 361 | /// Include files matching the given glob pattern(s). | COMMENT |
| LOW | src/pyproject_toml.rs | 381 | pub strip: bool, | COMMENT |
| LOW | src/pyproject_toml.rs | 401 | /// List of features to activate. | COMMENT |
| LOW | src/pyproject_toml.rs | 421 | /// Use base Python executable instead of venv Python executable in PEP 517 build. | COMMENT |
| LOW | src/pyproject_toml.rs | 441 | pub generate_ci: Option<GenerateCIConfig>, | COMMENT |
| LOW | src/pyproject_toml.rs | 481 | /// Android platform configuration | COMMENT |
| LOW | src/pyproject_toml.rs | 501 | /// Rustup components to install | COMMENT |
| LOW | src/pyproject_toml.rs | 521 | } | COMMENT |
| LOW | src/pyproject_toml.rs | 541 | /// Project metadata | 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 | /// Can also be enabled via the MATURIN_PGO environment variable. | COMMENT |
| LOW | src/main.rs | 101 | /// | COMMENT |
| LOW | src/main.rs | 121 | /// Build only a source distribution (sdist) without compiling. | COMMENT |
| LOW | src/main.rs | 141 | path: Option<String>, | COMMENT |
| LOW | src/main.rs | 161 | #[cfg(feature = "upload")] | COMMENT |
| LOW | src/main.rs | 181 | cargo: CargoOptions, | COMMENT |
| LOW | src/compile.rs | 61 | /// Library search paths for this architecture | COMMENT |
| LOW | src/compile.rs | 81 | #[derive(Debug, Clone)] | COMMENT |
| 62 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | Cargo.toml | 113 | # project scaffolding, maturin new/init/generate-ci | COMMENT |
| MEDIUM | Cargo.toml | 214 | # 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 | 64 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM | src/lib.rs | 84 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM | src/lib.rs | 94 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM | src/main.rs | 18 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM⚡ | src/main.rs | 137 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM⚡ | src/main.rs | 146 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM⚡ | src/main.rs | 154 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM⚡ | src/main.rs | 266 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM⚡ | src/main.rs | 268 | #[cfg(feature = "scaffolding")] | COMMENT |
| MEDIUM⚡ | src/main.rs | 270 | #[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 | 472 | self.context.project.project_layout.data.as_deref(), | CODE |
| CRITICAL⚡ | src/build_orchestrator.rs | 776 | if !self.context.project.metadata24.scripts.is_empty() { | CODE |
| CRITICAL⚡ | src/build_orchestrator.rs | 782 | if !self.context.project.metadata24.entry_points.is_empty() { | CODE |
| CRITICAL⚡ | src/build_orchestrator.rs | 786 | 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__ = ["Line", "ffi", "lib"] | 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 | 93 | 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: Mapping[str, Any] | None = None) -> list[str]: | CODE |
| LOW | maturin/__init__.py | 189 | def get_requires_for_build_sdist(config_settings: Mapping[str, Any] | None = None) -> list[str]: | CODE |
| LOW | maturin/__init__.py | 197 | def prepare_metadata_for_build_wheel(metadata_directory: str, config_settings: Mapping[str, Any] | None = None) -> str: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/common/other.rs | 877 | // Step 1: Build the sdist | COMMENT |
| LOW | tests/common/other.rs | 901 | // Step 2: Unpack sdist and build wheels from it | COMMENT |
| LOW | src/python_interpreter/resolver.rs | 254 | // Step 1: PYO3_CONFIG_FILE is an explicit override that trumps everything | COMMENT |
| LOW | src/python_interpreter/resolver.rs | 269 | // Step 2: Discover candidates (unified for native/cross) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/common/other.rs | 877 | // Step 1: Build the sdist | COMMENT |
| LOW | tests/common/other.rs | 901 | // Step 2: Unpack sdist and build wheels from it | COMMENT |
| LOW | src/python_interpreter/resolver.rs | 254 | // Step 1: PYO3_CONFIG_FILE is an explicit override that trumps everything | COMMENT |
| LOW | src/python_interpreter/resolver.rs | 269 | // Step 2: Discover candidates (unified for native/cross) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | maturin/__init__.py | 209 | except (FileNotFoundError, SubprocessError): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | test-crates/cffi-mixed/test_cffi_mixed.py | 24 | assert line.length() == 5 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | .github/workflows/test.yml | 94 | # minutes; the test harness falls back to micromamba when conda is absent. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test-crates/pyo3-pure/tests/test_pyo3_pure.py | 15 | def test_function(): | CODE |
| LOW | test-crates/pyo3-abi3t/tests/test_pyo3_abi3t.py | 15 | 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 | 581 | # Check if all needs were successful or skipped. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | noxfile.py | 39 | CODE |