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

Fuzzer details

Fuzzer: fuzz_lib2to3_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 4 100.%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 0 0.0%
All colors 4 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
3 0 EP call site: 00000 atheris.FuzzedDataProvider

Runtime coverage analysis

Covered functions
217
Functions that are reachable but not covered
4
Reachable functions
4
Percentage of reachable functions covered
0.0%
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_lib2to3_parse 3

Fuzzer: fuzz_format_filecontents

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 192 50.3%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 189 49.6%
All colors 381 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
50 0 EP call site: 00000 black.format_file_contents
28 146 black.nodes.preceding_leaf call site: 00146 black.comments.generate_ignored_nodes
14 363 black.assert_stable call site: 00363 black.handle_ipynb_magics.put_trailing_semicolon_back
11 99 black.get_features_used call site: 00099 black.nodes.is_simple_decorator_expression
11 211 black.lines.is_line_short_enough call site: 00211 black.nodes.is_multiline_string
7 72 black.get_future_imports call site: 00072 black.get_future_imports.get_imports_from_children
7 224 black.strings.has_triple_quotes call site: 00224 .len
7 309 black.parsing.parse_single_version call site: 00309 typed_ast.ast3.parse
6 58 black.mode.supports_feature call site: 00058 black.mode.supports_feature
6 116 black.get_features_used call site: 00116 .len
5 195 black.lines.EmptyLineTracker._maybe_empty_lines call site: 00195 black.lines.EmptyLineTracker._maybe_empty_lines_for_class_or_def
4 124 black.get_features_used call site: 00124 black.mode.supports_feature

Runtime coverage analysis

Covered functions
217
Functions that are reachable but not covered
131
Reachable functions
191
Percentage of reachable functions covered
31.41%
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_format_filecontents 5
black 59
black.handle_ipynb_magics 24
black.parsing 26
black.mode 1
black.trans 3
black.nodes 16
black.comments 30
black.linegen 20
black.lines 37
black.strings 1
black.output 6

Fuzzer: fuzz_raw_format_filecontents

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 191 50.2%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 189 49.7%
All colors 380 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
50 0 EP call site: 00000 black.format_file_contents
28 146 black.nodes.preceding_leaf call site: 00146 black.comments.generate_ignored_nodes
14 363 black.assert_stable call site: 00363 black.handle_ipynb_magics.put_trailing_semicolon_back
11 99 black.get_features_used call site: 00099 black.nodes.is_simple_decorator_expression
11 211 black.lines.is_line_short_enough call site: 00211 black.nodes.is_multiline_string
7 72 black.get_future_imports call site: 00072 black.get_future_imports.get_imports_from_children
7 224 black.strings.has_triple_quotes call site: 00224 .len
7 309 black.parsing.parse_single_version call site: 00309 ast.parse
6 58 black.mode.supports_feature call site: 00058 black.mode.supports_feature
6 116 black.get_features_used call site: 00116 .len
5 195 black.lines.EmptyLineTracker._maybe_empty_lines call site: 00195 black.lines.EmptyLineTracker._maybe_empty_lines_for_class_or_def
4 124 black.get_features_used call site: 00124 black.mode.supports_feature

Runtime coverage analysis

Covered functions
217
Functions that are reachable but not covered
129
Reachable functions
189
Percentage of reachable functions covered
31.75%
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_raw_format_filecontents 4
black 59
black.handle_ipynb_magics 24
black.parsing 26
black.mode 1
black.trans 3
black.nodes 16
black.comments 30
black.linegen 20
black.lines 37
black.strings 1
black.output 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
black.main black 27 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 6 0 25 17 10 324 3 1142 458
black.trans.StringTransformer.__call__ black.trans 4 ['N/A', 'N/A', 'N/A', 'N/A'] 5 0 2 3 4 145 0 525 336
black.linegen.LineGenerator.visit_power black.linegen 2 ['N/A', 'N/A'] 3 0 3 2 4 100 0 384 179
black.linegen._maybe_split_omitting_optional_parens black.linegen 5 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 4 0 4 5 5 78 3 313 126
black.read_pyproject_toml black 3 ['N/A', 'N/A', 'N/A'] 3 0 3 5 5 47 0 153 81
black.trans.BaseStringSplitter.do_match black.trans 2 ['N/A', 'N/A'] 2 0 0 2 4 45 0 165 62
black.linegen.LineGenerator.visit_STRING black.linegen 2 ['N/A', 'N/A'] 3 0 2 12 8 90 0 342 49
black.linegen.normalize_invisible_parens black.linegen 4 ['N/A', 'N/A', 'N/A', 'N/A'] 3 0 9 14 9 55 3 208 41

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

