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_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 546 98.3%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 9 1.62%
All colors 555 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
466 88 black.parsing.lib2to3_parse call site: 00088 black.check_stability_and_equivalence
70 0 EP call site: 00000 black.format_file_contents
10 73 black.parsing.lib2to3_parse call site: 00073 black.mode.supports_feature

Runtime coverage analysis

Covered functions
72
Functions that are reachable but not covered
251
Reachable functions
264
Percentage of reachable functions covered
4.92%
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 61
black.handle_ipynb_magics 32
black.ranges 39
black.parsing 33
black.mode 1
black.nodes 23
black.comments 39
black.linegen 29
black.lines 40
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
72
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 547 98.3%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 9 1.61%
All colors 556 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
467 88 black.parsing.lib2to3_parse call site: 00088 black.check_stability_and_equivalence
70 0 EP call site: 00000 black.format_file_contents
10 73 black.parsing.lib2to3_parse call site: 00073 black.mode.supports_feature

Runtime coverage analysis

Covered functions
72
Functions that are reachable but not covered
253
Reachable functions
266
Percentage of reachable functions covered
4.89%
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 61
black.handle_ipynb_magics 32
black.ranges 39
black.parsing 33
black.mode 1
black.nodes 23
black.comments 39
black.linegen 29
black.lines 40
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'] 8 0 34 22 12 406 3 1430 487
black.trans.StringTransformer.__call__ black.trans 4 ['N/A', 'N/A', 'N/A', 'N/A'] 6 0 2 3 4 148 0 535 344
black.linegen.LineGenerator.visit_power black.linegen 2 ['N/A', 'N/A'] 6 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'] 6 0 4 6 5 88 3 354 132
black.read_pyproject_toml black 3 ['N/A', 'N/A', 'N/A'] 3 0 4 8 6 52 0 170 76
black.trans.BaseStringSplitter.do_match black.trans 2 ['N/A', 'N/A'] 3 0 0 2 4 44 0 162 59
black.linegen.LineGenerator.visit_STRING black.linegen 2 ['N/A', 'N/A'] 5 0 2 13 8 86 1 327 56
black.linegen.normalize_invisible_parens black.linegen 4 ['N/A', 'N/A', 'N/A', 'N/A'] 4 0 11 17 10 67 5 252 40

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

Functions statically reachable by fuzzers
68.0%
256 / 375
Cyclomatic complexity statically reachable by fuzzers
73.0%
1131 / 1544

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._format_str_once 38 0 0.0% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents']
black.get_features_used 56 0 0.0% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents']
black.files.gen_python_files 32 0 0.0% []
re.finditer 1220 360 29.50% ['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.left_hand_split 35 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 48 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']
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% []
match.groups 170 31 18.23% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents', 'fuzz_lib2to3_parse']
pathspec.PathSpec.from_lines 92 29 31.52% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents']
i.strip 211 52 24.64% ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents', 'fuzz_lib2to3_parse']
pattern.search 56 25 44.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
[] []
sys [] []
_black_version [] []
colorama [] []
black.const [] []
black.cache [] []
importlib [] []
black.files [] []
os [] []
warnings [] []
uvloop [] []
black.resources [] []
black.trans ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents'] []
tempfile [] []
secrets [] []
platform [] []
concurrent [] []
blib2to3 [] []
enum [] []
black.debug [] []
asyncio [] []
atheris [] []
re [] []
black.output ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents'] []
black.mode ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents'] []
black.comments ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents'] []
black.lines ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents'] []
hashlib [] []
tokenize_rt [] []
black.brackets ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents'] []
packaging [] []
typing [] []
logging [] []
black ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents'] []
...fuzz_format_filecontents ['fuzz_format_filecontents'] []
black.strings ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents'] []
multiprocessing [] []
itertools [] []
...fuzz_raw_format_filecontents ['fuzz_raw_format_filecontents'] []
black.rusty [] []
json [] []
tokenize [] []
black.nodes ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents'] []
black.ranges ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents'] []
dataclasses [] []
black.report [] []
mypy_extensions [] []
pickle [] []
operator [] []
difflib [] []
ast [] []
traceback [] []
tomli [] []
tomllib [] []
pathlib [] []
black.__main__ [] []
datetime [] []
platformdirs [] []
black.handle_ipynb_magics ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents'] []
io [] []
black._width_table [] []
black.linegen ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents'] []
pathspec [] []
IPython [] []
click [] []
...fuzz_lib2to3_parse ['fuzz_lib2to3_parse'] []
[] []
collections [] []
black.parsing ['fuzz_raw_format_filecontents', 'fuzz_format_filecontents'] []
black.concurrency [] []
black.schema [] []
black.numerics [] []
functools [] []

Directories in report

Directory