Produce redistributable builds of Python
This report summarizes scanner evidence for astral-sh/python-build-standalone, a Python project with 4,494 GitHub stars. SynthScan examined 31,330 lines of code across 118 source files, recording 146 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 7.1 (Moderate 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.
Can maintainers explain intent, assumptions, and trade-offs? 127 finding(s).
Are imports declared and package/API names verified? 7 finding(s).
Are wrappers, guards, and repeated structures necessary? 54 finding(s).
Which changes need focused human review? 146 finding(s).
Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.
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 146 distinct pattern matches across 10 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 |
|---|---|---|---|---|
| MEDIUM | stdlib-test-annotations.yml | 24 | # harness-skips declares builds to skip running the Python stdlib test harness. | COMMENT |
| MEDIUM | stdlib-test-annotations.yml | 26 | # Ideally this feature doesn't need to exist. But sometimes the test harness is | COMMENT |
| MEDIUM | stdlib-test-annotations.yml | 422 | # our test harness from getting confused. | COMMENT |
| MEDIUM | stdlib-test-annotations.yml | 2155 | # Static builds pass. Debug builds already skip the harness on 3.14+. | COMMENT |
| MEDIUM | cpython-unix/build.py | 573 | # helper function found in libatomic. To facilitate this, GCC <15 adds | COMMENT |
| MEDIUM | cpython-unix/build-cpython.sh | 296 | # On 3.12 (minimum BOLT version), the segfault causes the test harness to | COMMENT |
| LOW | cpython-unix/build-cpython.sh | 1006 | # simply use our pip to install self. Kinda crazy, but it works! | COMMENT |
| MEDIUM | cpython-unix/build-cpython.sh | 1479 | # Copy the test harness runner for convenience. | COMMENT |
| MEDIUM | cpython-unix/build-cpython.sh | 1480 | # As of Python 3.13, the test harness runner has been removed so we provide a compatibility script | COMMENT |
| MEDIUM | pythonbuild/testdist.py | 194 | # Honor an explicit harness destination; relative paths are interpreted | COMMENT |
| MEDIUM | pythonbuild/testdist.py | 231 | # 3.14 added a test harness feature to prioritize running tests. Prioritize | COMMENT |
| MEDIUM | pythonbuild/testdist.py | 232 | # running slow tests first to mitigate long poles slowing down harness execution. | COMMENT |
| MEDIUM | pythonbuild/testdist.py | 453 | # sequences undermines those efforts. So prevent the test harness from | COMMENT |
| MEDIUM | pythonbuild/testdist.py | 472 | # Since we're running 1 test at a time, the test harness should always | COMMENT |
| MEDIUM | cpython-windows/build.py | 1643 | # test harness to pick up the wrong `test` module. We unset these | COMMENT |
| MEDIUM | cpython-windows/build.py | 1656 | # test harness normally (all tests) or with -j to perform parallel | COMMENT |
| MEDIUM | cpython-windows/build.py | 1657 | # test execution. We work around this by invoking the test harness | COMMENT |
| MEDIUM | cpython-windows/build.py | 1682 | # test harness itself and isn't exercising useful code. Skip it. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ci-matrix.py | 40 | def meets_conditional_version(version: str, min_version: str) -> bool: | CODE |
| LOW | ci-matrix.py | 236 | def generate_docker_matrix_entries( | CODE |
| LOW | ci-matrix.py | 269 | def generate_crate_build_matrix_entries( | CODE |
| LOW | ci-matrix.py | 320 | def generate_python_build_matrix_entries( | CODE |
| LOW | ci-matrix.py | 372 | def create_python_build_entry( | CODE |
| LOW | ci-matrix.py | 398 | def add_python_build_entries_for_config( | CODE |
| LOW | ci-matrix.py | 463 | def validate_pull_request_defaults( | CODE |
| LOW⚡ | tests/test_mirror.py | 25 | def test_destination_to_source_name_full_archive(self) -> None: | CODE |
| LOW⚡ | tests/test_mirror.py | 35 | def test_destination_to_source_name_install_only_archive(self) -> None: | CODE |
| LOW⚡ | tests/test_mirror.py | 45 | def test_destination_to_source_name_rejects_wrong_tag(self) -> None: | CODE |
| LOW⚡ | tests/test_mirror.py | 53 | def test_build_upload_entries(self) -> None: | CODE |
| LOW | tests/test_mirror.py | 86 | def test_build_upload_entries_reports_missing(self) -> None: | CODE |
| LOW | tests/test_mirror.py | 108 | def test_main_reports_all_upload_errors(self) -> None: | CODE |
| LOW | scripts/update_downloads.py | 531 | def print_mirror_instructions( | CODE |
| LOW | scripts/update_downloads.py | 584 | def update_openssl_disttest_version( | CODE |
| LOW | pythonbuild/mirror.py | 111 | def destination_to_source_name(dest_name: str, tag: str, build_datetime: str) -> str: | CODE |
| LOW | pythonbuild/testdist.py | 315 | def _run_stdlib_expected_failures( | CODE |
| LOW | pythonbuild/testdist.py | 396 | def _check_stdlib_expected_failure( | CODE |
| LOW | pythonbuild/docker.py | 35 | def docker_platform_from_host_platform(host_platform: str) -> typing.Optional[str]: | CODE |
| LOW | pythonbuild/cpython.py | 294 | def meets_python_minimum_version(got: str, wanted: str | dict[str, Any]) -> bool: | CODE |
| LOW | pythonbuild/cpython.py | 309 | def meets_python_maximum_version(got: str, wanted: str | dict[str, Any]) -> bool: | CODE |
| LOW | pythonbuild/cpython.py | 457 | def _parse_makefile_variables(makefile: bytes) -> dict[str, bytes]: | CODE |
| LOW | pythonbuild/cpython.py | 478 | def _expand_makefile_variables(value: bytes, variables: dict[str, bytes]) -> bytes: | CODE |
| LOW | pythonbuild/cpython.py | 517 | def _internal_archive_objects(makefile: bytes) -> dict[str, set[pathlib.Path]]: | CODE |
| LOW | pythonbuild/cpython.py | 572 | def configured_extension_modules( | CODE |
| LOW | pythonbuild/cpython.py | 671 | def _parse_cpython_module_info( | CODE |
| LOW | pythonbuild/cpython.py | 722 | def _classify_extension_modules( | CODE |
| LOW | pythonbuild/cpython.py | 784 | def _validate_extension_modules( | CODE |
| LOW | pythonbuild/cpython.py | 825 | def _matches_extension_condition( | CODE |
| LOW | pythonbuild/cpython.py | 940 | def _determine_module_linkage(info: dict[str, Any], build_options: set[str]) -> str: | CODE |
| LOW | pythonbuild/utils.py | 405 | def create_tar_from_directory(fh, base_path: pathlib.Path, path_prefix=None): | CODE |
| LOW | pythonbuild/utils.py | 556 | def add_licenses_to_extension_entry(entry): | CODE |
| LOW | pythonbuild/buildenv.py | 41 | def install_toolchain_archive( | CODE |
| LOW | pythonbuild/buildenv.py | 174 | def install_toolchain_archive( | CODE |
| LOW | pythonbuild/disttests/__init__.py | 526 | def test_linux_uapi_not_in_sysconfig(self): | STRING |
| LOW | pythonbuild/disttests/__init__.py | 578 | def test_thread_timeouts_use_monotonic_clock(self): | STRING |
| LOW | src/github_api_tester.py | 297 | def upload_release_distributions(tmp_path_factory): | CODE |
| LOW | src/github_api_tester.py | 303 | async def upload_release_distributions(*args): | CODE |
| LOW | src/github_api_tester.py | 344 | async def test_dry_run_writes_shasums_without_contacting_github(tmp_path): | CODE |
| LOW | cpython-windows/build.py | 291 | def get_visual_studio_environment( | CODE |
| LOW | cpython-windows/build.py | 1109 | def collect_python_build_artifacts( | CODE |
| LOW | cpython-windows/build.py | 1233 | def find_additional_dependencies(project: pathlib.Path): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | pythonbuild/utils.py | 620 | except FileNotFoundError: | CODE |
| HIGH | pythonbuild/utils.py | 474 | except AttributeError: | CODE |
| HIGH | cpython-windows/build.py | 564 | except NoSearchStringError: | CODE |
| HIGH | cpython-windows/build.py | 596 | except NoSearchStringError: | CODE |
| HIGH | cpython-windows/build.py | 700 | except NoSearchStringError: | CODE |
| HIGH | cpython-windows/build.py | 711 | except NoSearchStringError: | CODE |
| HIGH | cpython-windows/build.py | 770 | except NoSearchStringError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | stdlib-test-annotations.yml | 1 | --- | COMMENT |
| LOW | stdlib-test-annotations.yml | 21 | # * no-build-option - A build option (e.g. `freethreaded`) that must not be | COMMENT |
| LOW | cpython-unix/build.py | 561 | bi["object_file_format"] = object_file_format | COMMENT |
| LOW | cpython-unix/build-cpython.sh | 201 | fi | COMMENT |
| LOW | cpython-unix/build-cpython.sh | 521 | # environment variables. Use our toolchain-specific skip list, add | COMMENT |
| LOW | cpython-unix/build-cpython.sh | 641 | export PROFILE_TASK='-m test --pgo' | COMMENT |
| LOW | cpython-unix/build-cpython.sh | 701 | # not, and conservatively defaults to no, which is not the right | COMMENT |
| LOW | cpython-unix/build-cpython.sh | 881 | fi | COMMENT |
| LOW | cpython-unix/build-cpython.sh | 901 | # extensions to load, we set an rpath to point at our lib | COMMENT |
| LOW | cpython-unix/build-cpython.sh | 921 | # accessors, you might get lucky and things will work, with the | COMMENT |
| LOW | cpython-unix/build-cpython.sh | 941 | # In the past, when we dynamically linked libpython, we avoided | COMMENT |
| LOW | cpython-unix/build-cpython.sh | 961 | COMMENT | |
| LOW | cpython-unix/build-cpython.sh | 1001 | # | COMMENT |
| LOW | cpython-unix/build-ncurses.sh | 61 | --enable-widec | COMMENT |
| LOW | cpython-unix/build-ncurses.sh | 81 | # | COMMENT |
| LOW | cpython-unix/build-libedit.sh | 81 | esac | COMMENT |
| LOW | cpython-unix/targets.yml | 1 | # This file defines configurations for each supported build target/triple. | COMMENT |
| LOW | cpython-unix/targets.yml | 21 | # | COMMENT |
| LOW | cpython-unix/targets.yml | 41 | # Values will be added to CPPFLAGS and CFLAGS. | COMMENT |
| LOW | pythonbuild/downloads.py | 1 | # This Source Code Form is subject to the terms of the Mozilla Public | COMMENT |
| LOW | src/release.rs | 381 | COMMENT | |
| LOW | src/validation.rs | 1241 | } | COMMENT |
| LOW | src/github.rs | 101 | if dry_run { | COMMENT |
| LOW | src/github_api_tester.py | 1 | #!/usr/bin/env -S uv run | COMMENT |
| LOW | src/github_api_tester.py | 41 | app = QuartTrio(__name__) | COMMENT |
| LOW | cpython-windows/build.py | 1141 | COMMENT | |
| LOW | cpython-windows/xz-support/config.h | 1 | /* Configuration extracted from CMake'd project files. | COMMENT |
| LOW | cpython-windows/xz-support/config.h | 21 | COMMENT | |
| LOW | cpython-windows/xz-support/config.h | 41 | #define HAVE_IMMINTRIN_H 1 | COMMENT |
| LOW | cpython-windows/xz-support/config.h | 61 | #define MYTHREAD_VISTA 1 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ci-matrix.py | 100 | CODE | |
| LOW | ci-matrix.py | 269 | CODE | |
| LOW | ci-matrix.py | 372 | CODE | |
| LOW | scripts/update_downloads.py | 689 | CODE | |
| LOW | cpython-unix/build.py | 77 | CODE | |
| LOW | cpython-unix/build.py | 501 | CODE | |
| LOW | cpython-unix/build.py | 743 | CODE | |
| LOW | cpython-unix/build.py | 1043 | CODE | |
| LOW | cpython-unix/build-main.py | 31 | CODE | |
| LOW | pythonbuild/mirror.py | 201 | CODE | |
| LOW | pythonbuild/testdist.py | 113 | CODE | |
| LOW | pythonbuild/testdist.py | 315 | CODE | |
| LOW | pythonbuild/testdist.py | 396 | CODE | |
| LOW | pythonbuild/cpython.py | 223 | CODE | |
| LOW | pythonbuild/cpython.py | 406 | CODE | |
| LOW | pythonbuild/cpython.py | 572 | CODE | |
| LOW | pythonbuild/utils.py | 33 | CODE | |
| LOW | pythonbuild/utils.py | 71 | CODE | |
| LOW | pythonbuild/utils.py | 109 | CODE | |
| LOW | pythonbuild/utils.py | 325 | CODE | |
| LOW | pythonbuild/utils.py | 405 | CODE | |
| LOW | pythonbuild/utils.py | 598 | CODE | |
| LOW | pythonbuild/utils.py | 650 | CODE | |
| LOW | pythonbuild/disttests/__init__.py | 578 | CODE | |
| LOW | cpython-windows/build.py | 420 | CODE | |
| LOW | cpython-windows/build.py | 928 | CODE | |
| LOW | cpython-windows/build.py | 1005 | CODE | |
| LOW | cpython-windows/build.py | 1109 | CODE | |
| LOW | cpython-windows/build.py | 1438 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | stdlib-test-annotations.yml | 2 | # This file defines metadata about Python standard library tests. | COMMENT |
| MEDIUM | .github/workflows/release.yml | 71 | # Create a GitHub draft release for the target commit. | COMMENT |
| MEDIUM | cpython-unix/build-cpython.sh | 640 | # Define the base PGO profiling task, which we'll extend below with ignores | COMMENT |
| MEDIUM | cpython-unix/extension-modules.yml | 1 | # This file defines metadata for Python extension modules. | COMMENT |
| MEDIUM | cpython-unix/targets.yml | 1 | # This file defines configurations for each supported build target/triple. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | check.py | 6 | CODE | |
| LOW | generate-version-metadata.py | 6 | CODE | |
| LOW | tests/test_mirror_integration.py | 5 | CODE | |
| LOW | tests/test_mirror.py | 5 | CODE | |
| LOW | scripts/stdlib_test_matrix.py | 23 | CODE | |
| LOW | scripts/update_downloads.py | 23 | CODE | |
| LOW | pythonbuild/mirror.py | 13 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | scripts/stdlib_test_matrix.py | 189 | print(f"Error generating stdlib test matrix: {error}", file=sys.stderr) | CODE |
| LOW | scripts/update_downloads.py | 464 | except Exception as exc: | CODE |
| LOW | scripts/update_downloads.py | 519 | except Exception: | CODE |
| LOW | cpython-unix/build.py | 1116 | except Exception as e: | CODE |
| LOW | pythonbuild/mirror.py | 197 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ci-matrix.py | 641 | # Check if we have any Linux python builds. | COMMENT |
| LOW | cpython-windows/build.py | 874 | # Set DESTDIR to affect install location. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pythonbuild/downloads.py | 15 | # unsure if the PR will land, but we should make sure to switch back to the | COMMENT |