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 476 61.0%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 304 38.9%
All colors 780 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
105 458 rich.console.Console.render call site: 00458 rich.pretty.pretty_repr
33 131 rich.style.Style.__init__ call site: 00131 rich.style.Style.normalize
27 592 rich.color.Color.from_triplet call site: 00592 rich.text.Text.with_indent_guides
19 409 rich.containers.Lines.justify call site: 00409 rich.text.Text.join
16 706 rich.text.Text.stylize call site: 00706 rich.syntax.Syntax._apply_stylized_ranges
15 58 rich.text.Text.__init__ call site: 00058 rich.text.Text.append
14 577 rich.ansi.AnsiDecoder.decode_line call site: 00577 rich.color.Color.from_rgb
14 626 rich.text.Text.expand_tabs call site: 00626 rich.text.Text.split
13 187 rich.console.Console._collect_renderables call site: 00187 rich.console.Console._collect_renderables.check_text
13 259 rich.segment.Segment.split_and_crop_lines call site: 00259 rich.segment.Segment.adjust_line_length
12 564 rich.ansi._ansi_tokenize call site: 00564 rich.text.Text.append
12 737 rich.markdown.Markdown.__rich_console__ call site: 00737 rich.markdown.MarkdownContext.on_text

Runtime coverage analysis

Covered functions
391
Functions that are reachable but not covered
217
Reachable functions
317
Percentage of reachable functions covered
31.55%
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 70
rich._windows 4
rich._win32_console 3
rich.protocol 9
rich.markup 28
rich.text 62
rich.control 4
rich._emoji_replace 1
rich.style 21
rich.color 12
rich._loop 2
rich.pretty 50
rich.layout 15
rich.segment 8
rich.cells 7
rich.constrain 3
rich.panel 19
rich.padding 3
rich.measure 7
rich.containers 18
rich._pick 1
rich._wrap 9
rich.ansi 26
rich.syntax 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
rich.console.PagerContext.__exit__ rich.console 4 ['N/A', 'N/A', 'N/A', 'N/A'] 4 0 2 3 4 70 0 230 197
rich.table.Table.__rich_console__ rich.table 3 ['N/A', 'N/A', 'N/A'] 7 0 4 4 5 126 0 431 134
rich.logging.RichHandler.emit rich.logging 2 ['N/A', 'N/A'] 8 0 4 4 5 132 0 437 127
rich.traceback.Traceback.__rich_console__.render_stack rich.traceback 2 ['N/A', 'N/A'] 8 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'] 5 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'] 4 0 6 3 4 25 1 84 66
rich.progress.ProgressColumn.__call__ rich.progress 2 ['N/A', 'N/A'] 7 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
rich.live.Live.start rich.live 2 ['N/A', 'N/A'] 3 0 7 5 5 24 6 85 41

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

Functions statically reachable by fuzzers
32.0%
269 / 853
Cyclomatic complexity statically reachable by fuzzers
35.0%
1022 / 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.panel.Panel.__rich_console__.align_text 50 25 50.0% ['fuzz_markdown']
rich.syntax.Syntax._get_syntax 62 28 45.16% ['fuzz_markdown']
rich.containers.Lines.justify 38 16 42.10% ['fuzz_markdown']
rich.rule.Rule.__rich_console__ 40 6 15.0% ['fuzz_markdown']
rich.table.Table._calculate_column_widths 32 11 34.37% ['fuzz_markdown']
rich.style.Style.__str__ 43 0 0.0% []
rich.style.Style.parse 39 2 5.128% ['fuzz_markdown']
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.color.Color.downgrade 38 6 15.78% ['fuzz_markdown']
data.items 304 117 38.48% ['fuzz_markdown']
pygments.lexers.get_lexer_by_name 192 59 30.72% ['fuzz_markdown']
rich.box.Box.get_row 32 16 50.0% ['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.repr [] []
platform [] []
rich.color_triplet [] []
os [] []
rich._cell_widths [] []
rich.live_render [] []
IPython [] []
abc [] []
rich._fileno [] []
rich.abc [] []
rich.screen [] []
rich.status [] []
rich._windows ['fuzz_markdown'] []
rich._emoji_replace ['fuzz_markdown'] []
random [] []
rich.rule [] []
rich._null_file [] []
rich._palettes [] []
rich.text ['fuzz_markdown'] []
operator [] []
rich.tree [] []
rich.highlighter [] []
rich.box [] []
rich._loop ['fuzz_markdown'] []
rich.live [] []
rich.style ['fuzz_markdown'] []
rich.pager [] []
traceback [] []
rich.scope [] []
logging [] []
contextlib [] []
zlib [] []
rich.styled [] []
rich.diagnose [] []
inspect [] []
rich.control ['fuzz_markdown'] []
rich.columns [] []
rich.theme [] []
rich.errors [] []
rich.pretty ['fuzz_markdown'] []
pathlib [] []
rich.layout ['fuzz_markdown'] []
collections [] []
rich._inspect [] []
rich.filesize [] []
rich.cells ['fuzz_markdown'] []
fractions [] []
rich.progress_bar [] []
rich._stack [] []
threading [] []
rich.palette [] []
itertools [] []
rich.panel ['fuzz_markdown'] []
datetime [] []
rich._ratio [] []
rich.table [] []
pickle [] []
rich._pick ['fuzz_markdown'] []
rich.ansi ['fuzz_markdown'] []
time [] []
re [] []
json [] []
rich.region [] []
get_console [] []
rich.color ['fuzz_markdown'] []
rich.constrain ['fuzz_markdown'] []
colorsys [] []
rich._export_format [] []
rich.segment ['fuzz_markdown'] []
...fuzz_markdown ['fuzz_markdown'] []
[] []
getpass [] []
warnings [] []
rich [] []
dataclasses [] []
rich.jupyter [] []
typing [] []
textwrap [] []
math [] []
rich._extension [] []
rich.align [] []
rich._wrap ['fuzz_markdown'] []
argparse [] []
rich.prompt [] []
rich.file_proxy [] []
pty [] []
attr [] []
rich.containers ['fuzz_markdown'] []
rich._windows_renderer [] []
rich.emoji [] []
linecache [] []
rich.spinner [] []
rich.protocol ['fuzz_markdown'] []
rich.markup ['fuzz_markdown'] []
markdown_it [] []
rich.traceback [] []
rich.bar [] []
rich._timer [] []
ast [] []
rich.json [] []
rich.syntax ['fuzz_markdown'] []
sys [] []
rich._spinners [] []
rich.terminal_theme [] []
rich._emoji_codes [] []
html [] []
rich.progress [] []
rich.logging [] []
rich.padding ['fuzz_markdown'] []
ipywidgets [] []
rich.console ['fuzz_markdown'] []
rich._log_render [] []
atheris [] []
rich.__main__ [] []
rich.themes [] []
ctypes [] []
rich.measure ['fuzz_markdown'] []
rich.markdown ['fuzz_markdown'] []
pygments [] []
io [] []
pydoc [] []
rich._win32_console ['fuzz_markdown'] []
configparser [] []
rich.default_styles [] []
functools [] []

Directories in report

Directory