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_transformer

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 21 25.3%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 62 74.6%
All colors 83 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
4 16 libcst.matchers._visitors._gather_constructed_visit_funcs call site: 00016 libcst.matchers._visitors._gather_constructed_leave_funcs
3 41 libcst.matchers._visitors._verify_return_annotation call site: 00041 .type
3 46 libcst.matchers._visitors._get_possible_annotated_classes call site: 00046 .isinstance
3 68 libcst._parser.detect_config._detect_encoding call site: 00068 io.BytesIO
2 80 libcst.codemod._command.CodemodCommand.transform_module call site: 00080 libcst.codemod._command.CodemodCommand._instantiate_and_run
1 6 libcst.matchers._visitors.MatcherDecoratableTransformer.__init__ call site: 00006 libcst.matchers._visitors._gather_constructed_visit_funcs
1 28 libcst.matchers._visitors._gather_constructed_leave_funcs call site: 00028 constructed_visitors.get
1 34 libcst.matchers._visitors._get_possible_match_classes call site: 00034 .getattr
1 37 libcst.matchers._visitors._check_types call site: 00037 .isinstance
1 52 libcst.matchers._visitors._get_valid_leave_annotations_for_classes call site: 00052 libcst.matchers._visitors._get_possible_annotated_classes
1 66 libcst._parser.entrypoints._parse call site: 00066 libcst._parser.detect_config._detect_encoding

Runtime coverage analysis

Covered functions
1704
Functions that are reachable but not covered
30
Reachable functions
50
Percentage of reachable functions covered
40.0%
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_transformer 5
libcst.codemod._visitor 2
libcst.codemod._codemod 1
libcst.matchers._visitors 30
libcst._parser.entrypoints 4
libcst._parser.detect_config 7
libcst.codemod._command 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
libcst.codemod.commands.rename.RenameCommand.leave_Attribute libcst.codemod.commands.rename 3 ['N/A', 'N/A', 'N/A'] 4 0 1 5 5 1448 0 4356 4341
libcst.codegen.gen_matcher_classes._get_clean_type_and_aliases libcst.codegen.gen_matcher_classes 1 ['N/A'] 12 0 1 2 4 616 2 1983 1902
libcst.metadata.scope_provider.ImportAssignment.get_qualified_names_for libcst.metadata.scope_provider 2 ['N/A', 'N/A'] 4 0 1 8 6 532 0 1606 1591

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

