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

Fuzzer details

Fuzzer: fuzz_markdown

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 500 61.3%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 315 38.6%
All colors 815 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
93 470 rich.console.Console.render call site: 00470 rich.console.Console.render_lines
53 589 rich.segment.Segment.split_and_crop_lines call site: 00589 rich.console.Console.render
33 129 rich.style.Style.__init__ call site: 00129 rich.style.Style.normalize
29 771 rich.table.Table.__init__ call site: 00771 rich.columns.Columns.__rich_console__.iter_renderables
27 643 rich.color.Color.from_triplet call site: 00643 rich.text.Text.with_indent_guides
19 416 rich.containers.Lines.justify call site: 00416 rich.text.Text.join
14 679 rich.text.Text.expand_tabs call site: 00679 rich.text.Text.split
13 59 rich._emoji_replace._emoji_replace call site: 00059 rich.markup._parse
13 185 rich.console.Console._collect_renderables call site: 00185 rich.console.Console._collect_renderables.check_text
12 270 rich.text.Text.stylize call site: 00270 rich.syntax.Syntax._apply_stylized_ranges
12 300 rich.markdown.Markdown.__rich_console__ call site: 00300 rich.markdown.MarkdownContext.on_text
11 758 rich.console.Console.render call site: 00758 rich.measure.Measurement.get

Runtime coverage analysis

Covered functions
391
Functions that are reachable but not covered
216
Reachable functions
323
Percentage of reachable functions covered
33.13%
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_markdown 6
rich.markdown 32
rich.console 71
rich._windows 4
rich._win32_console 3
rich.protocol 9
rich.markup 28
rich.text 60
rich._emoji_replace 1
rich.style 21
rich.color 12
rich._loop 2
rich.pretty 50
rich.syntax 32
rich.segment 8
rich.control 3
rich.containers 18
rich._pick 1
rich._wrap 9
rich.cells 9
rich.constrain 3
rich.layout 15
rich.ansi 26
rich.panel 19
rich.padding 4
rich.measure 7
rich.columns 20
rich.table 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
rich.console.PagerContext.__exit__ rich.console 4 ['N/A', 'N/A', 'N/A', 'N/A'] 3 0 2 3 4 65 0 216 183
rich.table.Table.__rich_console__ rich.table 3 ['N/A', 'N/A', 'N/A'] 6 0 4 4 5 126 0 431 134
rich.logging.RichHandler.emit rich.logging 2 ['N/A', 'N/A'] 5 0 4 4 5 126 0 417 113
rich.traceback.Traceback.__rich_console__ rich.traceback 3 ['N/A', 'N/A', 'N/A'] 6 0 7 5 5 113 0 368 94
rich.console.Console.export_svg rich.console 7 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 3 0 4 7 6 58 1 194 75
rich._inspect.Inspect._render rich._inspect 1 ['N/A'] 5 0 19 16 9 96 1 319 71
rich.progress.Progress.track rich.progress 6 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 3 0 6 3 4 25 1 84 66
rich.progress.ProgressColumn.__call__ rich.progress 2 ['N/A', 'N/A'] 6 0 1 2 4 81 0 271 55
rich.syntax.Syntax._get_syntax rich.syntax 3 ['N/A', 'N/A', 'N/A'] 4 0 13 13 8 103 1 344 49
rich.live.Live.start rich.live 2 ['N/A', 'N/A'] 3 0 8 4 5 24 6 84 40

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

Functions statically reachable by fuzzers
32.0%
269 / 839
Cyclomatic complexity statically reachable by fuzzers
36.0%
1016 / 2861

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
[] []
rich._win32_console ['fuzz_markdown'] []
argparse [] []
rich.status [] []
dataclasses [] []
rich._emoji_codes [] []
rich.file_proxy [] []
typing_extensions [] []
ctypes [] []
rich.jupyter [] []
rich.filesize [] []
math [] []
rich._loop ['fuzz_markdown'] []
rich.text ['fuzz_markdown'] []
rich._timer [] []
rich.markup ['fuzz_markdown'] []
rich.default_styles [] []
io [] []
rich._cell_widths [] []
rich.panel ['fuzz_markdown'] []
datetime [] []
rich.pretty ['fuzz_markdown'] []
abc [] []
rich.constrain ['fuzz_markdown'] []
sys [] []
itertools [] []
markdown_it [] []
rich.table ['fuzz_markdown'] []
pty [] []
rich.control ['fuzz_markdown'] []
rich._inspect [] []
functools [] []
rich.ansi ['fuzz_markdown'] []
rich._spinners [] []
ipywidgets [] []
rich.syntax ['fuzz_markdown'] []
rich.containers ['fuzz_markdown'] []
rich.measure ['fuzz_markdown'] []
inspect [] []
rich.color ['fuzz_markdown'] []
rich.themes [] []
rich._wrap ['fuzz_markdown'] []
rich._extension [] []
fractions [] []
logging [] []
rich.rule [] []
rich.traceback [] []
time [] []
IPython [] []
rich.bar [] []
rich.progress [] []
attr [] []
rich._windows_renderer [] []
rich.theme [] []
rich.live_render [] []
rich.diagnose [] []
rich.pager [] []
threading [] []
rich.layout ['fuzz_markdown'] []
rich.spinner [] []
rich.color_triplet [] []
rich.progress_bar [] []
[] []
rich.style ['fuzz_markdown'] []
os [] []
rich.console ['fuzz_markdown'] []
rich.screen [] []
textwrap [] []
rich._pick ['fuzz_markdown'] []
rich.columns ['fuzz_markdown'] []
rich.emoji [] []
html [] []
contextlib [] []
rich._windows ['fuzz_markdown'] []
colorsys [] []
rich.live [] []
configparser [] []
rich.styled [] []
rich.terminal_theme [] []
rich.tree [] []
rich.padding ['fuzz_markdown'] []
pygments [] []
rich.region [] []
...fuzz_markdown ['fuzz_markdown'] []
linecache [] []
atheris [] []
marshal [] []
rich._stack [] []
rich.repr [] []
rich.box [] []
rich.segment ['fuzz_markdown'] []
rich._fileno [] []
pydoc [] []
traceback [] []
rich.abc [] []
getpass [] []
json [] []
random [] []
zlib [] []
rich [] []
rich.__main__ [] []
rich.scope [] []
re [] []
pathlib [] []
warnings [] []
rich.logging [] []
rich._ratio [] []
rich._export_format [] []
rich.palette [] []
rich.highlighter [] []
rich.protocol ['fuzz_markdown'] []
rich.errors [] []
rich.cells ['fuzz_markdown'] []
rich.markdown ['fuzz_markdown'] []
rich.json [] []
typing [] []
get_console [] []
platform [] []
ast [] []
rich._log_render [] []
collections [] []
rich._palettes [] []
rich.align [] []
rich.prompt [] []
rich._emoji_replace ['fuzz_markdown'] []
rich._null_file [] []
operator [] []

Directories in report

Directory