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

Fuzzer details

Fuzzer: fuzz_parse

Call tree

The calltree shows the control flow of the fuzzer. This is overlaid with coverage information to display how much of the potential code a fuzzer can reach is in fact covered at runtime. In the following there is a link to a detailed calltree visualisation as well as a bitmap showing a high-level view of the calltree. For further information about these topics please see the glossary for full calltree and calltree overview

Call tree overview bitmap:

The distribution of callsites in terms of coloring is
Color Runtime hitcount Callsite count Percentage
red 0 26 36.6%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 45 63.3%
All colors 71 100

Fuzz blockers

The following nodes represent call sites where fuzz blockers occur.

Amount of callsites blocked Calltree index Parent function Callsite Largest blocked function
11 45 astroid.builder.AstroidBuilder.string_build call site: 00045 astroid.builder.AstroidBuilder.add_from_names_to_locals
4 39 astroid.rebuilder.TreeRebuilder.visit call site: 00039 astroid.rebuilder.TreeRebuilder.visit
3 20 astroid._ast.ParserModule.parse call site: 00020 astroid._ast.get_parser_module
2 25 astroid.builder.AstroidBuilder._data_build call site: 00025 os.path.basename
2 60 astroid.builder.AstroidBuilder.delayed_assattr call site: 00060 .type
1 7 astroid.builder.AstroidBuilder.__init__ call site: 00007 astroid.manager.AstroidManager.__init__
1 29 astroid.rebuilder.TreeRebuilder.__init__ call site: 00029 astroid._ast.get_parser_module
1 36 astroid.rebuilder.TreeRebuilder.visit_module call site: 00036 astroid.rebuilder.TreeRebuilder.visit
1 68 astroid.builder.AstroidBuilder.delayed_assattr call site: 00068 values.insert

Runtime coverage analysis

Covered functions
803
Functions that are reachable but not covered
35
Reachable functions
57
Percentage of reachable functions covered
38.6%
NB: The sum of covered functions and functions that are reachable but not covered need not be equal to Reachable functions . This is because the reachability analysis is an approximation and thus at runtime some functions may be covered that are not included in the reachability analysis. This is a limitation of our static analysis capabilities.
Warning: The number of covered functions are larger than the number of reachable functions. This means that there are more functions covered at runtime than are extracted using static analysis. This is likely a result of the static analysis component failing to extract the right call graph or the coverage runtime being compiled with sanitizers in code that the static analysis has not analysed. This can happen if lto/gold is not used in all places that coverage instrumentation is used.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/ 1
...fuzz_parse 4
astroid.builder 37
astroid._ast 7
astroid.rebuilder 10

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
astroid.inference_tip._inference_tip_cached.inner astroid.inference_tip 3 ['N/A', 'N/A', 'N/A'] 8 0 6 3 4 584 0 1971 1805
astroid.nodes.node_ng.NodeNG.repr_tree._repr_node astroid.nodes.node_ng 5 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 7 0 20 8 6 345 0 1160 212
astroid.brain.brain_dataclasses.dataclass_transform astroid.brain.brain_dataclasses 1 ['N/A'] 3 0 1 5 5 109 0 365 155
astroid.nodes.scoped_nodes.scoped_nodes.FunctionDef.scope_lookup astroid.nodes.scoped_nodes.scoped_nodes 4 ['N/A', 'N/A', 'N/A', 'N/A'] 6 0 1 3 4 241 2 802 81
astroid.nodes.scoped_nodes.scoped_nodes.ClassDef._slots astroid.nodes.scoped_nodes.scoped_nodes 1 ['N/A'] 7 0 0 2 4 275 0 913 76
astroid.protocols.starred_assigned_stmts astroid.protocols 4 ['N/A', 'N/A', 'N/A', 'N/A'] 1 0 17 16 9 24 1 82 46
astroid.brain.brain_gi._import_gi_module astroid.brain.brain_gi 1 ['N/A'] 3 0 5 6 5 73 0 239 40

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

Functions statically reachable by fuzzers
27.0%
332 / 1216
Cyclomatic complexity statically reachable by fuzzers
32.0%
1311 / 4150

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

Runtime coverage analysis

This section shows analysis of runtime coverage data.

For futher technical details on how this section is generated, please see the Glossary .

Complex functions with low coverage

