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

Fuzzer details

Fuzzer: parso_extended_fuzz

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 7 18.4%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 31 81.5%
All colors 38 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
2 4 ...parso_extended_fuzz.fuzz_dump call site: 00004 parso.grammar.load_grammar
2 31 ...parso_extended_fuzz.fuzz_errors call site: 00031 ...parso_extended_fuzz.fuzz_errors
1 23 parso.grammar.load_grammar call site: 00023 grammar.parse
1 25 ...parso_extended_fuzz.fuzz_dump call site: 00025 ...parso_extended_fuzz.fuzz_errors
1 36 ...parso_extended_fuzz.TestOneInput call site: 00036 ...parso_extended_fuzz.fuzz_errors

Runtime coverage analysis

Covered functions
302
Functions that are reachable but not covered
21
Reachable functions
26
Percentage of reachable functions covered
19.23%
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
...parso_extended_fuzz 9
parso 3
parso.grammar 8
parso.utils 6

Fuzzer: parso_diff_fuzz

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 106 56.3%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 82 43.6%
All colors 188 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
38 88 parso.python.diff.DiffParser._parse call site: 00088 parso.python.diff._NodesTree._copy_nodes
24 162 parso.python.diff._get_previous_leaf_if_indentation call site: 00162 parso.python.diff._assert_valid_graph
14 50 parso.python.diff.DiffParser._diff_tokenize call site: 00050 parso.python.diff._suite_or_file_input_is_valid
4 134 parso.utils.split_lines call site: 00134 parso.python.diff.DiffParser._parse
4 144 parso.python.diff._get_next_leaf_if_indentation call site: 00144 parso.python.diff._update_positions
3 36 parso.python.diff.DiffParser.update call site: 00036 parso.python.diff.DiffParser._copy_from_old_parser
3 44 parso.python.diff._ends_with_newline call site: 00044 parso.python.diff.DiffParser._parse
3 80 parso.python.diff._NodesTree.add_parsed_nodes call site: 00080 parso.python.diff._NodesTreeNode.add_tree_nodes
3 158 parso.python.diff._NodesTree.close call site: 00158 parso.python.diff._assert_valid_graph
2 4 ...parso_diff_fuzz.TestOneInput call site: 00004 parso.grammar.load_grammar
2 40 parso.python.diff._ends_with_newline call site: 00040 leaf.get_previous_leaf
2 154 parso.python.diff._NodesTree.close call site: 00154 .len

Runtime coverage analysis

Covered functions
302
Functions that are reachable but not covered
75
Reachable functions
108
Percentage of reachable functions covered
30.56%
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
...parso_diff_fuzz 6
parso 3
parso.grammar 8
parso.utils 13
parso.python.diff 77
parso.python.parser 3

Fuzzer: parso_fuzz

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 3 12.5%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 21 87.5%
All colors 24 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
2 3 ...parso_fuzz.TestOneInput call site: 00003 parso.grammar.load_grammar
1 22 parso.grammar.load_grammar call site: 00022 grammar.parse

Runtime coverage analysis

Covered functions
301
Functions that are reachable but not covered
17
Reachable functions
21
Percentage of reachable functions covered
19.05%
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
...parso_fuzz 3
parso 3
parso.grammar 8
parso.utils 6

Fuzzer: parso_pep8_fuzz

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 3 11.5%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 23 88.4%
All colors 26 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
2 4 ...parso_pep8_fuzz.TestOneInput call site: 00004 parso.grammar.load_grammar
1 23 parso.grammar.load_grammar call site: 00023 grammar.parse

Runtime coverage analysis

Covered functions
301
Functions that are reachable but not covered
19
Reachable functions
23
Percentage of reachable functions covered
17.39%
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
...parso_pep8_fuzz 5
parso 3
parso.grammar 8
parso.utils 6

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
parso.pgen2.generator.generate_grammar parso.pgen2.generator 2 ['N/A', 'N/A'] 5 0 3 2 4 120 1 400 336
parso.grammar.Grammar.parse parso.grammar 9 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 4 0 3 14 9 90 0 295 226
parso.python.pep8.PEP8Normalizer.visit_leaf parso.python.pep8 2 ['N/A', 'N/A'] 3 0 5 5 5 33 6 148 121
parso.python.errors._NamedExprRule.is_issue parso.python.errors 2 ['N/A', 'N/A'] 2 0 4 4 5 16 0 81 69
parso.python.pep8.PEP8Normalizer._visit_node parso.python.pep8 2 ['N/A', 'N/A'] 1 0 7 27 14 19 8 73 44
parso.python.errors._get_rhs_name parso.python.errors 2 ['N/A', 'N/A'] 2 0 0 33 16 5 2 46 35

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

Functions statically reachable by fuzzers
45.0%
326/723
Cyclomatic complexity statically reachable by fuzzers
47.4%
1160 / 2447

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
[] []
parso.pgen2.grammar_parser [] []
parso.python.tokenize [] []
...parso_fuzz ['parso_fuzz'] []
parso.parser [] []
parso.pgen2 [] []
gc [] []
[] []
parso.python.tree [] []
warnings [] []
parso.pgen2.generator [] []
...parso_extended_fuzz ['parso_extended_fuzz'] []
re [] []
...parso_diff_fuzz ['parso_diff_fuzz'] []
platform [] []
parso.python.errors [] []
os [] []
itertools [] []
atheris [] []
parso._compatibility [] []
parso ['parso_extended_fuzz', 'parso_diff_fuzz', 'parso_fuzz', 'parso_pep8_fuzz'] []
parso.tree [] []
pickle [] []
parso.python.diff ['parso_diff_fuzz'] []
parso.python.pep8 [] []
shutil [] []
parso.utils ['parso_extended_fuzz', 'parso_diff_fuzz', 'parso_fuzz', 'parso_pep8_fuzz'] []
difflib [] []
collections [] []
codecs [] []
parso.cache [] []
hashlib [] []
parso.python [] []
ast [] []
parso.file_io [] []
parso.python.parser ['parso_diff_fuzz'] []
pathlib [] []
time [] []
...parso_pep8_fuzz ['parso_pep8_fuzz'] []
logging [] []
parso.grammar ['parso_extended_fuzz', 'parso_diff_fuzz', 'parso_fuzz', 'parso_pep8_fuzz'] []
typing [] []
parso.python.token [] []
parso.normalizer [] []
parso.python.prefix [] []

Directories in report

Directory