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: njs_process_script_fuzzer

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 302 23.6%
gold [1:9] 3 0.23%
yellow [10:29] 3 0.23%
greenyellow [30:49] 1 0.07%
lawngreen 50+ 967 75.7%
All colors 1276 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
22 1253 njs_main call site: 01253 njs_process_file
20 358 njs_engine_njs_init call site: 00358 njs_vm_compile_module
9 342 njs_scope_global_index call site: 00342 njs_rejection_tracker
9 1243 njs_parser_destroy call site: 01243 njs_dprintf
8 767 njs_object_enumerate_string call site: 00767 njs_array_alloc
7 925 njs_object_own_enumerate call site: 00925 njs_value_property
7 991 njs_object_prop_define call site: 00991 njs_typed_array_set_value
6 1 LLVMFuzzerTestOneInput call site: 00001 njs_dprintf
5 533 njs_function_lambda_call call site: 00533 njs_throw_error
5 755 njs_object_enumerate_typed_array call site: 00755 njs_array_alloc
5 1069 njs_vmcode_proto_init call site: 01069 njs_vmcode_import
4 105 njs_error_alloc call site: 00105 njs_throw_error

Runtime coverage analysis

Covered functions
1249
Functions that are reachable but not covered
51
Reachable functions
363
Percentage of reachable functions covered
85.95%
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
external/njs_shell.c 16
src/njs_sprintf.c 5
src/njs_rbtree.c 7
src/njs_mp.c 16
src/njs_malloc.c 2
src/njs_vm.c 17
src/njs_regexp.c 6
external/njs_regex.c 8
src/njs_error.c 8
src/njs_builtin.c 2
src/njs_atom.c 4
src/njs_flathsh.c 12
src/njs_string.c 20
src/njs_utf8.c 5
src/njs_djb_hash.c 1
src/njs_trace.c 1
src/njs_object.c 15
src/njs_dtoa.c 35
src/njs_cutils.h 8
src/njs_number.c 3
src/njs_arr.c 5
src/njs_function.c 18
src/njs_symbol.c 3
src/njs_scope.c 2
src/njs_value.c 17
src/njs_module.c 3
src/njs_variable.c 6
src/njs_parser.c 8
src/njs_lexer.c 8
src/njs_object_prop.c 7
src/njs_async.c 1
src/njs_promise.c 5
src/njs_array.c 11
src/njs_vmcode.c 30
src/njs_utils.c 2
src/njs_typed_array.c 3
src/njs_array_buffer.c 1
src/njs_chb.c 9
src/njs_generator.c 7

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
njs_generate /src/njs/src/njs_generator.c 3 ['N/A', 'N/A', 'N/A'] 37 0 1044 141 7 369 0 4355 874
njs_ext_unwrap_key /src/njs/external/njs_webcrypto_module.c 5 ['N/A', 'N/A', 'int', 'size_t', 'N/A'] 42 0 407 58 24 381 0 4069 731
njs_date_constructor /src/njs/src/njs_date.c 5 ['N/A', 'N/A', 'int', 'size_t', 'N/A'] 36 0 663 78 30 264 0 3636 301
njs_engine_njs_process_events /src/njs/external/njs_shell.c 1 ['N/A'] 20 0 142 17 6 282 0 3653 273
njs_regexp_prototype_symbol_replace /src/njs/src/njs_regexp.c 5 ['N/A', 'N/A', 'int', 'size_t', 'N/A'] 37 0 2272 262 96 276 0 3622 245
njs_fs_readlink /src/njs/external/njs_fs_module.c 5 ['N/A', 'N/A', 'int', 'size_t', 'N/A'] 43 0 346 56 21 284 0 3622 222
njs_parser_property_definition /src/njs/src/njs_parser.c 3 ['N/A', 'N/A', 'N/A'] 40 0 2521 252 87 289 0 3756 215
njs_engine_njs_eval /src/njs/external/njs_shell.c 2 ['N/A', 'N/A'] 15 0 68 9 4 314 0 3914 205
njs_ext_wrap_key /src/njs/external/njs_webcrypto_module.c 5 ['N/A', 'N/A', 'int', 'size_t', 'N/A'] 42 0 295 40 17 371 0 3879 202
njs_json_stringify /src/njs/src/njs_json.c 5 ['N/A', 'N/A', 'int', 'size_t', 'N/A'] 49 0 693 98 34 262 0 3522 149

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

Functions statically reachable by fuzzers
41.0%
601 / 1479
Cyclomatic complexity statically reachable by fuzzers
47.0%
7253 / 15397

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

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
[] []
/src/njs/external/njs_crypto_module.c [] []
/src/njs/src/njs_lexer.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_value.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_utf8.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_djb_hash.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_cutils.h ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_utils.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_encoding.c [] []
/src/njs/src/njs_extern.c [] []
/src/njs/src/njs_string.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_math.c [] []
/src/njs/src/njs_disassembler.c [] []
/src/njs/src/njs_utils.h [] []
/src/njs/src/njs_dtoa.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_mp.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_number.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_generator.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_trace.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_json.c [] []
/src/njs/src/njs_scope.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_date.c [] []
/src/njs/external/njs_regex.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/external/njs_fs_module.c [] []
/src/njs/src/njs_array_buffer.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/external/njs_webcrypto_module.c [] []
/src/njs/src/njs_utf16.c [] []
/src/njs/src/njs_flathsh.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_random.c [] []
/src/njs/src/njs_iterator.c [] []
/src/njs/src/njs_async.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_boolean.c [] []
/src/njs/src/njs_chb.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_str.c [] []
/src/njs/src/njs_builtin.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_malloc.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_error.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_vm.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_typed_array.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/external/njs_query_string_module.c [] []
/src/njs/src/njs_object_prop.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_vmcode.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_arr.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_rbtree.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_buffer.c [] []
/src/njs/external/njs_zlib_module.c [] []
/src/njs/src/njs_sprintf.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_regexp.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_parser.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_module.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_promise.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_object.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_symbol.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_array.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_function.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_variable.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/external/njs_shell.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_atom.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']

Directories in report

Directory
/src/njs/src/
/src/njs/external/