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_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 378 63.7%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 215 36.2%
All colors 593 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
89 269 rich.console.Console.render call site: 00269 rich.pretty.pretty_repr
33 131 rich.style.Style.__init__ call site: 00131 rich.style.Style.normalize
20 424 rich.color.Color.from_triplet call site: 00424 rich.text.Text.with_indent_guides
19 553 rich.containers.Lines.justify call site: 00553 rich.text.Text.join
16 379 rich.text.Text.render call site: 00379 rich.text.Text.from_ansi
15 58 rich.text.Text.__init__ call site: 00058 rich.text.Text.append
14 409 rich.ansi.AnsiDecoder.decode_line call site: 00409 rich.color.Color.from_rgb
14 489 rich.text.Text.expand_tabs call site: 00489 rich.text.Text.split
13 187 rich.console.Console._collect_renderables call site: 00187 rich.console.Console._collect_renderables.check_text
13 254 rich.segment.Segment.split_and_crop_lines call site: 00254 rich.segment.Segment.adjust_line_length
12 396 rich.ansi._ansi_tokenize call site: 00396 rich.text.Text.append
9 215 rich.console.Console.render call site: 00215 rich.layout.Layout.render

Runtime coverage analysis

Covered functions
390
Functions that are reachable but not covered
185
Reachable functions
252
Percentage of reachable functions covered
26.59%
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 3
rich.console 63
rich._windows 4
rich._win32_console 3
rich.protocol 8
rich.markup 28
rich.text 61
rich.control 4
rich._emoji_replace 1
rich.style 19
rich.color 12
rich._loop 2
rich.pretty 50
rich.layout 15
rich.segment 6
rich.cells 7
rich.ansi 26
rich._pick 1
rich.containers 18
rich._wrap 9

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'] 5 0 2 3 4 70 0 230 197
rich.markdown.Markdown.__rich_console__ rich.markdown 3 ['N/A', 'N/A', 'N/A'] 7 0 29 20 11 81 0 272 167
rich.table.Table.__rich_console__ rich.table 3 ['N/A', 'N/A', 'N/A'] 8 0 4 4 5 126 0 431 148
rich.logging.RichHandler.emit rich.logging 2 ['N/A', 'N/A'] 7 0 4 4 5 132 0 437 127
rich.traceback.Traceback.__rich_console__.render_stack rich.traceback 2 ['N/A', 'N/A'] 7 0 11 6 5 110 2 363 116
rich.console.Console.export_svg rich.console 7 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 4 0 4 7 6 56 1 188 75
rich._inspect.Inspect._render rich._inspect 1 ['N/A'] 7 0 19 16 9 97 1 322 71
rich.progress.Progress.track rich.progress 7 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 5 0 6 3 4 25 1 84 66
rich.progress.ProgressColumn.__call__ rich.progress 2 ['N/A', 'N/A'] 8 0 1 2 4 81 0 271 52
rich.syntax.Syntax._get_syntax rich.syntax 3 ['N/A', 'N/A', 'N/A'] 8 0 13 13 8 107 1 359 49

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

Functions statically reachable by fuzzers
30.0%
253 / 853
Cyclomatic complexity statically reachable by fuzzers
33.0%
961 / 2917

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
rich.console.Console._write_buffer 49 10 20.40% ['fuzz_markdown']
rich.console.Console.export_html 36 0 0.0% []
rich.console.Console.export_svg.get_svg_style 42 0 0.0% []
rich.console.Console.export_svg.make_tag.stringify 47 0 0.0% []
rich.segment.Segment.divide 47 2 4.255% ['fuzz_markdown']
rich._log_render.LogRender.__call__ 35 1 2.857% ['fuzz_markdown']
rich._inspect.Inspect._render.safe_getattr 60 1 1.666% ['fuzz_markdown']
rich.pretty.traverse._traverse.iter_rich_args 61 0 0.0% ['fuzz_markdown']
rich.pretty.traverse._traverse.iter_attrs 89 0 0.0% ['fuzz_markdown']
rich.markup.render.pop_style 51 1 1.960% ['fuzz_markdown']
rich.style.Style.__str__ 43 0 0.0% []
rich.style.Style.parse 39 2 5.128% ['fuzz_markdown']
rich.rule.Rule.__rich_console__ 40 6 15.0% ['fuzz_markdown']
rich.color.Color.downgrade 38 6 15.78% ['fuzz_markdown']
rich.table.Table._calculate_column_widths 32 11 34.37% ['fuzz_markdown']
rich.containers.Lines.justify 38 16 42.10% ['fuzz_markdown']
rich.panel.Panel.__rich_console__.align_text 50 25 50.0% ['fuzz_markdown']
rich.box.Box.get_row 32 16 50.0% ['fuzz_markdown']
rich.syntax.Syntax._get_syntax 62 28 45.16% ['fuzz_markdown']
pygments.lexers.get_lexer_by_name 192 59 30.72% ['fuzz_markdown']
data.items 304 117 38.48% ['fuzz_markdown']

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

Directories in report

Directory