Func name Function total lines Lines covered at runtime percentage covered Reached by fuzzers
astroid.manager.AstroidManager.ast_from_module_name 43 3 6.976% []
astroid.nodes.node_ng.NodeNG.repr_tree._repr_node 41 0 0.0% []
astroid.helpers.object_len 32 0 0.0% []
astroid.bases.BoundMethod._infer_type_new_call 52 0 0.0% []
astroid.nodes.scoped_nodes.scoped_nodes._infer_decorator_callchain 34 9 26.47% []
astroid.nodes.scoped_nodes.scoped_nodes.FunctionDef.type 46 11 23.91% []
astroid.nodes.scoped_nodes.scoped_nodes.FunctionDef.infer_call_result 39 7 17.94% []
astroid.nodes.scoped_nodes.scoped_nodes.ClassDef._islots 34 2 5.882% []
astroid.nodes.node_classes.are_exclusive 33 15 45.45% []
astroid.nodes.node_classes.Arguments._get_arguments_data 44 0 0.0% []
astroid.objects.Super.igetattr 41 0 0.0% []
typing_extensions.ParamSpec 1153 471 40.84% []
astroid.protocols._arguments_infer_argname 42 0 0.0% []
astroid.protocols.starred_assigned_stmts._determine_starred_iteration_lookups 99 43 43.43% []
astroid.arguments.CallSite.infer_argument 61 0 0.0% []
astroid.interpreter._import.util.is_namespace 38 0 0.0% []
astroid.brain.brain_namedtuple_enum.infer_func_form 35 0 0.0% []
astroid.brain.brain_namedtuple_enum.infer_enum_class 48 0 0.0% []
astroid.brain.brain_namedtuple_enum._get_namedtuple_fields 31 0 0.0% []
astroid.brain.brain_builtin_inference.infer_dict_fromkeys._build_dict_with_elements 35 0 0.0% []
astroid.brain.brain_builtin_inference._infer_str_format_call 42 22 52.38% []
astroid.brain.brain_dataclasses._generate_dataclass_init 85 0 0.0% []
astroid.rebuilder.TreeRebuilder.visit_module 229 6 2.620% ['fuzz_parse']
astroid.brain.brain_gi._gi_build_stub 67 0 0.0% []
astroid.brain.brain_gi._import_gi_module 33 0 0.0% []

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
[] []
astroid.brain.brain_numpy_core_umath [] []
astroid.interpreter._import.util [] []
atheris [] []
enum [] []
astroid.nodes.node_classes [] []
astroid.brain.brain_boto3 [] []
astroid.brain.brain_random [] []
astroid.brain.brain_dataclasses [] []
astroid.nodes.as_string [] []
astroid.brain.brain_numpy_core_numeric [] []
astroid.exceptions [] []
astroid.brain.brain_pkg_resources [] []
astroid.brain.brain_nose [] []
astroid.brain.brain_six [] []
astroid.brain.brain_collections [] []
tokenize [] []
numpy [] []
astroid.objects [] []
astroid.brain.brain_crypt [] []
astroid.interpreter._import [] []
astroid.nodes.node_ng [] []
astroid.interpreter [] []
astroid.brain.brain_ctypes [] []
operator [] []
astroid.inference_tip [] []
astroid.mixins [] []
astroid.transforms [] []
astroid.brain.brain_mechanize [] []
astroid.nodes [] []
astroid.bases [] []
astroid.helpers [] []
astroid.brain.brain_regex [] []
astroid.node_classes [] []
re [] []
astroid.brain.brain_qt [] []
astroid.brain.brain_numpy_core_function_base [] []
functools [] []
astroid.brain.brain_scipy_signal [] []
astroid.arguments [] []
astroid.brain.brain_uuid [] []
astroid.brain.brain_dateutil [] []
astroid.raw_building [] []
astroid.brain.brain_multiprocessing [] []
astroid.context [] []
astroid.brain.brain_hashlib [] []
astroid.interpreter.dunder_lookup [] []
astroid.brain.brain_http [] []
[] []
astroid.util [] []
logging [] []
astroid.brain.brain_pytest [] []
astroid.nodes.scoped_nodes.utils [] []
astroid.astroid_manager [] []
sysconfig [] []
astroid.brain.brain_functools [] []
astroid.brain.brain_type [] []
astroid.brain.brain_gi [] []
astroid.const [] []
astroid [] []
astroid.modutils [] []
astroid.brain.brain_builtin_inference [] []
astroid.brain.brain_threading [] []
builtins [] []
collections [] []
astroid._backport_stdlib_names [] []
astroid.brain.brain_curses [] []
astroid.constraint [] []
astroid.brain.brain_attrs [] []
astroid.decorators [] []
gi [] []
pathlib [] []
astroid.nodes.scoped_nodes.scoped_nodes [] []
ast [] []
astroid.brain [] []
astroid.brain.brain_pathlib [] []
astroid.brain.brain_hypothesis [] []
astroid.typing [] []
inspect [] []
astroid.brain.brain_typing [] []
astroid.brain.helpers [] []
pytest [] []
astroid.brain.brain_ssl [] []
astroid.brain.brain_numpy_core_fromnumeric [] []
keyword [] []
textwrap [] []
astroid.brain.brain_signal [] []
importlib [] []
astroid.brain.brain_numpy_core_einsumfunc [] []
astroid.brain.brain_numpy_utils [] []
os [] []
astroid.brain.brain_re [] []
astroid.nodes._base_nodes [] []
astroid.rebuilder ['fuzz_parse'] []
itertools [] []
...fuzz_parse ['fuzz_parse'] []
astroid.brain.brain_sqlalchemy [] []
zipimport [] []
astroid.filter_statements [] []
astroid.brain.brain_numpy_core_numerictypes [] []
astroid.brain.brain_numpy_ndarray [] []
astroid.manager [] []
astroid.test_utils [] []
astroid.brain.brain_namedtuple_enum [] []
astroid.protocols [] []
astroid.brain.brain_numpy_random_mtrand [] []
typing_extensions [] []
astroid.brain.brain_numpy_ma [] []
astroid.scoped_nodes [] []
astroid.nodes.scoped_nodes.mixin [] []
astroid.brain.brain_responses [] []
astroid.brain.brain_argparse [] []
astroid.brain.brain_io [] []
typing [] []
astroid.brain.brain_subprocess [] []
astroid.inference [] []
astroid.brain.brain_numpy_core_multiarray [] []
random [] []
astroid.nodes.utils [] []
astroid.nodes.const [] []
astroid._ast ['fuzz_parse'] []
astroid.brain.brain_unittest [] []
io [] []
warnings [] []
astroid.builder ['fuzz_parse'] []
astroid.nodes.scoped_nodes [] []
sys [] []
astroid.interpreter._import.spec [] []
pprint [] []
astroid.__pkginfo__ [] []
contextlib [] []
astroid.interpreter.objectmodel [] []
astroid.brain.brain_fstrings [] []

Directories in report

Directory