High-level tracing language for Linux
This report summarizes scanner evidence for bpftrace/bpftrace, a C++ project with 10,399 GitHub stars. SynthScan examined 143,068 lines of code across 652 source files, recording 385 pattern matches distributed across 9 syntactic categories. The legacy adjusted pattern signal is 2.8 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 374 finding(s).
Are imports declared and package/API names verified? 2 finding(s).
Are wrappers, guards, and repeated structures necessary? 12 finding(s).
Which changes need focused human review? 385 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 385 distinct pattern matches across 9 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/async_action.cpp | 1 | #include <regex> | COMMENT |
| LOW | tests/utils.cpp | 1 | #include <climits> | COMMENT |
| LOW | tests/type_resolver.cpp | 1 | #include <gmock/gmock-matchers.h> | COMMENT |
| LOW | tests/child.cpp | 1 | #include <csignal> | COMMENT |
| LOW | tests/portability_analyser.cpp | 1 | #include "ast/passes/portability_analyser.h" | COMMENT |
| LOW | tests/field_analyser.cpp | 1 | #include "ast/passes/field_analyser.h" | COMMENT |
| LOW | tests/probe.cpp | 1 | #include "ast/passes/ap_probe_expansion.h" | COMMENT |
| LOW | tests/bpftrace.cpp | 1 | #include <chrono> | COMMENT |
| LOW | tests/required_resources.cpp | 1 | #include <iostream> | COMMENT |
| LOW | tests/type_checker.cpp | 1 | #include <gmock/gmock-matchers.h> | COMMENT |
| LOW | tests/clang_parser.cpp | 1 | #include <llvm/Config/llvm-config.h> | COMMENT |
| LOW | tests/mocks.h | 1 | #pragma once | COMMENT |
| LOW | tests/pre_type_check.cpp | 1 | #include <gmock/gmock-matchers.h> | COMMENT |
| LOW | tests/parser.cpp | 1 | #include <climits> | COMMENT |
| LOW | tests/include/libbpf-usdt/usdt.h | 301 | COMMENT | |
| LOW | tests/include/libbpf-usdt/usdt.h | 321 | #define USDT_NOP nop | COMMENT |
| LOW | tests/include/libbpf-usdt/usdt.h | 341 | #ifdef __usdt_va_opt | COMMENT |
| LOW | tests/include/libbpf-usdt/usdt.h | 361 | #define __usdt_asm5(x, ...) __usdt_str(x) "," __usdt_asm4(__VA_ARGS__) | COMMENT |
| LOW | tests/include/libbpf-usdt/usdt.h | 461 | #define __usdt_argref(id) %I[id]%[id] | COMMENT |
| LOW | tests/include/libbpf-usdt/usdt.h | 521 | __usdt_maybe_signed(wchar_t); | COMMENT |
| LOW | tests/include/libbpf-usdt/usdt.h | 541 | #define __usdt_asm_ops6(a,b,c,d,e,x) __usdt_asm_ops5(a,b,c,d,e), __usdt_asm_op(6, x) | COMMENT |
| LOW | tests/testlibs/usdt_tp.h | 1 | #ifndef _USDTLIBX_H_ | COMMENT |
| LOW | tests/testprogs/mountns_pivot_wrapper.c | 1 | #ifndef _GNU_SOURCE | COMMENT |
| LOW | tests/testprogs/syscall.c | 1 | #include <ctype.h> | COMMENT |
| LOW | tests/testprogs/mountns_wrapper.c | 1 | #ifndef _GNU_SOURCE | COMMENT |
| LOW | docs/language.md | 2101 | COMMENT | |
| LOW | scripts/clang_tidy.sh | 61 | # to keep it simple. | COMMENT |
| LOW | scripts/create-assets.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/sync_headers.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | src/async_action.cpp | 1 | #include <fstream> | COMMENT |
| LOW | src/struct.cpp | 1 | #include <algorithm> | COMMENT |
| LOW | src/bpfbytecode.h | 1 | #pragma once | COMMENT |
| LOW | src/bfd-disasm.cpp | 1 | #include <fcntl.h> | COMMENT |
| LOW | src/btf.cpp | 1 | #include "scopeguard.h" | COMMENT |
| LOW | src/btf.cpp | 21 | #pragma GCC diagnostic pop | COMMENT |
| LOW | src/btf.cpp | 541 | // string.GetSize() will return len + 1, which is a mismatch with the actual | COMMENT |
| LOW | src/types.h | 1 | #pragma once | COMMENT |
| LOW | src/run_bpftrace.cpp | 1 | #include <csignal> | COMMENT |
| LOW | src/globalvars.cpp | 1 | #include <bpf/bpf.h> | COMMENT |
| LOW | src/btf.h | 1 | #pragma once | COMMENT |
| LOW | src/bpftrace.cpp | 1 | #include "bpfbytecode.h" | COMMENT |
| LOW | src/bpftrace.cpp | 21 | #include <ranges> | COMMENT |
| LOW | src/bpftrace.cpp | 41 | #include "bpftrace.h" | COMMENT |
| LOW | src/bpffeature.cpp | 1 | #include "bpffeature.h" | COMMENT |
| LOW | src/usyms.cpp | 1 | #include "types.h" | COMMENT |
| LOW | src/required_resources.h | 1 | #pragma once | COMMENT |
| LOW | src/required_resources.h | 141 | COMMENT | |
| LOW | src/attached_probe.cpp | 1 | #ifndef _GNU_SOURCE | COMMENT |
| LOW | src/attached_probe.cpp | 21 | #include <bpf/libbpf.h> | COMMENT |
| LOW | src/probe_matcher.cpp | 1 | #include <algorithm> | COMMENT |
| LOW | src/bpftrace.h | 1 | #pragma once | COMMENT |
| LOW | src/bpftrace.h | 21 | #include "bpfbytecode.h" | COMMENT |
| LOW | src/bpfbytecode.cpp | 1 | #include "bpfbytecode.h" | COMMENT |
| LOW | src/bpfbytecode.cpp | 141 | COMMENT | |
| LOW | src/log.h | 121 | : LogStream(file, line, LogType::BUG, out) {}; | COMMENT |
| LOW | src/log.h | 141 | #define LOGSTREAM_ERROR(...) LOGSTREAM_COMMON(__VA_ARGS__) | COMMENT |
| LOW | src/parser.cpp | 1 | #include "parser.h" | COMMENT |
| LOW | src/main.cpp | 1 | #include <bpf/libbpf.h> | COMMENT |
| LOW | src/main.cpp | 21 | #include "ast/passes/clang_build.h" | COMMENT |
| LOW | src/main.cpp | 41 | #include "build_info.h" | COMMENT |
| 295 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/runtime/engine/runner.py | 296 | except Exception as err: | CODE |
| MEDIUM | tests/runtime/engine/runner.py | 254 | def check_expect(expect, output): | CODE |
| MEDIUM | scripts/generate_stdlib_docs.py | 74 | print(f"Error: File '{file_path}' not found.") | CODE |
| MEDIUM⚡ | scripts/generate_stdlib_docs.py | 136 | print(f"Error: Permission denied to read '{file_path}'.") | CODE |
| MEDIUM⚡ | scripts/generate_stdlib_docs.py | 139 | print(f"Error: Unable to decode '{file_path}' as UTF-8.") | CODE |
| MEDIUM⚡ | scripts/generate_stdlib_docs.py | 142 | print(f"Error: Missing :summary for helper '{e}' in '{file_path}'.") | CODE |
| MEDIUM⚡ | scripts/generate_stdlib_docs.py | 145 | print(f"Error: Missing :variant or :deprecated_variant for helper '{e}' in '{file_path}'.") | CODE |
| LOW⚡ | scripts/generate_stdlib_docs.py | 147 | except Exception as e: | CODE |
| MEDIUM⚡ | scripts/generate_stdlib_docs.py | 148 | print(f"Error reading file '{file_path}': {e}") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/runtime/engine/runner.py | 96 | CODE | |
| LOW | tests/runtime/engine/runner.py | 171 | CODE | |
| LOW | tests/runtime/engine/runner.py | 215 | CODE | |
| LOW | tests/runtime/engine/runner.py | 254 | CODE | |
| LOW | tests/runtime/engine/parser.py | 62 | CODE | |
| LOW | tests/runtime/engine/parser.py | 92 | CODE | |
| LOW | tests/runtime/engine/parser.py | 135 | CODE | |
| LOW | scripts/generate_stdlib_docs.py | 70 | CODE | |
| LOW | scripts/generate_stdlib_docs.py | 151 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/stdlib/include/linux/netlink.h | 67 | #define NLM_F_DUMP_FILTERED 0x20 /* Dump was filtered as requested */ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/shellcheck.sh | 6 | # Example usage: | COMMENT |
| LOW | scripts/clang_tidy.sh | 6 | # Example usage: | COMMENT |
| LOW | scripts/bpftrace_tidy.sh | 6 | # Example usage: | COMMENT |
| LOW | scripts/sync_headers.sh | 16 | # Example usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/runtime/engine/runner.py | 504 | def print_befores_and_after_output(): | CODE |
| LOW | scripts/generate_stdlib_docs.py | 39 | def parse_deprecated_variant_string(line: str) -> Optional[str]: | CODE |
| LOW | scripts/generate_stdlib_docs.py | 51 | def parse_function_name_string(line: str) -> Optional[str]: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/runtime/engine/main.py | 4 | CODE | |
| LOW | .github/include/ci.py | 25 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/runtime/engine/parser.py | 113 | # Check if test should run based on ARCH directive | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/ast/passes/fold_literals.cpp | 706 | // First, we need to check if this directly wraps a positional parameter. | COMMENT |