AI Slop Code RIsk Monitor

pybind/pybind11

Seamless operability between C++11 and Python

8.8 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for pybind/pybind11, a C++ project with 18,024 GitHub stars. SynthScan examined 79,503 lines of code across 333 source files, recording 642 pattern matches distributed across 12 syntactic categories. The legacy adjusted pattern signal is 8.8 (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.

8.8
Adjusted Signal
8.8
Raw Pattern Score
100%
Time Factor
2026-10-09
Last Push
18.0K
Stars
C++
Language
79.5K
Lines of Code
333
Files
642
Pattern Hits
2026-10-12
Scan Date
0.02
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 29.0/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 510 finding(s).

Hallucinated Dependency & Supply Chain Risk 8.7/100 · LOW

Are imports declared and package/API names verified? 125 finding(s).

Agent Over-Engineering Ratio 22.1/100 · LOW

Are wrappers, guards, and repeated structures necessary? 372 finding(s).

PR Review Velocity Impact 35.0/100 · MEDIUM

Which changes need focused human review? 642 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 6MEDIUM 7LOW 629

Directory Score Breakdown

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.

Pattern Findings

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

Hyper-Verbose Identifiers365 hits · 383 pts
SeverityFileLineSnippetContext
LOWtests/test_stl_binders.py90def test_vector_delitem_slice(s):CODE
LOWtests/test_stl_binders.py99def test_vector_delitem_slice_step_zero():CODE
LOWtests/test_stl_binders.py234def test_map_string_double_const():CODE
LOWtests/test_stl_binders.py247def test_noncopyable_containers():CODE
LOWtests/test_methods_and_attributes.py29def test_methods_and_attributes():CODE
LOWtests/test_methods_and_attributes.py274def test_property_return_value_policies(access):CODE
LOWtests/test_methods_and_attributes.py294def test_property_rvalue_policy():CODE
LOWtests/test_methods_and_attributes.py388def test_dynamic_attr_dealloc_frees_dict_contents():CODE
LOWtests/test_methods_and_attributes.py519def test_unregistered_base_implementations():STRING
LOWtests/test_methods_and_attributes.py565def test_rvalue_ref_qualified_methods():STRING
LOW⚡tests/test_methods_and_attributes.py589def test_noexcept_rvalue_ref_qualified_methods():STRING
LOW⚡tests/test_methods_and_attributes.py603def test_noexcept_overload_cast():STRING
LOWtests/test_methods_and_attributes.py621def test_ref_qualified_overload_cast():STRING
LOW⚡tests/test_methods_and_attributes.py645def test_noexcept_ref_qualified_overload_cast():STRING
LOWtests/test_sequences_and_iterators.py19def test_slice_constructors_explicit_optional():CODE
LOWtests/test_sequences_and_iterators.py24def test_generalized_iterators():CODE
LOWtests/test_sequences_and_iterators.py56def test_generalized_iterators_simple():CODE
LOWtests/test_sequences_and_iterators.py66def test_iterator_doc_annotations():CODE
LOWtests/test_sequences_and_iterators.py83def test_iterator_referencing():CODE
LOWtests/test_sequences_and_iterators.py235def test_python_iterator_in_cpp():CODE
LOWtests/test_sequences_and_iterators.py267def test_iterator_passthrough():CODE
LOWtests/test_sequences_and_iterators.py288def test_generated_dunder_methods_pos_only():CODE
LOWtests/test_numpy_vectorize.py159def test_trivial_broadcasting():STRING
LOWtests/test_numpy_vectorize.py210def test_passthrough_arguments(doc):STRING
LOWtests/test_numpy_vectorize.py243def test_method_vectorization():STRING
LOWtests/test_numpy_vectorize.py250def test_ref_qualified_method_vectorization():STRING
LOWtests/test_numpy_vectorize.py270def test_noexcept_ref_qualified_method_vectorization():STRING
LOWtests/test_numpy_vectorize.py284def test_noexcept_method_vectorization():STRING
LOWtests/test_class_release_gil_before_calling_cpp_dtor.py17def test_gil_state_check_results(probe_type, unique_key, expected_result):CODE
LOWtests/test_chrono.py32def test_chrono_system_clock_roundtrip():CODE
LOWtests/test_chrono.py46def test_chrono_system_clock_roundtrip_date():CODE
LOWtests/test_chrono.py102def test_chrono_system_clock_roundtrip_time(time1, tz, monkeypatch):CODE
LOWtests/test_chrono.py125def test_chrono_duration_roundtrip():CODE
LOWtests/test_chrono.py145def test_chrono_duration_subtraction_equivalence():CODE
LOWtests/test_chrono.py155def test_chrono_duration_subtraction_equivalence_date():CODE
LOWtests/test_chrono.py170def test_chrono_steady_clock_roundtrip():CODE
LOWtests/test_chrono.py180def test_floating_point_duration():CODE
LOWtests/test_chrono.py200def test_chrono_different_resolutions():CODE
LOWtests/conftest.py34def use_multiprocessing_forkserver_on_linux():CODE
LOWtests/conftest.py205def pytest_assertrepr_compare(op, left, right): # noqa: ARG001CODE
LOWtests/conftest.py228def delattr_and_ensure_destroyed(*specs):CODE
LOWtests/test_callbacks.py38def test_bound_method_callback():CODE
LOWtests/test_callbacks.py51def test_keyword_args_and_generalized_unpacking():CODE
LOW⚡tests/test_callbacks.py94def test_lambda_closure_cleanup():CODE
LOW⚡tests/test_callbacks.py103def test_cpp_callable_cleanup():CODE
LOW⚡tests/test_callbacks.py108def test_cpp_function_roundtrip():CODE
LOWtests/test_callbacks.py191def test_async_async_callbacks():CODE
LOWtests/test_callbacks.py239def test_boost_histogram_apply_custom_transform():CODE
LOWtests/test_warnings.py30def test_warning_wrong_subclass_fail():CODE
LOWtests/test_warnings.py41def test_warning_double_register_fail():CODE
LOW⚡tests/test_pytypes.py576def test_print_missing_from_current_builtins_is_silent(monkeypatch):CODE
LOW⚡tests/test_pytypes.py585def test_print_stdout_none_matches_current_builtin(monkeypatch):CODE
LOW⚡tests/test_pytypes.py705def test_memoryview_from_buffer_empty_shape():CODE
LOW⚡tests/test_pytypes.py712def test_test_memoryview_from_buffer_invalid_strides():CODE
LOW⚡tests/test_pytypes.py717def test_test_memoryview_from_buffer_nullptr():CODE
LOW⚡tests/test_pytypes.py722def test_memoryview_from_memory():CODE
LOW⚡tests/test_pytypes.py968def test_tuple_nonempty_annotations(doc):CODE
LOW⚡tests/test_pytypes.py975def test_tuple_empty_annotations(doc):CODE
LOW⚡tests/test_pytypes.py981def test_tuple_variable_length_annotations(doc):CODE
LOW⚡tests/test_pytypes.py1052def test_union_object_annotations(doc):CODE
305 more matches not shown…
Over-Commented Block128 hits · 126 pts
SeverityFileLineSnippetContext
LOW.pre-commit-config.yaml1# To use:COMMENT
LOW.cmake-format.yaml21 # arguments, then force it to a vertical layout.COMMENT
LOWtools/check-style.sh1#!/bin/bashCOMMENT
LOWinclude/pybind11/numpy.h21#include <cstdlib>COMMENT
LOWinclude/pybind11/numpy.h461// complex typesCOMMENT
LOWinclude/pybind11/numpy.h921 /// For example, ``float`` is 'f', ``double`` 'd', ``int`` 'i', and ``long`` 'l'.COMMENT
LOWinclude/pybind11/numpy.h1821# define PYBIND11_FIELD_DESCRIPTOR_EX(T, Field, Name) \COMMENT
LOWinclude/pybind11/numpy.h1841# define PYBIND11_MAP_NEXT1(test, next) PYBIND11_MAP_NEXT0(test, next, 0)COMMENT
LOWinclude/pybind11/numpy.h1861# define PYBIND11_NUMPY_DTYPE(Type, ...) \COMMENT
LOWinclude/pybind11/numpy.h2181COMMENT
LOWinclude/pybind11/pybind11.h21#include "gil.h"COMMENT
LOWinclude/pybind11/pybind11.h1001PYBIND11_NAMESPACE_BEGIN(detail)COMMENT
LOWinclude/pybind11/iostream.h21COMMENT
LOWinclude/pybind11/subinterpreter.h21COMMENT
LOWinclude/pybind11/subinterpreter.h261/// The PyThreadState is created on construction in a *released* state: it is NOT made current,COMMENT
LOWinclude/pybind11/subinterpreter.h281/// // ... use the subinterpreter ...COMMENT
LOWinclude/pybind11/native_enum.h1// Copyright (c) 2022-2025 The pybind Community.COMMENT
LOWinclude/pybind11/stl.h21#include <memory>COMMENT
LOWinclude/pybind11/common.h1#include "detail/common.h"COMMENT
LOWinclude/pybind11/cast.h21COMMENT
LOWinclude/pybind11/cast.h1141/// For class_-wrapped types using std::shared_ptr as the holder, the following expressionsCOMMENT
LOWinclude/pybind11/trampoline_self_life_support.h1// Copyright (c) 2021 The Pybind Development Team.COMMENT
LOWinclude/pybind11/gil_safe_call_once.h1// Copyright (c) 2023 The pybind Community.COMMENT
LOWinclude/pybind11/gil_safe_call_once.h21PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)COMMENT
LOWinclude/pybind11/gil_safe_call_once.h41//COMMENT
LOWinclude/pybind11/gil_safe_call_once.h61// normal Python code. However, this will be unnoticeable for quick call-onceCOMMENT
LOWinclude/pybind11/gil_safe_call_once.h261 return detail::atomic_get_or_create_in_state_dict<storage_type>(get_storage_key().c_str())COMMENT
LOWinclude/pybind11/pytypes.h561/// python).COMMENT
LOWinclude/pybind11/conduit/pybind11_platform_abi_id.h1#pragma onceCOMMENT
LOWinclude/pybind11/conduit/pybind11_platform_abi_id.h21# define PYBIND11_COMPILER_TYPE "mingw"COMMENT
LOWinclude/pybind11/conduit/pybind11_platform_abi_id.h41# if defined(_MT) && defined(_DLL) // Corresponding to CL command line options /MD or /MDd.COMMENT
LOWinclude/pybind11/conduit/pybind11_platform_abi_id.h61// // Assume that NVHPC is in the 1xxx ABI family.COMMENT
LOWinclude/pybind11/conduit/pybind11_platform_abi_id.h81# define PYBIND11_BUILD_TYPE "_debug"COMMENT
LOWinclude/pybind11/conduit/wrap_include_python_h.h1#pragma onceCOMMENT
LOWinclude/pybind11/conduit/wrap_include_python_h.h21// See https://github.com/pybind/pybind11/pull/3497 for full context.COMMENT
LOWinclude/pybind11/conduit/wrap_include_python_h.h41// C4505: 'PySlice_GetIndicesEx': unreferenced local function has been removedCOMMENT
LOWinclude/pybind11/conduit/wrap_include_python_h.h61# undef isalnumCOMMENT
LOWinclude/pybind11/stl/filesystem.h1// Copyright (c) 2021 The Pybind Development Team.COMMENT
LOWinclude/pybind11/detail/type_caster_base.h21#include "typeid.h"COMMENT
LOWinclude/pybind11/detail/type_caster_base.h41/// A life support system for temporary objects created by `type_caster::load()`.COMMENT
LOWinclude/pybind11/detail/type_caster_base.h221COMMENT
LOWinclude/pybind11/detail/type_caster_base.h301 cast_sources(const raw_source &orig) : original(orig) { result = resolve(); }COMMENT
LOWinclude/pybind11/detail/type_caster_base.h1161 : all_of<is_copy_assignable<T1>, is_copy_assignable<T2>> {};COMMENT
LOWinclude/pybind11/detail/function_ref.h1/*COMMENT
LOWinclude/pybind11/detail/function_ref.h21//===----------------------------------------------------------------------===//COMMENT
LOWinclude/pybind11/detail/function_record_pyobject.h1// Copyright (c) 2024-2025 The Pybind Development Team.COMMENT
LOWinclude/pybind11/detail/function_record_pyobject.h41 // unhelpful compiler warnings.COMMENT
LOWinclude/pybind11/detail/internals.h21#include <cstdint>COMMENT
LOWinclude/pybind11/detail/internals.h41#ifndef PYBIND11_INTERNALS_VERSIONCOMMENT
LOWinclude/pybind11/detail/internals.h61# endifCOMMENT
LOWinclude/pybind11/detail/internals.h121#elif defined(__GNUC__) && !defined(__INTEL_COMPILER)COMMENT
LOWinclude/pybind11/detail/internals.h141 thread_specific_storage() {COMMENT
LOWinclude/pybind11/detail/internals.h341#if PYBIND11_INTERNALS_VERSION >= 12COMMENT
LOWinclude/pybind11/detail/internals.h541// Get or create per-storage capsule in the current interpreter's state dict.COMMENT
LOWinclude/pybind11/detail/internals.h581 auto new_capsuleCOMMENT
LOWinclude/pybind11/detail/internals.h781 // main interpreter)COMMENT
LOWinclude/pybind11/detail/argument_vector.h21#include <cstring>COMMENT
LOWinclude/pybind11/detail/common.h21#define PYBIND11_VERSION_MINOR 2COMMENT
LOWinclude/pybind11/detail/common.h41 Py_PACK_FULL_VERSION(PYBIND11_VERSION_MAJOR, \COMMENT
LOWinclude/pybind11/detail/common.h61// MSVC sets _MSVC_LANG rather than __cplusplus (supposedly until the standard is fullyCOMMENT
68 more matches not shown…
Unused Imports121 hits · 120 pts
SeverityFileLineSnippetContext
LOWnoxfile.py7CODE
LOWtools/libsize.py1CODE
LOWtools/check_inl_headers.py12CODE
LOWtools/make_changelog.py7CODE
LOWtools/make_global.py6CODE
LOWtools/codespell_ignore_lines_from_errors.py12CODE
LOWpybind11/setup_helpers.py39CODE
LOWpybind11/_version.py5CODE
LOWpybind11/__init__.py1CODE
LOWpybind11/__init__.py10CODE
LOWpybind11/__init__.py11CODE
LOWpybind11/__init__.py11CODE
LOWpybind11/__init__.py11CODE
LOWpybind11/__init__.py11CODE
LOWpybind11/commands.py1CODE
LOWpybind11/__main__.py2CODE
LOWtests/test_stl_binders.py1CODE
LOWtests/test_methods_and_attributes.py1CODE
LOWtests/test_sequences_and_iterators.py1CODE
LOWtests/test_vector_unique_ptr_member.py1CODE
LOWtests/test_numpy_vectorize.py1CODE
LOWtests/test_class_release_gil_before_calling_cpp_dtor.py1CODE
LOWtests/test_chrono.py1CODE
LOWtests/test_chrono.py7CODE
LOWtests/conftest.py7CODE
LOWtests/test_python_multiple_inheritance.py3CODE
LOWtests/test_callbacks.py1CODE
LOWtests/test_callbacks.py9CODE
LOWtests/test_warnings.py1CODE
LOWtests/test_warnings.py7CODE
LOWtests/test_pytypes.py1CODE
LOWtests/test_class.py1CODE
LOWtests/env.py1CODE
LOWtests/test_class_sh_trampoline_self_life_support.py1CODE
LOWtests/test_class_sh_property_non_owning.py1CODE
LOWtests/test_docs_advanced_cast_custom.py1CODE
LOWtests/test_eigen_tensor.py1CODE
LOWtests/test_eigen_tensor.py7CODE
LOWtests/test_class_sh_trampoline_shared_from_this.py1CODE
LOWtests/test_docstring_options.py1CODE
LOWtests/test_cpp_conduit.py3CODE
LOWtests/test_class_sh_disowning_mi.py1CODE
LOWtests/test_class_sh_disowning_mi.py5CODE
LOWtests/test_async.py1CODE
LOWtests/test_unnamed_namespace_a.py1CODE
LOWtests/test_class_sh_basic.py2CODE
LOWtests/test_class_sh_trampoline_basic.py1CODE
LOWtests/test_local_bindings.py1CODE
LOWtests/test_class_sh_factory_constructors.py1CODE
LOWtests/test_smart_ptr.py1CODE
LOWtests/test_smart_ptr.py5CODE
LOWtests/test_numpy_array.py1CODE
LOWtests/test_numpy_array.py7CODE
LOWtests/test_builtin_casters.py1CODE
LOWtests/test_constants_and_functions.py1CODE
LOWtests/test_exceptions.py1CODE
LOWtests/test_factory_constructors.py1CODE
LOWtests/test_factory_constructors.py7CODE
LOWtests/test_iostream.py1CODE
LOWtests/test_operator_overloading.py1CODE
61 more matches not shown…
Cross-Language Confusion4 hits · 24 pts
SeverityFileLineSnippetContext
HIGH⚡tests/test_methods_and_attributes.py594 - Return (Class::*)(Args...) const && noexcept (peek_noexcept)CODE
HIGHtests/test_methods_and_attributes.py632 - overload_cast_impl::operator()(Return (Class::*)(Args...) const && noexcept, true_type)CODE
HIGH⚡tests/test_methods_and_attributes.py652 - overload_cast_impl::operator()(Return (Class::*)(Args...) const && noexcept, true_type)CODE
HIGH⚡tests/test_methods_and_attributes.py658 assert obj.method_const_rref_noexcept(1.0) == "(double) const && noexcept"STRING
Self-Referential Comments3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_eval_call.py1# This file is called from 'test_eval.py'COMMENT
MEDIUMtests/test_custom_type_setup.py69 # Create a self-referential cycle that will be collected during shutdown.COMMENT
MEDIUMdocs/conf.py4# This file is execfile()d with the current directory set to itsCOMMENT
Excessive Try-Catch Wrapping6 hits · 8 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py27except Exception:CODE
MEDIUMtests/test_pytypes.py586def exception_type(func):CODE
LOW⚡tests/test_pytypes.py589 except Exception as exc:CODE
LOWtests/test_thread.py22 except Exception as e:CODE
MEDIUMtests/test_thread.py18def run(self):CODE
LOWtests/test_multiple_interpreters.py115 except Exception as e:CODE
Deep Nesting8 hits · 8 pts
SeverityFileLineSnippetContext
LOWtools/check_inl_headers.py88CODE
LOWtools/codespell_ignore_lines_from_errors.py17CODE
LOWpybind11/setup_helpers.py285CODE
LOWtests/test_numpy_array.py603CODE
LOWtests/test_factory_constructors.py481CODE
LOWtests/test_factory_constructors.py499CODE
LOWtests/test_numpy_dtypes.py398CODE
LOWtests/test_gil_scoped.py201CODE
AI Slop Vocabulary3 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMpybind11/commands.py30 # about nuanced counting here.COMMENT
MEDIUMtests/test_numpy_array.py663# HINT: An easy and robust way (although only manual unfortunately) to check forCOMMENT
LOWtests/test_modules.py138 # changes in future Python versions, simply add the new expected exception types here.COMMENT
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHinclude/pybind11/detail/class-inl.h599 // Fill in all the information, and then downgrade as requested by the caller, or raise anCOMMENT
Empty Error Handlers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHpybind11/setup_helpers.py143except ModuleNotFoundError:CODE
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtools/libsize.py7# Usage:COMMENT
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtests/test_numpy_array.py670# value increases without bounds. (Don't forget to Ctrl-C the test!)COMMENT