Functions statically reachable by fuzzers
72.0%
228 / 318
Cyclomatic complexity statically reachable by fuzzers
76.0%
990 / 1300

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
black.main 59 0 0.0% []
black.get_sources 37 0 0.0% []
black.reformat_one 31 0 0.0% []
black.format_file_in_place 36 0 0.0% []
re.split 1155 342 29.61% ['fuzz_format_filecontents', 'fuzz_raw_format_filecontents']
black.comments.convert_one_fmt_off_pair 42 7 16.66% ['fuzz_format_filecontents', 'fuzz_raw_format_filecontents']
black.lines.EmptyLineTracker._maybe_empty_lines 37 17 45.94% ['fuzz_format_filecontents', 'fuzz_raw_format_filecontents']
black.lines.EmptyLineTracker._maybe_empty_lines_for_class_or_def 39 0 0.0% ['fuzz_format_filecontents', 'fuzz_raw_format_filecontents']
black.lines.is_line_short_enough 47 5 10.63% ['fuzz_format_filecontents', 'fuzz_raw_format_filecontents']
blib2to3.pytree.Node.splitlines 476 242 50.84% ['fuzz_format_filecontents', 'fuzz_raw_format_filecontents']
black.trans.StringMerger._merge_one_string_group.make_naked 52 0 0.0% []
black.trans.StringMerger._validate_msg 38 2 5.263% []
black.trans.StringParenStripper.do_match 33 0 0.0% []
black.trans.BaseStringSplitter._get_max_string_length 39 0 0.0% []
black.trans.StringSplitter.do_transform.more_splits_should_be_made 60 0 0.0% []
black.trans.StringParenWrapper.do_transform 74 12 16.21% []
match.group 162 29 17.90% []
os.cpu_count 53 9 16.98% []
pathspec.PathSpec.from_lines 68 26 38.23% []
i.strip 196 41 20.91% ['fuzz_format_filecontents', 'fuzz_raw_format_filecontents']
packaging.version.Version 165 67 40.60% []
packaging.specifiers.Specifier 256 83 32.42% []
pattern.search 54 25 46.29% []

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
[] []
black.nodes ['fuzz_format_filecontents', 'fuzz_raw_format_filecontents'] []
tokenize_rt [] []
black.strings ['fuzz_format_filecontents', 'fuzz_raw_format_filecontents'] []
tomllib [] []
typing [] []
tempfile [] []
traceback [] []
blib2to3 [] []
os [] []
dataclasses [] []
warnings [] []
black.concurrency [] []
black.output ['fuzz_format_filecontents', 'fuzz_raw_format_filecontents'] []
asyncio [] []
black.rusty [] []
black.report [] []
black.numerics [] []
ast [] []
functools [] []
black.const [] []
...fuzz_format_filecontents ['fuzz_format_filecontents'] []
black.handle_ipynb_magics ['fuzz_format_filecontents', 'fuzz_raw_format_filecontents'] []
datetime [] []
sys [] []
black.lines ['fuzz_format_filecontents', 'fuzz_raw_format_filecontents'] []
pickle [] []
uvloop [] []
black.brackets [] []
pathlib [] []
...fuzz_raw_format_filecontents ['fuzz_raw_format_filecontents'] []
concurrent [] []
platform [] []
click [] []
hashlib [] []
re [] []
[] []
mypy_extensions [] []
json [] []
secrets [] []
packaging [] []
tomli [] []
IPython [] []
black.mode ['fuzz_format_filecontents', 'fuzz_raw_format_filecontents'] []
black.comments ['fuzz_format_filecontents', 'fuzz_raw_format_filecontents'] []
...fuzz_lib2to3_parse ['fuzz_lib2to3_parse'] []
black.trans ['fuzz_format_filecontents', 'fuzz_raw_format_filecontents'] []
typed_ast [] []
black.__main__ [] []
itertools [] []
black.files [] []
io [] []
black.debug [] []
black ['fuzz_format_filecontents', 'fuzz_raw_format_filecontents'] []
operator [] []
black.linegen ['fuzz_format_filecontents', 'fuzz_raw_format_filecontents'] []
logging [] []
platformdirs [] []
black.cache [] []
collections [] []
enum [] []
multiprocessing [] []
pathspec [] []
_black_version [] []
atheris [] []
tokenize [] []
black.parsing ['fuzz_format_filecontents', 'fuzz_raw_format_filecontents'] []
black._width_table [] []
difflib [] []
colorama [] []

Directories in report

Directory