AI Slop Code RIsk Monitor

nanopb/nanopb

Protocol Buffers with small code size

4.8 Low pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for nanopb/nanopb, a C project with 5,577 GitHub stars. SynthScan examined 30,556 lines of code across 258 source files, recording 112 pattern matches distributed across 11 syntactic categories. The legacy adjusted pattern signal is 4.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.

4.8
Adjusted Signal
4.8
Raw Pattern Score
100%
Time Factor
2026-10-09
Last Push
5.6K
Stars
C
Language
30.6K
Lines of Code
258
Files
112
Pattern Hits
2026-10-12
Scan Date
0.02
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 12.4/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 86 finding(s).

Hallucinated Dependency & Supply Chain Risk 1.1/100 · LOW

Are imports declared and package/API names verified? 9 finding(s).

Agent Over-Engineering Ratio 10.6/100 · LOW

Are wrappers, guards, and repeated structures necessary? 31 finding(s).

PR Review Velocity Impact 22.8/100 · LOW

Which changes need focused human review? 112 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 4MEDIUM 13LOW 95

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 112 distinct pattern matches across 11 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.

Over-Commented Block45 hits · 44 pts
SeverityFileLineSnippetContext
LOWpb.h81 * - boolCOMMENT
LOWpb.h101#ifdef __cplusplusCOMMENT
LOWpb.h121# define PB_PACKED_STRUCT_END _Pragma("pack(pop)")COMMENT
LOWpb.h141# elseCOMMENT
LOWpb.h201# define PB_STATIC_ASSERT(COND,MSG) static_assert(COND,#MSG);COMMENT
LOWpb.h661#define PB_DO_PB_HTYPE_REQUIRED(structname, fieldname) offsetof(structname, fieldname)COMMENT
LOWpb.h681#define PB_SO_PTR_PB_HTYPE_ONEOF(structname, fieldname) PB_SO_PB_HTYPE_ONEOF(structname, fieldname)COMMENT
LOWpb.h701#define PB_AS_PTR_PB_HTYPE_REQUIRED(structname, fieldname) 1COMMENT
LOWpb.h721#define PB_DS_PTR_PB_HTYPE_REPEATED(structname, fieldname) pb_membersize(structname, fieldname[0])COMMENT
LOWpb.h741#define PB_SUBMSG_INFO_ONEOF(ltype, structname, fieldname) PB_SUBMSG_INFO_ONEOF2(ltype, structname, PB_ONEOF_NAME(UNION,COMMENT
LOWpb.h861#define PB_FI_WIDTH_PB_HTYPE_OPTIONAL(ltype) PB_FI_WIDTH ## ltypeCOMMENT
LOWpb.h881#define PB_FI_WIDTH_PB_LTYPE_STRING 2COMMENT
LOWpb.h921 */COMMENT
LOWpb_decode.h61};COMMENT
LOWspm-test/objc/objc-qualified.m1#import "nanopb/pb.h"COMMENT
LOWspm-test/objc/c-header.c1#include "pb.h"COMMENT
LOWspm-test/objc/objc-header.m1#import "pb.h"COMMENT
LOWtests/without_64bit/no_64bit_syshdr.h1/* This wrapper undefines (u)int64_t */COMMENT
LOWtests/fuzztest/fuzztest.c1/* Fuzz testing for the nanopb core.COMMENT
LOWtests/fuzztest/fuzztest.c21#include "test_helpers.h"COMMENT
LOWtests/fuzztest/generate_message.c1/* Generates a random, valid protobuf message. Useful to seedCOMMENT
LOWtests/common/test_helpers.h1/* Compatibility helpers for the test programs. */COMMENT
LOWtests/common/malloc_wrappers_syshdr.h1/* This is just a wrapper in order to get our own malloc wrappers into nanopb core. */COMMENT
LOWtests/backwards_compatibility/alltypes_legacy.h161COMMENT
LOWtests/backwards_compatibility/alltypes_legacy.h181#define Limits_enum_min_tag 9COMMENT
LOWtests/backwards_compatibility/alltypes_legacy.h201#define AllTypes_req_submsg_tag 16COMMENT
LOWtests/backwards_compatibility/alltypes_legacy.h221#define AllTypes_opt_int64_tag 42COMMENT
LOWtests/site_scons/platforms/avr/run_test.c1#include <unistd.h>COMMENT
LOWgenerator/nanopb_generator.py1061 if encsize and encsize.symbols and external:COMMENT
LOWspm_headers/nanopb/pb.h81 * - boolCOMMENT
LOWspm_headers/nanopb/pb.h101#ifdef __cplusplusCOMMENT
LOWspm_headers/nanopb/pb.h121# define PB_PACKED_STRUCT_END _Pragma("pack(pop)")COMMENT
LOWspm_headers/nanopb/pb.h141# elseCOMMENT
LOWspm_headers/nanopb/pb.h201# define PB_STATIC_ASSERT(COND,MSG) static_assert(COND,#MSG);COMMENT
LOWspm_headers/nanopb/pb.h661#define PB_DO_PB_HTYPE_REQUIRED(structname, fieldname) offsetof(structname, fieldname)COMMENT
LOWspm_headers/nanopb/pb.h681#define PB_SO_PTR_PB_HTYPE_ONEOF(structname, fieldname) PB_SO_PB_HTYPE_ONEOF(structname, fieldname)COMMENT
LOWspm_headers/nanopb/pb.h701#define PB_AS_PTR_PB_HTYPE_REQUIRED(structname, fieldname) 1COMMENT
LOWspm_headers/nanopb/pb.h721#define PB_DS_PTR_PB_HTYPE_REPEATED(structname, fieldname) pb_membersize(structname, fieldname[0])COMMENT
LOWspm_headers/nanopb/pb.h741#define PB_SUBMSG_INFO_ONEOF(ltype, structname, fieldname) PB_SUBMSG_INFO_ONEOF2(ltype, structname, PB_ONEOF_NAME(UNION,COMMENT
LOWspm_headers/nanopb/pb.h861#define PB_FI_WIDTH_PB_HTYPE_OPTIONAL(ltype) PB_FI_WIDTH ## ltypeCOMMENT
LOWspm_headers/nanopb/pb.h881#define PB_FI_WIDTH_PB_LTYPE_STRING 2COMMENT
LOWspm_headers/nanopb/pb.h921 */COMMENT
LOWspm_headers/nanopb/pb_decode.h61};COMMENT
LOWextra/pb_syshdr.h41COMMENT
LOW.github/workflows/codeql.yml1# For most projects, this workflow file will not need changing; you simply needCOMMENT
Decorative Section Separators12 hits · 37 pts
SeverityFileLineSnippetContext
MEDIUM⚡generator/nanopb_generator.py1332# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡generator/nanopb_generator.py1334# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡generator/nanopb_generator.py2389# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡generator/nanopb_generator.py2391# ---------------------------------------------------------------------------COMMENT
MEDIUMgenerator/nanopb_generator.py1213# ---------------------------------------------------------------------------COMMENT
MEDIUMgenerator/nanopb_generator.py1215# ---------------------------------------------------------------------------COMMENT
MEDIUMgenerator/nanopb_generator.py1750# ---------------------------------------------------------------------------COMMENT
MEDIUMgenerator/nanopb_generator.py1752# ---------------------------------------------------------------------------COMMENT
MEDIUMgenerator/nanopb_generator.py2500# ---------------------------------------------------------------------------COMMENT
MEDIUMgenerator/nanopb_generator.py2502# ---------------------------------------------------------------------------COMMENT
MEDIUMgenerator/nanopb_generator.py73# ---------------------------------------------------------------------------STRING
MEDIUMgenerator/nanopb_generator.py75# ---------------------------------------------------------------------------STRING
Empty Error Handlers4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHtests/site_scons/site_init.py22except ImportError:CODE
HIGHgenerator/platformio_generator.py76except FileExistsError:CODE
HIGHgenerator/platformio_generator.py81except FileExistsError:CODE
HIGHgenerator/platformio_generator.py163except FileNotFoundError:CODE
Hyper-Verbose Identifiers13 hits · 10 pts
SeverityFileLineSnippetContext
LOWtests/regression/issue_954/test_options_diagnostics.py48def expect_comment_markers_in_strings():CODE
LOW⚡generator/nanopb_generator.py1329 def requires_custom_field_callback(self):CODE
LOW⚡generator/nanopb_generator.py2395def validate_options_namemask(namemask, filename, line_number):CODE
LOWgenerator/nanopb_generator.py537 def enum_to_string_definition(self):CODE
LOWgenerator/nanopb_generator.py1120 def requires_custom_field_callback(self):CODE
LOWgenerator/nanopb_generator.py1146 def requires_custom_field_callback(self):CODE
LOWgenerator/nanopb_generator.py1592 def fields_declaration_cpp_lookup(self, local_defines):CODE
LOWgenerator/nanopb_generator.py1628 def required_descriptor_width(self, dependencies):CODE
LOWgenerator/nanopb_generator.py1785def check_recursive_dependencies(message, all_messages, root = None):CODE
LOWgenerator/nanopb_generator.py2023 def discard_unused_automatic_types(self):CODE
LOW.github/workflows/fail_on_error.py7def codeql_sarif_contain_error(filename):CODE
LOWbuild-tests/platformio/test_platformio_generator.py104 def test_options_cache_tracks_create_modify_and_delete(self):CODE
LOWbuild-tests/platformio/test_platformio_generator.py138 def test_failed_regeneration_keeps_deleted_options_marker(self):CODE
Deep Nesting18 hits · 10 pts
SeverityFileLineSnippetContext
LOWtests/site_scons/site_init.py30CODE
LOWtests/site_scons/site_init.py105CODE
LOWgenerator/nanopb_generator.py1785CODE
LOWgenerator/nanopb_generator.py2462CODE
LOWgenerator/nanopb_generator.py2681CODE
LOWgenerator/nanopb_generator.py2740CODE
LOWgenerator/nanopb_generator.py603CODE
LOWgenerator/nanopb_generator.py794CODE
LOWgenerator/nanopb_generator.py857CODE
LOWgenerator/nanopb_generator.py994CODE
LOWgenerator/nanopb_generator.py1043CODE
LOWgenerator/nanopb_generator.py1292CODE
LOWgenerator/nanopb_generator.py1363CODE
LOWgenerator/nanopb_generator.py1672CODE
LOWgenerator/nanopb_generator.py1875CODE
LOWgenerator/nanopb_generator.py2045CODE
LOWgenerator/nanopb_generator.py2080CODE
LOW.github/workflows/fail_on_error.py7CODE
Redundant / Tautological Comments7 hits · 10 pts
SeverityFileLineSnippetContext
LOWgenerator/nanopb_generator.py695 # Check if the field can be implemented with static allocationCOMMENT
LOWgenerator/nanopb_generator.py2277 # Check if there is any name mangling activeCOMMENT
LOWgenerator/nanopb_generator.py2326 # Check if any messages exceed the 64 kB limit of 16-bit pb_size_tCOMMENT
LOWgenerator/nanopb_generator.py2646 # Check if there is a separate .options fileCOMMENT
LOWgenerator/nanopb_generator.py2724 # Check if there were any lines in .options that did not match a memberCOMMENT
LOWgenerator/nanopb_generator.py2889 # Check if we are running as a plugin under protocCOMMENT
LOWgenerator/platformio_generator.py35# Check if 'custom_nanopb_project_dir' is defined, else default to $PROJECT_DIRCOMMENT
Unused Imports9 hits · 7 pts
SeverityFileLineSnippetContext
LOWconanfile.py1CODE
LOWtests/site_scons/site_tools/nanopb.py34CODE
LOWtests/site_scons/site_tools/nanopb.py36CODE
LOWgenerator/nanopb_generator.py4CODE
LOWgenerator/nanopb_generator.py14CODE
LOWgenerator/nanopb_generator.py15CODE
LOWgenerator/nanopb_generator.py18CODE
LOWgenerator/platformio_generator.py18CODE
LOWgenerator/platformio_generator.py27CODE
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMgenerator/nanopb_generator.py520 # Define the long names always so that enum value referencesCOMMENT
AI Slop Vocabulary1 hit · 2 pts
SeverityFileLineSnippetContext
LOWgenerator/nanopb_generator.py1064 # just use the #define SubMessage_size from the header.COMMENT
Excessive Try-Catch Wrapping1 hit · 0 pts
SeverityFileLineSnippetContext
LOWgenerator/nanopb_generator.py2453 except Exception as e:CODE
AI Structural Patterns1 hit · 0 pts
SeverityFileLineSnippetContext
LOWgenerator/nanopb_generator.py1626CODE