Fuzz introspector
For issues and ideas: https://github.com/ossf/fuzz-introspector/issues

Fuzzer details

Fuzzer: fuzz_trace

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 29 31.1%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 64 68.8%
All colors 93 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
3 36 ...fuzz_trace.TestOneInput call site: 00036 opencensus.trace.span.BoundedDict.__init__
3 66 ...fuzz_trace.TestOneInput call site: 00066 fdp.ConsumeInt
3 88 opencensus.trace.span.format_span_json call site: 00088 aa.format_annotation_json
2 13 opencensus.trace.span_context.SpanContext._check_trace_id call site: 00013 opencensus.trace.span_context.generate_trace_id
2 16 opencensus.trace.span_context.SpanContext._check_trace_id call site: 00016 opencensus.trace.span_context.generate_trace_id
2 23 opencensus.trace.span_context.SpanContext._check_span_id call site: 00023 fdp.ConsumeIntInRange
2 31 opencensus.common.utils.to_iso_str call site: 00031 fdp.ConsumeIntInRange
2 62 ...fuzz_trace.TestOneInput call site: 00062 fdp.ConsumeIntInRange
2 85 opencensus.trace.attributes._format_attribute_value call site: 00085 .isinstance
1 7 opencensus.trace.trace_options.TraceOptions.check_trace_options call site: 00007 logging.warning
1 20 opencensus.trace.span_context.SpanContext._check_span_id call site: 00020 logging.warning
1 29 opencensus.trace.time_event.Annotation.__init__ call site: 00029 datetime.datetime.utcnow

Runtime coverage analysis

Covered functions
55
Functions that are reachable but not covered
29
Reachable functions
52
Percentage of reachable functions covered
44.23%
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_trace 10
opencensus.trace.span_context 9
opencensus.trace.trace_options 5
opencensus.trace.time_event 1
opencensus.common.utils 7
opencensus.trace.span 20
opencensus.trace.status 1
opencensus.trace.attributes 4

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
opencensus.trace.span.Span.__exit__ opencensus.trace.span 4 ['N/A', 'N/A', 'N/A', 'N/A'] 2 0 3 3 4 30 0 97 67
opencensus.trace.tracer.Tracer.__init__ opencensus.trace.tracer 5 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 2 0 1 4 5 27 0 91 43
opencensus.stats.aggregation_data.DistributionAggregationData.to_point opencensus.stats.aggregation_data 2 ['N/A', 'N/A'] 1 0 1 2 4 12 0 45 42
opencensus.common.monitored_resource.gcp_metadata_config.GcpMetadataConfig._initialize_metadata_service opencensus.common.monitored_resource.gcp_metadata_config 1 ['N/A'] 1 0 1 4 5 13 4 45 42
opencensus.stats.metric_utils.view_data_to_metric opencensus.stats.metric_utils 2 ['N/A', 'N/A'] 2 0 2 2 4 11 1 39 39
opencensus.trace.propagation.trace_context_http_header_format.TraceContextPropagator.from_headers opencensus.trace.propagation.trace_context_http_header_format 2 ['N/A', 'N/A'] 2 0 1 9 7 24 0 84 36

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

