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

Project functions overview

The following table shows data about each function in the project. The functions included in this table correspond to all functions that exist in the executables of the fuzzers. As such, there may be functions that are from third-party libraries.

For further technical details on the meaning of columns in the below table, please see the Glossary .

Func name Functions filename Args Function call depth Reached by Fuzzers Runtime reached by Fuzzers Combined 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

Fuzzer details

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 536 98.3%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 9 1.65%
All colors 545 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
462 82 black.parsing.lib2to3_parse call site: 00082 black.check_stability_and_equivalence
64 0 EP call site: 00000 black.format_file_contents
10 67 black.parsing.lib2to3_parse call site: 00067 black.mode.supports_feature

Runtime coverage analysis

Covered functions
71
Functions that are reachable but not covered
250
Reachable functions
263
Percentage of reachable functions covered
4.94%
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.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/ 1
...fuzz_format_filecontents 5
black 60
black.handle_ipynb_magics 32
black.ranges 38
black.parsing 33
black.mode 1
black.nodes 23
black.comments 39
black.linegen 29
black.lines 39
black.trans 12
black.strings 5
black.brackets 9
black.output 7

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
71
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_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 535 98.3%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 9 1.65%
All colors 544 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
461 82 black.parsing.lib2to3_parse call site: 00082 black.check_stability_and_equivalence
64 0 EP call site: 00000 black.format_file_contents
10 67 black.parsing.lib2to3_parse call site: 00067 black.mode.supports_feature

Runtime coverage analysis

Covered functions
71
Functions that are reachable but not covered
250
Reachable functions
261
Percentage of reachable functions covered
4.21%
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.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/ 1
...fuzz_raw_format_filecontents 4
black 60
black.handle_ipynb_magics 32
black.ranges 38
black.parsing 33
black.mode 1
black.nodes 23
black.comments 39
black.linegen 29
black.lines 39
black.trans 12
black.strings 5
black.brackets 9
black.output 7

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 29 ['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', 'N/A', 'N/A'] 9 0 34 22 12 403 3 1412 485
black.trans.StringTransformer.__call__ black.trans 4 ['N/A', 'N/A', 'N/A', 'N/A'] 6 0 2 3 4 147 0 532 341
black.linegen.LineGenerator.visit_power black.linegen 2 ['N/A', 'N/A'] 5 0 3 2 4 82 0 326 162
black.linegen._maybe_split_omitting_optional_parens black.linegen 5 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 7 0 4 6 5 88 3 354 132
black.read_pyproject_toml black 3 ['N/A', 'N/A', 'N/A'] 4 0 4 8 6 53 0 174 80
black.trans.BaseStringSplitter.do_match black.trans 2 ['N/A', 'N/A'] 4 0 0 2 4 45 0 165 62
black.linegen.LineGenerator.visit_STRING black.linegen 2 ['N/A', 'N/A'] 5 0 2 13 8 85 1 324 56
black.linegen.normalize_invisible_parens black.linegen 4 ['N/A', 'N/A', 'N/A', 'N/A'] 3 0 11 17 10 67 3 252 43

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

Functions statically reachable by fuzzers
69.0%
257 / 373
Cyclomatic complexity statically reachable by fuzzers
74.0%
1126 / 1528

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 Runtime reached by Fuzzers Combined 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 77 0 0.0% []
black.get_sources 45 0 0.0% []
black.format_file_in_place 36 0 0.0% []
black.get_features_used 51 0 0.0% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents']
black.files.gen_python_files 32 0 0.0% []
re.match 1212 369 30.44% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents']
sources.update 1640 2 0.121% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents', 'fuzz_lib2to3_parse']
black.comments.convert_one_fmt_off_pair 51 0 0.0% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents']
black.comments._generate_ignored_nodes_from_fmt_skip 39 0 0.0% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents']
black.linegen.LineGenerator.visit_STRING 43 0 0.0% []
black.linegen._first_right_hand_split 53 0 0.0% []
black.linegen.normalize_invisible_parens 37 0 0.0% []
black.linegen.generate_trailers_to_omit 37 0 0.0% []
black.lines.EmptyLineTracker._maybe_empty_lines 45 0 0.0% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents']
black.lines.EmptyLineTracker._maybe_empty_lines_for_class_or_def 40 0 0.0% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents']
black.lines.is_line_short_enough 46 0 0.0% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents']
black.lines.can_omit_invisible_parens 37 0 0.0% []
blib2to3.pytree.Node.splitlines 482 156 32.36% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents']
black.nodes.whitespace 143 0 0.0% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents']
platformdirs.user_cache_dir 94 4 4.255% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents', 'fuzz_lib2to3_parse']
c.leaves 92 29 31.52% ['fuzz_format_filecontents']
pattern.search 56 25 44.64% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents', 'fuzz_lib2to3_parse']
match.groups 170 31 18.23% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents', 'fuzz_lib2to3_parse']
black.strings.normalize_string_quotes 42 0 0.0% []
black.strings.normalize_fstring_quotes 36 0 0.0% []
black.trans.StringMerger._merge_one_string_group.make_naked 55 0 0.0% []
black.trans.StringMerger._validate_msg 41 2 4.878% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents', 'fuzz_lib2to3_parse']
black.trans.StringParenStripper.do_match 34 0 0.0% []
black.trans.BaseStringSplitter._get_max_string_length 39 0 0.0% []
black.trans.iter_fexpr_spans 32 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% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents', 'fuzz_lib2to3_parse']
black.brackets.BracketTracker.mark 31 0 0.0% []
i.strip 211 52 24.64% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents', 'fuzz_lib2to3_parse']

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

Directories in report

Directory