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

Fuzzer details

Fuzzer: fuzz_parser

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 30 37.5%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 50 62.5%
All colors 80 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
14 61 click.parser._unpack_args call site: 00061 click.parser._unpack_args._fetch
7 48 click.parser.OptionParser._match_short_opt call site: 00048 click.parser.OptionParser._get_value_from_state
2 41 click.parser.OptionParser._get_value_from_state call site: 00041 .isinstance
1 3 ...fuzz_parser.TestOneInput call site: 00003 click.parser.OptionParser.add_option
1 5 click.parser.OptionParser.add_option call site: 00005 click.parser.split_opt
1 7 click.parser.split_opt call site: 00007 ctx.token_normalize_func
1 13 click.parser.Option.__init__ call site: 00013 click.parser.OptionParser.add_option
1 44 click.parser.OptionParser._get_value_from_state call site: 00044 .tuple
1 56 click.parser.OptionParser._process_args_for_options call site: 00056 state.rargs.insert
1 78 click.parser.OptionParser._process_args_for_args call site: 00078 arg.process

Runtime coverage analysis

Covered functions
104
Functions that are reachable but not covered
29
Reachable functions
45
Percentage of reachable functions covered
35.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
...fuzz_parser 9
click.core 1
click.parser 35

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
click.core.Parameter.handle_parse_result click.core 4 ['N/A', 'N/A', 'N/A', 'N/A'] 4 0 1 2 4 120 0 399 387
click.termui.echo_via_pager click.termui 2 ['N/A', 'N/A'] 4 0 1 2 4 97 0 311 121
click.core.BaseCommand.main click.core 7 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 4 0 10 8 6 106 1 342 89
click.formatting.HelpFormatter.write_dl click.formatting 4 ['N/A', 'N/A', 'N/A', 'N/A'] 2 0 9 4 5 28 0 92 71
click.testing.CliRunner.invoke click.testing 8 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 2 0 4 6 5 33 0 109 63
click.core.Command.parse_args click.core 3 ['N/A', 'N/A', 'N/A'] 5 0 4 2 4 137 0 454 58
click._termui_impl.ProgressBar.generator click._termui_impl 1 ['N/A'] 7 0 7 3 4 96 1 314 55
click.core.Parameter.__init__ click.core 13 ['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'] 2 0 1 9 7 26 0 95 47
click.core.MultiCommand.invoke click.core 2 ['N/A', 'N/A'] 4 0 5 3 4 98 0 314 45
click._termui_impl.Editor.edit click._termui_impl 2 ['N/A', 'N/A'] 1 0 4 6 5 22 1 74 44

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

Functions statically reachable by fuzzers
28.0%
129 / 463
Cyclomatic complexity statically reachable by fuzzers
31.0%
503 / 1624

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
[] []
ctypes [] []
click [] []
click.formatting [] []
contextlib [] []
tempfile [] []
codecs [] []
click.termui [] []
getpass [] []
inspect [] []
textwrap [] []
locale [] []
termios [] []
importlib_metadata [] []
click.decorators [] []
itertools [] []
urllib [] []
re [] []
click._termui_impl [] []
collections [] []
stat [] []
gettext [] []
click.core ['fuzz_parser'] []
operator [] []
msvcrt [] []
click._winconsole [] []
functools [] []
weakref [] []
click._textwrap [] []
sys [] []
random [] []
difflib [] []
atheris [] []
uuid [] []
io [] []
datetime [] []
glob [] []
os [] []
click.parser ['fuzz_parser'] []
enum [] []
click.shell_completion [] []
typing_extensions [] []
click.utils [] []
pathlib [] []
...fuzz_parser ['fuzz_parser'] []
click.types [] []
subprocess [] []
click.testing [] []
tty [] []
click.exceptions [] []
importlib [] []
time [] []
[] []
math [] []
colorama [] []
click.globals [] []
typing [] []
webbrowser [] []
shutil [] []
shlex [] []
threading [] []
click._compat [] []

Directories in report

Directory