Functions statically reachable by fuzzers
12.0%
379 / 3257
Cyclomatic complexity statically reachable by fuzzers
12.0%
1286 / 10392

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
libcst._nodes.expression.Param._codegen_impl 37 10 27.02% ['fuzz_transformer']
libcst._nodes.expression.Parameters._codegen_impl 45 10 22.22% ['fuzz_transformer']
libcst._nodes.statement.Try._codegen_impl 31 10 32.25% ['fuzz_transformer']
libcst._nodes.statement.ImportFrom._codegen_impl 39 7 17.94% ['fuzz_transformer']
libcst._nodes.statement.get_docstring_impl 38 18 47.36% ['fuzz_transformer']
libcst._nodes.statement.ClassDef._codegen_impl 35 0 0.0% []
libcst._nodes.statement.With._codegen_impl 46 14 30.43% ['fuzz_transformer']
libcst._nodes.statement.For._codegen_impl 31 10 32.25% ['fuzz_transformer']
libcst._nodes.statement.MatchAs._codegen_impl 31 6 19.35% ['fuzz_transformer']
libcst._type_enforce.is_value_of_type 56 0 0.0% []
libcst.matchers._matcher_base._sequence_matches 55 20 36.36% ['fuzz_transformer']
libcst.matchers._matcher_base._attribute_matches 41 14 34.14% ['fuzz_transformer']
libcst.matchers._matcher_base._metadata_matches 32 0 0.0% []
libcst.metadata.scope_provider.ImportAssignment.get_qualified_names_for 31 2 6.451% ['fuzz_transformer']
libcst.codemod._cli._execute_transform 31 2 6.451% ['fuzz_transformer']
libcst.codemod._cli.parallel_exec_transform_with_prettyprint 49 0 0.0% []
libcst._parser.parso.python.tokenize._create_token_collection 80 1 1.25% ['fuzz_transformer']
libcst._parser.parso.python.tokenize._tokenize_lines_py36_or_below.dedent_if_necessary 218 0 0.0% []
libcst._parser.parso.python.tokenize._tokenize_lines_py37_or_above.dedent_if_necessary 175 0 0.0% []
libcst._parser.wrapped_tokenize._convert_token 44 0 0.0% []
libcst.codemod.visitors._apply_type_annotations.ApplyTypeAnnotationsVisitor._get_module_imports 33 0 0.0% []

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
[] []
[] []
libcst.codemod.visitors._add_imports [] []
libcst_native [] []
libcst._parser.types.py_token [] []
libcst._type_enforce [] []
libcst._typed_visitor_base [] []
libcst._metadata_dependent [] []
libcst.codegen.gen_matcher_classes [] []
libcst._nodes.internal [] []
libcst.codegen.gather [] []
libcst.codemod.visitors._remove_imports [] []
libcst._parser.py_whitespace_parser [] []
typing [] []
libcst.metadata.wrapper [] []
libcst.codemod.commands.convert_format_to_fstring [] []
libcst._typed_visitor [] []
libcst.metadata.span_provider [] []
libcst.codemod.visitors._gather_exports [] []
libcst._parser.types.partials [] []
time [] []
libcst.metadata.full_repo_manager [] []
multiprocessing [] []
os [] []
libcst.metadata.parent_node_provider [] []
libcst.codemod.commands.add_pyre_directive [] []
libcst._nodes.module [] []
libcst.matchers._matcher_base [] []
libcst._parser.types.config [] []
libcst._types [] []
libcst [] []
libcst._parser.entrypoints ['fuzz_transformer'] []
re [] []
types [] []
libcst._parser.parso.python [] []
libcst._parser.types.production [] []
libcst.codemod.visitors._gather_global_names [] []
libcst.helpers.paths [] []
libcst._parser.parso.pgen2.grammar_parser [] []
libcst._parser [] []
libcst._parser.parso.python.tokenize [] []
libcst._parser.conversions.expression [] []
collections [] []
io [] []
copy [] []
libcst._parser.types.whitespace_state [] []
libcst.matchers._visitors ['fuzz_transformer'] []
libcst._position [] []
libcst.codemod.visitors [] []
yaml_ft [] []
textwrap [] []
libcst.helpers.common [] []
libcst._visitors [] []
libcst._parser.types [] []
libcst._parser.wrapped_tokenize [] []
shutil [] []
libcst._batched_visitor [] []
libcst.matchers [] []
libcst._parser.base_parser [] []
libcst.codemod.commands.convert_type_comments [] []
libcst.codemod.commands.rename [] []
libcst.matchers._decorators [] []
traceback [] []
libcst._parser.parso.python.token [] []
yaml [] []
itertools [] []
libcst.testing.utils [] []
libcst.metadata.scope_provider [] []
codecs [] []
libcst.metadata.expression_context_provider [] []
libcst.codemod._context [] []
libcst._parser.grammar [] []
libcst.codemod.commands.unnecessary_format_string [] []
libcst._parser.whitespace_parser [] []
inspect [] []
contextlib [] []
libcst.codemod.commands.rename_typing_generic_aliases [] []
libcst._parser.parso.python.py_token [] []
libcst._nodes.statement [] []
libcst._parser.parso.utils [] []
libcst.display.text [] []
libcst.codemod.commands.convert_namedtuple_to_dataclass [] []
libcst._nodes.expression [] []
libcst.codemod.visitors._gather_imports [] []
libcst.codemod.commands.remove_pyre_directive [] []
libcst._parser.custom_itertools [] []
libcst.codemod.commands.convert_union_to_or [] []
libcst.codemod._testing [] []
warnings [] []
libcst.tool [] []
libcst.codegen [] []
libcst.codegen.gen_visitor_functions [] []
dataclasses [] []
libcst.metadata.base_provider [] []
libcst._parser.types.conversions [] []
libcst.metadata [] []
tokenize [] []
difflib [] []
libcst.codemod._cli [] []
pathlib [] []
libcst._parser.types.py_whitespace_state [] []
libcst.codemod [] []
libcst._parser.types.py_config [] []
libcst._parser.parso [] []
libcst._flatten_sentinel [] []
libcst._add_slots [] []
libcst.codemod.commands [] []
libcst.codemod._codemod ['fuzz_transformer'] []
libcst.metadata.reentrant_codegen [] []
libcst.codegen.gen_type_mapping [] []
atheris [] []
libcst._parser.conversions [] []
libcst.display [] []
enum [] []
libcst._parser.production_decorator [] []
libcst.codemod._dummy_pool [] []
subprocess [] []
libcst._maybe_sentinel [] []
libcst._parser._parsing_check [] []
abc [] []
sys [] []
libcst._nodes [] []
libcst.metadata.name_provider [] []
libcst._removal_sentinel [] []
libcst._nodes.whitespace [] []
libcst.metadata.file_path_provider [] []
libcst.codemod.visitors._gather_unused_imports [] []
libcst.helpers._template [] []
libcst.codemod.visitors._apply_type_annotations [] []
libcst._nodes.deep_equals [] []
libcst._parser.conversions.statement [] []
functools [] []
libcst.codemod.visitors._imports [] []
libcst.metadata.position_provider [] []
libcst._parser.parso.pgen2 [] []
argparse [] []
libcst._parser.conversions.terminals [] []
typing_extensions [] []
libcst.metadata.type_inference_provider [] []
libcst.codemod._runner [] []
libcst.helpers.expression [] []
libcst._parser.types.token [] []
libcst.display.graphviz [] []
libcst.codemod.commands.fix_pyre_directives [] []
libcst.codemod.commands.convert_percent_format_to_fstring [] []
libcst.codemod._visitor ['fuzz_transformer'] []
libcst.codemod.commands.remove_unused_imports [] []
libcst.codemod.commands.ensure_import_present [] []
libcst.helpers.module [] []
libcst.testing [] []
libcst._parser.python_parser [] []
libcst._nodes.base [] []
libcst.codegen.transforms [] []
libcst.helpers.node_fields [] []
ast [] []
concurrent [] []
libcst._parser.conversions.module [] []
libcst.codemod._command ['fuzz_transformer'] []
libcst.codemod.commands.strip_strings_from_types [] []
libcst.codemod.visitors._gather_comments [] []
libcst.codegen.generate [] []
libcst.helpers.matchers [] []
libcst.codemod.commands.noop [] []
importlib [] []
libcst.codemod.commands.fix_variadic_callable [] []
libcst.matchers._return_types [] []
libcst._nodes.op [] []
libcst.metadata.accessor_provider [] []
libcst._parser.conversions.params [] []
libcst.codemod.commands.add_trailing_commas [] []
libcst._exceptions [] []
libcst._version [] []
json [] []
libcst._tabs [] []
libcst.codemod.visitors._gather_string_annotation_names [] []
libcst._parser.parso.pgen2.generator [] []
libcst.helpers [] []
...fuzz_transformer ['fuzz_transformer'] []
libcst._parser.detect_config ['fuzz_transformer'] []

Directories in report

Directory