AI Slop Code RIsk Monitor

ninja-build/ninja

a small build system with a focus on speed

16.6 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for ninja-build/ninja, a C++ project with 13,297 GitHub stars. SynthScan examined 12,206 lines of code across 79 source files, recording 161 pattern matches distributed across 11 syntactic categories. The legacy adjusted pattern signal is 16.6 (Elevated 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.

16.6
Adjusted Signal
16.6
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
13.3K
Stars
C++
Language
12.2K
Lines of Code
79
Files
161
Pattern Hits
2026-10-12
Scan Date
0.16
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 42.2/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 14.1/100 · LOW

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

Agent Over-Engineering Ratio 21.8/100 · LOW

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

PR Review Velocity Impact 60.7/100 · HIGH

Which changes need focused human review? 161 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 13MEDIUM 1LOW 147

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 161 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 Block94 hits · 94 pts
SeverityFileLineSnippetContext
LOWconfigure.py1#!/usr/bin/env python3COMMENT
LOWmisc/ninja_syntax_test.py1#!/usr/bin/env python3COMMENT
LOWmisc/measure.py1#!/usr/bin/env python3COMMENT
LOWmisc/jobserver_test.py1#!/usr/bin/env python3COMMENT
LOWmisc/ninja_syntax.py1#!/usr/bin/pythonCOMMENT
LOWmisc/jobserver_test_helper.py1#!/usr/bin/env python3COMMENT
LOWmisc/jobserver_pool.py1#!/usr/bin/env python3COMMENT
LOWmisc/jobserver_pool.py41#COMMENT
LOWmisc/output_test.py21default_env.pop('NINJA_STATUS', None)COMMENT
LOWmisc/output_test.py41 # [ '\r', 'FOO\x1b[K\r', 'BAR\x1b[K\r', 'ZOO\x1b[K\r\n' ]COMMENT
LOWmisc/oss-fuzz/build.sh1#!/bin/bash -euCOMMENT
LOWsrc/browse.py1#!/usr/bin/env python3COMMENT
LOWsrc/browse.py41except ImportError:COMMENT
LOWsrc/edit_distance.h1// Copyright 2011 Google Inc. All Rights Reserved.COMMENT
LOWsrc/graphviz.h1// Copyright 2011 Google Inc. All Rights Reserved.COMMENT
LOWsrc/manifest_parser.h1// Copyright 2011 Google Inc. All Rights Reserved.COMMENT
LOWsrc/version.h1// Copyright 2013 Google Inc. All Rights Reserved.COMMENT
LOWsrc/status.h1// Copyright 2016 Google Inc. All Rights Reserved.COMMENT
LOWsrc/jobserver_pool.h1// Copyright 2025 Google Inc. All Rights Reserved.COMMENT
LOWsrc/jobserver_pool.h21COMMENT
LOWsrc/build_log.h1// Copyright 2011 Google Inc. All Rights Reserved.COMMENT
LOWsrc/build_log.h21#include <string>COMMENT
LOWsrc/hash_map.h1// Copyright 2011 Google Inc. All Rights Reserved.COMMENT
LOWsrc/dyndep_parser.h1// Copyright 2015 Google Inc. All Rights Reserved.COMMENT
LOWsrc/includes_normalize.h1// Copyright 2012 Google Inc. All Rights Reserved.COMMENT
LOWsrc/clean.h1// Copyright 2011 Google Inc. All Rights Reserved.COMMENT
LOWsrc/clean.h41 int CleanTarget(const char* target);COMMENT
LOWsrc/dyndep.h1// Copyright 2015 Google Inc. All Rights Reserved.COMMENT
LOWsrc/exit_status.h1// Copyright 2011 Google Inc. All Rights Reserved.COMMENT
LOWsrc/build.h1// Copyright 2011 Google Inc. All Rights Reserved.COMMENT
LOWsrc/build.h121 /// Update plan with knowledge that the given node is up to date.COMMENT
LOWsrc/parser.h1// Copyright 2018 Google Inc. All Rights Reserved.COMMENT
LOWsrc/clparser.h1// Copyright 2015 Google Inc. All Rights Reserved.COMMENT
LOWsrc/clparser.h21/// Visual Studio's cl.exe requires some massaging to work with Ninja;COMMENT
LOWsrc/command_collector.h1// Copyright 2024 Google Inc. All Rights Reserved.COMMENT
LOWsrc/command_collector.h21COMMENT
LOWsrc/depfile_parser.h1// Copyright 2011 Google Inc. All Rights Reserved.COMMENT
LOWsrc/build_result.h1// Copyright 2026 Google Inc. All Rights Reserved.COMMENT
LOWsrc/elide_middle.h1// Copyright 2024 Google Inc. All Rights Reserved.COMMENT
LOWsrc/elide_middle.h21/// Elide the given string @a str with '...' in the middle if the lengthCOMMENT
LOWsrc/test.h1// Copyright 2011 Google Inc. All Rights Reserved.COMMENT
LOWsrc/inline.sh1#!/bin/shCOMMENT
LOWsrc/missing_deps.h1// Copyright 2019 Google Inc. All Rights Reserved.COMMENT
LOWsrc/string_piece.h1// Copyright 2011 Google Inc. All Rights Reserved.COMMENT
LOWsrc/eval_env.h1// Copyright 2011 Google Inc. All Rights Reserved.COMMENT
LOWsrc/graph.h1// Copyright 2011 Google Inc. All Rights Reserved.COMMENT
LOWsrc/graph.h481/// from the result, but are followed by the dependency walk.COMMENT
LOWsrc/status_printer.h1// Copyright 2016 Google Inc. All Rights Reserved.COMMENT
LOWsrc/msvc_helper.h1// Copyright 2011 Google Inc. All Rights Reserved.COMMENT
LOWsrc/deps_log.h1// Copyright 2012 Google Inc. All Rights Reserved.COMMENT
LOWsrc/deps_log.h21#include <stdio.h>COMMENT
LOWsrc/deps_log.h41/// help guide the design space. The total text in the files sums toCOMMENT
LOWsrc/gen_doxygen_mainpage.sh1#!/bin/shCOMMENT
LOWsrc/string_piece_util.h1// Copyright 2017 Google Inc. All Rights Reserved.COMMENT
LOWsrc/json.h1// Copyright 2021 Google Inc. All Rights Reserved.COMMENT
LOWsrc/load_status.h1// Copyright 2019 Google Inc. All Rights Reserved.COMMENT
LOWsrc/util.h1// Copyright 2011 Google Inc. All Rights Reserved.COMMENT
LOWsrc/util.h21#include <stdint.h>COMMENT
LOWsrc/util.h41COMMENT
LOWsrc/util.h101/// @return the load average of the machine. A negative value is returnedCOMMENT
34 more matches not shown…
Cross-Language Confusion7 hits · 35 pts
SeverityFileLineSnippetContext
HIGHmisc/output_test.py175 command = sleep $delay && echo $outSTRING
HIGH⚡misc/output_test.py363 command = touch $out && echo "$out: extra" > $depfileCODE
HIGH⚡misc/output_test.py370 [1/1] touch somewhere/out && echo "somewhere/out: extra" > somewhere_else/out.dCODE
HIGH⚡misc/output_test.py423build out3 : cat out2 out1 | implicit || order_onlyCODE
HIGHmisc/output_test.py635 build out: touch || ddCODE
HIGHmisc/output_test.py687build stamp-1: touch || dd-1STRING
HIGHmisc/output_test.py689build stamp-2: touch || dd-2STRING
Empty Error Handlers6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHconfigure.py257except OSError:CODE
HIGHconfigure.py384except Exception:CODE
HIGHmisc/ci.py43except UnicodeError:CODE
HIGHmisc/write_fake_manifests.py220except OSError:CODE
HIGHmisc/write_fake_manifests.py161except OSError:CODE
HIGHsrc/browse.py101except StopIteration:CODE
Hyper-Verbose Identifiers39 hits · 26 pts
SeverityFileLineSnippetContext
LOWmisc/ninja_syntax_test.py55 def test_short_words_indented(self) -> None:CODE
LOWmisc/ninja_syntax_test.py67 def test_few_long_words_indented(self) -> None:STRING
LOW⚡misc/ninja_syntax_test.py101 def test_embedded_dollar_dollar(self) -> None:STRING
LOW⚡misc/ninja_syntax_test.py110 def test_two_embedded_dollar_dollars(self) -> None:STRING
LOW⚡misc/ninja_syntax_test.py119 def test_leading_dollar_dollar(self) -> None:STRING
LOW⚡misc/ninja_syntax_test.py128 def test_trailing_dollar_dollar(self) -> None:STRING
LOWmisc/ninja_syntax_test.py146 def test_leading_ninja_variable_is_kept(self) -> None:STRING
LOWmisc/ninja_syntax_test.py158 def test_escapes_spaces_in_paths(self) -> None:STRING
LOWmisc/ninja_syntax_test.py163 def test_escapes_each_path_in_a_list(self) -> None:STRING
LOWmisc/ninja_syntax_test.py196 def test_dollar_in_build_paths(self) -> None:STRING
LOWmisc/ninja_syntax_test.py200 def test_ninja_variable_prefix_in_build_paths(self) -> None:STRING
LOWmisc/jobserver_test.py159def generate_double_build_plan(STRING
LOWmisc/jobserver_test.py198def get_spans_for_multiple_builds(build_dirs: T.List[str], command_counts: T.List[int]) -> T.List[T.Tuple[int, int]]:STRING
LOWmisc/jobserver_test.py224def compute_max_overlapped_spans(build_dir: str, command_count: int) -> int:STRING
LOWmisc/jobserver_test.py333 def test_jobserver_client_with_posix_fifo(self):STRING
LOWmisc/jobserver_test.py337 def test_jobserver_client_with_posix_pipe(self):STRING
LOWmisc/jobserver_test.py352 def run_ninja_with_jobserver_pipe(args):STRING
LOWmisc/jobserver_test.py376 def test_jobserver_client_with_posix_fifo_token_efficiency(self):STRING
LOWmisc/jobserver_test.py455 def test_jobserver_pool_mode_with_flag(self):STRING
LOWmisc/jobserver_test.py517 def test_jobserver_pool_mode_ignored_with_existing_pool(self):STRING
LOWmisc/jobserver_test.py529 def test_jobserver_pool_mode_with_variable(self):STRING
LOWmisc/ninja_syntax.py161 def _count_dollars_before_index(self, s: str, i: int) -> int:CODE
LOW⚡misc/output_test.py360 def test_depfile_directory_creation(self) -> None:STRING
LOW⚡misc/output_test.py380 def test_ninja_status_default(self) -> None:STRING
LOW⚡misc/output_test.py395 def test_status_flag_without_description(self) -> None:STRING
LOW⚡misc/output_test.py401 def test_status_flag_description_placement(self) -> None:STRING
LOW⚡misc/output_test.py407 def test_status_flag_unknown_variable(self) -> None:STRING
LOW⚡misc/output_test.py413 def test_entering_directory_on_stdout(self) -> None:STRING
LOWtests/compdb/test_compdb_validation.py45 def test_compdb_excludes_validation_edge(self):CODE
LOWtests/compdb/test_compdb_validation.py63 def test_compdb_with_rule_filter_excludes_validation(self):STRING
LOWtests/compdb/test_compdb_validation.py79 def test_compdb_keeps_non_validation_edge(self):STRING
LOWtests/compdb/test_compdb_validation.py97 def test_compdb_targets_excludes_validation_edge(self):STRING
LOWtests/compdb/test_compdb_validation.py113 def test_compdb_mixed_validation_and_input(self):STRING
LOWtests/builddir_target/test_builddir_target.py48 def test_exact_match_takes_priority(self):CODE
LOWtests/builddir_target/test_builddir_target.py75 def test_no_builddir_no_fallback(self):CODE
LOWtests/builddir_target/test_builddir_target.py89 def test_fallback_with_subdirectory(self):CODE
LOWtests/builddir_target/test_builddir_target.py105 def test_fallback_miss_still_errors(self):CODE
LOWtests/restat/test_restat_builddir.py30 def test_restat_with_builddir(self):CODE
LOWsrc/browse.py166class RequestHandler(httpserver.BaseHTTPRequestHandler):STRING
Deep Nesting6 hits · 6 pts
SeverityFileLineSnippetContext
LOWconfigure.py39CODE
LOWmisc/ninja_syntax.py170CODE
LOWmisc/jobserver_pool_test.py24CODE
LOWmisc/jobserver_pool.py240CODE
LOWsrc/browse.py69CODE
LOWsrc/browse.py134CODE
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMtests/restat/test_restat_builddir.py33 # Create a simple build.ninja file with builddirCOMMENT
Excessive Try-Catch Wrapping2 hits · 2 pts
SeverityFileLineSnippetContext
LOWconfigure.py384 except Exception:CODE
LOWmisc/ci.py22except Exception:CODE
AI Structural Patterns2 hits · 2 pts
SeverityFileLineSnippetContext
LOWmisc/ninja_syntax.py67CODE
LOWtests/builddir_target/test_builddir_target.py30CODE
Unused Imports2 hits · 2 pts
SeverityFileLineSnippetContext
LOWmisc/jobserver_pool_test.py10CODE
LOWmisc/jobserver_pool.py60CODE
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWmisc/jobserver_test.py33# Set this to True to debug command invocations.COMMENT
AI Slop Vocabulary1 hit · 2 pts
SeverityFileLineSnippetContext
LOWmisc/ninja_syntax.py187 # No such space; just use the first unescaped space we can find.COMMENT