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_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 314 85.0%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 55 14.9%
All colors 369 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
122 162 lark.visitors.Transformer_InPlace.transform call site: 00162 lark.load_grammar.GrammarBuilder.do_import
23 29 lark.utils.FS.open call site: 00029 lark.lark.Lark._load
22 121 lark.lark.Lark.__init__ call site: 00121 lark.load_grammar.GrammarBuilder.load_grammar
19 56 lark.utils._deserialize call site: 00056 lark.lark.Lark._prepare_callbacks
13 14 lark.lark.Lark.__init__ call site: 00014 lark.load_grammar.sha256_digest
13 299 lark.parser_frontends._construct_parsing_frontend call site: 00299 lark.lark.Lark._build_lexer
13 344 lark.utils.Serialize.memo_serialize call site: 00344 lark.utils._serialize
12 108 lark.parser_frontends._wrap_lexer call site: 00108 lark.parser_frontends.create_contextual_lexer
9 84 lark.lark.Lark._prepare_callbacks call site: 00084 lark.parse_tree_builder.apply_visit_wrapper
7 76 lark.lark.Lark._prepare_callbacks call site: 00076 lark.parse_tree_builder.ParseTreeBuilder._init_builders
7 154 lark.common.ParserConf.__init__ call site: 00154 lark.load_grammar._get_parser
7 314 lark.lexer._check_regex_collisions call site: 00314 lark.lexer._create_unless.

Runtime coverage analysis

Covered functions
60
Functions that are reachable but not covered
187
Reachable functions
195
Percentage of reachable functions covered
4.1%
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_parse 5
lark.lark 46
lark.load_grammar 88
lark.utils 28
lark.parser_frontends 24
lark.parse_tree_builder 11
lark.lexer 20
lark.grammar 3
lark.common 2
lark.visitors 3

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
lark.reconstruct.Reconstructor.reconstruct lark.reconstruct 4 ['N/A', 'N/A', 'N/A', 'N/A'] 8 0 2 2 4 114 0 370 274
lark.load_grammar.Grammar.compile lark.load_grammar 3 ['N/A', 'N/A', 'N/A'] 4 0 5 12 8 66 0 209 116
lark.tools.standalone.gen_standalone lark.tools.standalone 4 ['N/A', 'N/A', 'N/A', 'N/A'] 2 0 23 3 4 22 2 74 56
lark.parsers.lalr_parser.LALR_Parser.parse lark.parsers.lalr_parser 4 ['N/A', 'N/A', 'N/A', 'N/A'] 4 0 1 6 5 20 0 66 54
lark.lexer._create_unless lark.lexer 4 ['N/A', 'N/A', 'N/A', 'N/A'] 3 0 2 4 5 29 2 92 44
lark.parser_frontends.create_earley_parser lark.parser_frontends 3 ['N/A', 'N/A', 'N/A'] 6 0 0 2 4 55 0 178 43
lark.parsers.lalr_analysis.LALR_Analyzer.compute_lalr1_states lark.parsers.lalr_analysis 1 ['N/A'] 2 0 7 9 7 18 2 61 40
lark.lark.Lark.lex lark.lark 3 ['N/A', 'N/A', 'N/A'] 6 0 1 2 4 40 0 130 36

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

Functions statically reachable by fuzzers
26.0%
163 / 622
Cyclomatic complexity statically reachable by fuzzers
28.9%
606 / 2071

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

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
[] []
typing [] []
itertools [] []
lark.__pyinstaller.hook-lark [] []
json [] []
regex [] []
lark.exceptions [] []
tokenize [] []
lark.parsers.lalr_interactive_parser [] []
lark.lexer ['fuzz_parse'] []
lark.parse_tree_builder ['fuzz_parse'] []
pickle [] []
os [] []
sys [] []
unicodedata [] []
lark.__pyinstaller [] []
re [] []
atomicwrites [] []
lark.reconstruct [] []
[] []
textwrap [] []
hashlib [] []
importlib [] []
lark.common ['fuzz_parse'] []
lark.tree_templates [] []
lark.parsers.cyk [] []
lark.parsers.lalr_parser [] []
lark.parsers.earley_common [] []
operator [] []
lark.tools [] []
lark.load_grammar ['fuzz_parse'] []
Tree [] []
lark.parsers.grammar_analysis [] []
abc [] []
lark.parsers.xearley [] []
lark.ast_utils [] []
pydot [] []
...fuzz_parse ['fuzz_parse'] []
lark.tree_matcher [] []
codecs [] []
PyInstaller [] []
lark [] []
lark.grammar ['fuzz_parse'] []
rich [] []
lark.parsers.earley [] []
lark.tree [] []
random [] []
inspect [] []
interegular [] []
collections [] []
lark.indenter [] []
lark.tools.nearley [] []
base64 [] []
contextlib [] []
lark.utils ['fuzz_parse'] []
argparse [] []
zlib [] []
functools [] []
lark.parsers.earley_forest [] []
lark.parsers.lalr_parser_state [] []
lark.parser_frontends ['fuzz_parse'] []
lark.visitors ['fuzz_parse'] []
lark.parsers.lalr_analysis [] []
warnings [] []
lark.tools.serialize [] []
lark.tools.standalone [] []
getpass [] []
sre_parse [] []
atheris [] []
tempfile [] []
ast [] []
logging [] []
lark.lark ['fuzz_parse'] []
js2py [] []
copy [] []
lark.parsers [] []
lark.grammars [] []
pkgutil [] []

Directories in report

Directory