Fuzz introspector
For issues and ideas: https://github.com/ossf/fuzz-introspector/issues

Analyses and suggestions

Optimal target analysis

Remaining optimal interesting functions

The following table shows a list of functions that are optimal targets. Optimal targets are identified by finding the functions that in combination, yield a high code coverage.

Func name Functions filename Arg count Args Function depth hitcount instr count bb count cyclomatic complexity Reachable functions Incoming references total cyclomatic complexity Unreached complexity
pybind11::cpp_function::dispatcher(_object*,_object*,_object*) /src/pybind11/include/pybind11/pybind11.h 3 ['N/A', 'N/A', 'N/A'] 27 0 2601 492 466 627 0 2483 1655
pybind11::detail::function_record_PyTypeObject_methods::reduce_ex_impl(_object*,_object*,_object*) /src/pybind11/include/pybind11/detail/function_record_pyobject.h 3 ['N/A', 'N/A', 'N/A'] 21 0 316 57 47 249 0 773 208
pybind11::detail::translate_exception(std::exception_ptr) /src/pybind11/include/pybind11/detail/internals.h 1 ['N/A'] 31 0 530 86 63 186 11 637 171
pybind11_object_dealloc /src/pybind11/include/pybind11/detail/class.h 1 ['N/A'] 24 0 46 6 3 496 0 1746 88
pybind11::error_already_set::m_fetched_error_deleter(pybind11::detail::error_fetch_and_normalize*) /src/pybind11/include/pybind11/pybind11.h 1 ['N/A'] 22 0 52 9 10 284 0 826 50
pybind11::cpp_function::initialize (pybind11::detail::all_type_info_get_cache(_typeobject*)::{lambda(pybind11::handle)#1}&&,void(*)(pybind11::handle))::{lambda(pybind11::detail::function_call&)#1}::__invoke(pybind11::detail::function_call) /src/pybind11/include/pybind11/pybind11.h 1 ['N/A'] 25 0 24 3 2 296 0 819 41

Implementing fuzzers that target the above functions will improve reachability such that it becomes:

Functions statically reachable by fuzzers
90.0%
373 / 414
Cyclomatic complexity statically reachable by fuzzers
95.0%
3034 / 3177

All functions overview

If you implement fuzzers for these functions, the status of all functions in the project will be:

Func name Functions filename Args Function call depth Reached by Fuzzers Fuzzers runtime hit Func lines hit % I Count BB Count Cyclomatic complexity Functions reached Reached by functions Accumulated cyclomatic complexity Undiscovered complexity

Files and Directories in report

This section shows which files and directories are considered in this report. The main reason for showing this is fuzz introspector may include more code in the reasoning than is desired. This section helps identify if too many files/directories are included, e.g. third party code, which may be irrelevant for the threat model. In the event too much is included, fuzz introspector supports a configuration file that can exclude data from the report. See the following link for more information on how to create a config file: link

Files in report

Source file Reached by Covered by
[] []
/src/pybind11/include/pybind11/detail/native_enum_data.h [] []
/usr/local/bin/../include/c++/v1/string [] []
/src/pybind11/include/pybind11/pybind11.h ['pybind_fuzzer'] []
/usr/local/bin/../include/c++/v1/__exception/exception.h ['pybind_fuzzer'] []
/src/pybind11/include/pybind11/detail/function_record_pyobject.h [] []
/src/pybind11/include/pybind11/detail/typeid.h ['pybind_fuzzer'] []
/usr/local/include/python3.10/object.h ['pybind_fuzzer'] []
/src/pybind11/include/pybind11/gil.h [] []
/src/pybind11/include/pybind11/detail/exception_translation.h [] []
/src/pybind_fuzzer.cc ['pybind_fuzzer'] []
/src/pybind11/include/pybind11/detail/common.h ['pybind_fuzzer'] []
/src/pybind11/include/pybind11/detail/../pytypes.h ['pybind_fuzzer'] []
/src/pybind11/include/pybind11/attr.h [] []
/src/pybind11/include/pybind11/detail/value_and_holder.h [] []
/src/pybind11/include/pybind11/cast.h ['pybind_fuzzer'] []
/src/pybind11/include/pybind11/options.h [] []
/src/pybind11/include/pybind11/embed.h ['pybind_fuzzer'] []
/src/pybind11/include/pybind11/detail/type_caster_base.h [] []
/usr/local/bin/../include/c++/v1/stdexcept [] []
/src/pybind11/include/pybind11/detail/internals.h ['pybind_fuzzer'] []
/usr/local/bin/../include/c++/v1/__exception/exception_ptr.h [] []
/src/pybind11/include/pybind11/detail/class.h [] []
/src/pybind11/include/pybind11/eval.h ['pybind_fuzzer'] []
/src/pybind11/include/pybind11/gil_simple.h ['pybind_fuzzer'] []

Directories in report

Directory
/usr/local/bin/../include/c++/v1/__exception/
/src/pybind11/include/pybind11/
/src/pybind11/include/pybind11/detail/../
/usr/local/include/python3.10/
/usr/local/bin/../include/c++/v1/
/src/pybind11/include/pybind11/detail/
/src/