Functions statically reachable by fuzzers
12.0%
65 / 542
Cyclomatic complexity statically reachable by fuzzers
13.0%
231 / 1737

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 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
[] []
opencensus.common.backports [] []
opencensus.trace.tracers.noop_tracer [] []
opencensus.trace.blank_span [] []
opencensus.common.transports.sync [] []
opencensus.stats.aggregation_data [] []
hashlib [] []
opencensus.stats.view [] []
opencensus.trace.print_exporter [] []
opencensus.trace.trace_options ['fuzz_trace'] []
atheris [] []
collections [] []
opencensus.trace.integrations [] []
random [] []
opencensus.trace.propagation.b3_format [] []
opencensus.common.runtime_context [] []
datetime [] []
opencensus.metrics.export.summary [] []
urllib [] []
opencensus.trace [] []
opencensus.trace.samplers [] []
opencensus.trace.utils [] []
opencensus.metrics.export [] []
google [] []
opencensus.metrics.export.metric_producer [] []
opencensus.trace.propagation [] []
opencensus.metrics.export.cumulative [] []
opencensus.trace.propagation.google_cloud_format [] []
json [] []
opencensus.stats.metric_utils [] []
opencensus.trace.attributes_helper [] []
atexit [] []
opencensus.common.utils ['fuzz_trace'] []
opencensus.trace.propagation.tracestate_string_format [] []
opencensus.metrics.transport [] []
opencensus.trace.status ['fuzz_trace'] []
opencensus.common.monitored_resource.monitored_resource [] []
opencensus.stats.view_manager [] []
opencensus.metrics.export.time_series [] []
opencensus.common.schedule [] []
opencensus.tags.tag_key [] []
opencensus.trace.span_data [] []
copy [] []
opencensus.stats.execution_context [] []
opencensus.trace.stack_trace [] []
...fuzz_trace ['fuzz_trace'] []
opencensus.metrics.label_value [] []
opencensus.trace.propagation.binary_format [] []
opencensus.tags.tag_value [] []
opencensus.tags.tag_map [] []
opencensus.common.version [] []
opencensus.trace.propagation.text_format [] []
opencensus.trace.link [] []
opencensus.trace.base_exporter [] []
opencensus.stats.base_exporter [] []
itertools [] []
opencensus.trace.time_event ['fuzz_trace'] []
traceback [] []
opencensus.common.transports.base [] []
binascii [] []
opencensus.stats.measure_to_view_map [] []
opencensus.stats.aggregation [] []
opencensus.common.transports [] []
opencensus.stats.measure [] []
opencensus.stats.view_data [] []
opencensus.trace.tracer [] []
opencensus.trace.execution_context [] []
opencensus.trace.exceptions_status [] []
contextvars [] []
opencensus.metrics.export.point [] []
six [] []
opencensus.tags.propagation [] []
opencensus.common.resource [] []
opencensus.trace.file_exporter [] []
opencensus.metrics.export.gauge [] []
opencensus.stats.bucket_boundaries [] []
opencensus.stats.measurement_map [] []
urllib2 [] []
opencensus.metrics.export.value [] []
time [] []
os [] []
calendar [] []
opencensus.common.transports.async_ [] []
opencensus.trace.base_span [] []
opencensus.tags [] []
opencensus.trace.span ['fuzz_trace'] []
opencensus.metrics.export.metric [] []
opencensus.trace.attributes ['fuzz_trace'] []
struct [] []
opencensus.stats.stats_recorder [] []
opencensus.common.http_handler [] []
logging [] []
threading [] []
opencensus.stats [] []
opencensus.common.monitored_resource.aws_identity_doc_utils [] []
opencensus.trace.config_integration [] []
opencensus [] []
opencensus.tags.validation [] []
opencensus.tags.tag [] []
opencensus.common.monitored_resource.gcp_metadata_config [] []
opencensus.common.configuration [] []
opencensus.metrics [] []
opencensus.trace.logging_exporter [] []
opencensus.trace.span_context ['fuzz_trace'] []
opencensus.tags.propagation.binary_serializer [] []
opencensus.metrics.export.metric_descriptor [] []
opencensus.common [] []
opencensus.trace.tracestate [] []
opencensus.trace.propagation.trace_context_http_header_format [] []
opencensus.trace.tracers [] []
opencensus.trace.tracers.context_tracer [] []
opencensus.trace.tracers.base [] []
opencensus.stats.measurement [] []
opencensus.log [] []
re [] []
opencensus.common.monitored_resource [] []
opencensus.metrics.label_key [] []
importlib [] []
[] []
opencensus.stats.stats [] []
opencensus.common.monitored_resource.k8s_utils [] []
weakref [] []

Directories in report

Directory