Repository Analysis

pi-hole/pi-hole

A black hole for Internet advertisements

24.6 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of pi-hole/pi-hole, a Shell project with 59,837 GitHub stars. SynthScan v2.0 examined 8,914 lines of code across 53 source files, recording 112 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 24.6 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

24.6
Adjusted Score
24.6
Raw Score
100%
Time Factor
2026-07-11
Last Push
59.8K
Stars
Shell
Language
8.9K
Lines of Code
53
Files
112
Pattern Hits
2026-07-14
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 0MEDIUM 41LOW 71

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 112 distinct pattern matches across 7 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Self-Referential Comments25 hits · 75 pts
SeverityFileLineSnippetContext
MEDIUMgravity.sh10# This file is copyright under the latest version of the EUPL.COMMENT
MEDIUMgravity.sh189 # Create a temporary file with random filename with '.gravity' suffix.COMMENT
MEDIUMgravity.sh621 # Create a temporary file with random filename with '.phgpb' suffix.COMMENT
MEDIUMgravity.sh769 # Define the generic error messageCOMMENT
MEDIUMadvanced/Scripts/utils.sh9# This file is copyright under the latest version of the EUPL.COMMENT
MEDIUMadvanced/Scripts/piholeNetworkFlush.sh9# This file is copyright under the latest version of the EUPL.COMMENT
MEDIUMadvanced/Scripts/api.sh9# This file is copyright under the latest version of the EUPL.COMMENT
MEDIUMadvanced/Scripts/piholeLogFlush.sh8# This file is copyright under the latest version of the EUPL.COMMENT
MEDIUMadvanced/Scripts/updatecheck.sh8# This file is copyright under the latest version of the EUPL.COMMENT
MEDIUMadvanced/Scripts/piholeCheckout.sh8# This file is copyright under the latest version of the EUPL.COMMENT
MEDIUMadvanced/Scripts/update.sh10# This file is copyright under the latest version of the EUPL.COMMENT
MEDIUMadvanced/Scripts/piholeDebug.sh8# This file is copyright under the latest version of the EUPL.COMMENT
MEDIUMadvanced/Scripts/piholeDebug.sh144 # Create a random temporary file for the logCOMMENT
MEDIUMadvanced/Scripts/piholeDebug.sh565 # Create an array for these ports in useCOMMENT
MEDIUMadvanced/Scripts/query.sh9# This file is copyright under the latest version of the EUPL.COMMENT
MEDIUMadvanced/Scripts/list.sh9# This file is copyright under the latest version of the EUPL.COMMENT
MEDIUMadvanced/Scripts/version.sh8# This file is copyright under the latest version of the EUPL.COMMENT
MEDIUMadvanced/Scripts/database_migration/gravity-db.sh10# This file is copyright under the latest version of the EUPL.COMMENT
MEDIUMautomated install/uninstall.sh8# This file is copyright under the latest version of the EUPL.COMMENT
MEDIUMautomated install/basic-install.sh9# This file is copyright under the latest version of the EUPL.COMMENT
MEDIUMautomated install/basic-install.sh334 # Create a fresh build directory with random nameCOMMENT
MEDIUMautomated install/basic-install.sh1117 # Create an empty adList file with appropriate permissions.COMMENT
MEDIUMautomated install/basic-install.sh1430 # Create a command from the package cache variableCOMMENT
MEDIUMautomated install/basic-install.sh2152 # Create a random temporary file for the logCOMMENT
MEDIUMautomated install/basic-install.sh2381 # Create the pihole userCOMMENT
Redundant / Tautological Comments38 hits · 57 pts
SeverityFileLineSnippetContext
LOWgravity.sh146 # Check if the backup directory existsCOMMENT
LOWgravity.sh222 # Read file line by lineCOMMENT
LOWgravity.sh258# Check if a column with name ${2} exists in gravity table with name ${1}COMMENT
LOWgravity.sh311 # Check if gravity database needs to be updatedCOMMENT
LOWgravity.sh339 # Check if gravity database needs to be updatedCOMMENT
LOWgravity.sh387 # Check if a backup existsCOMMENT
LOWgravity.sh523 # Check if etag is supported by the locally available version of curlCOMMENT
LOWgravity.sh550 # Check if we can write to the save location file without actually creatingCOMMENT
LOWgravity.sh661 # Check if this domain is blocked by Pi-hole but only if the domain is not aCOMMENT
LOWgravity.sh668 # Check if this IP matches any IP of the systemCOMMENT
LOWgravity.sh732 # Check if the file exists and is a regular file (i.e. not a socket, fifo, tty, block). Might still be a symlink.COMMENT
LOWgravity.sh775 # Check if the installed curl version supports the "-w %{errormsg}" option.COMMENT
LOWgravity.sh852 # Check if $listCurlBuffer is a non-zero length fileCOMMENT
LOWgravity.sh1158# Check if DNS is available, no need to do any database manipulation if we're not able to download adlistsCOMMENT
LOWadvanced/Scripts/api.sh78 # Check if 2FA is requiredCOMMENT
LOWadvanced/Scripts/piholeCheckout.sh47 # Check if FTL is installed - do this early on as FTL is a hard dependency for Pi-holeCOMMENT
LOWadvanced/Scripts/piholeCheckout.sh169 # Check if requested branch is availableCOMMENT
LOWadvanced/Scripts/piholeDebug.sh330 # Check if a SELinux configuration file existsCOMMENT
LOWadvanced/Scripts/piholeDebug.sh361 # Check if FirewallD service is enabledCOMMENT
LOWadvanced/Scripts/piholeDebug.sh475 # Check if we are using IPv4 or IPv6COMMENT
LOWadvanced/Scripts/piholeDebug.sh594 # Check if the right services are using the right portsCOMMENT
LOWadvanced/Scripts/piholeDebug.sh712 # Check if Pi-hole can use itself to block a domainCOMMENT
LOWadvanced/Scripts/piholeDebug.sh922 # Check if the file we want to view has a limit (because sometimes we just need a little bit of infoCOMMENT
LOWadvanced/Scripts/piholeDebug.sh945 # Check if the directory existsCOMMENT
LOWadvanced/Scripts/piholeDebug.sh1276 # Check if tricorder.pi-hole.net is reachable and provide tokenCOMMENT
LOWautomated install/basic-install.sh456 # Display the message and use the color table to preface the message with an "info" indicatorCOMMENT
LOWautomated install/basic-install.sh533 # Check if the directory is a repositoryCOMMENT
LOWautomated install/basic-install.sh751 # Check if it's ULA, GUA, or LL by using the function created earlierCOMMENT
LOWautomated install/basic-install.sh1407 # Check if Systemd-resolved's DNSStubListener is enabled and active on port 53COMMENT
LOWautomated install/basic-install.sh1545# Check if the pihole user exists and create if it does notCOMMENT
LOWautomated install/basic-install.sh1723 # Check if the download exists and we can reach the serverCOMMENT
LOWautomated install/basic-install.sh2097 # Check if the installed version matches the latest versionCOMMENT
LOWautomated install/basic-install.sh2199 # Check if lighttpd is installedCOMMENT
LOWautomated install/basic-install.sh2240 # Print the output of the FTL migration prefacing every line with fourCOMMENT
LOWautomated install/basic-install.sh2304 # Check if SELinux is Enforcing and exit before doing anything elseCOMMENT
LOWautomated install/basic-install.sh2310 # Check if this is a fresh install or an update/repairCOMMENT
LOWautomated install/basic-install.sh2336 # Check if there is a usable FTL binary available on this architecture - doCOMMENT
LOWautomated install/basic-install.sh2428 # Check if gravity database needs to be upgraded. If so, do it without rebuildingCOMMENT
Decorative Section Separators16 hits · 54 pts
SeverityFileLineSnippetContext
MEDIUMtest/run.sh7# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/run.sh9# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/run.sh52# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/run.sh54# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/run.sh86# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/run.sh94# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/run.sh107# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/run.sh112# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/run.sh120# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/run.sh122# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/run.sh138# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/run.sh140# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/run.sh151# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/run.sh154# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/run.sh169# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/run.sh171# ---------------------------------------------------------------------------COMMENT
Over-Commented Block27 hits · 24 pts
SeverityFileLineSnippetContext
LOWgravity.sh1#!/usr/bin/env bashCOMMENT
LOWgravity.sh621 # Create a temporary file with random filename with '.phgpb' suffix.COMMENT
LOWgravity.sh781 # (see https://github.com/pi-hole/pi-hole/issues/6615)COMMENT
LOWgravity.sh1041# Usage:COMMENT
LOWadvanced/Scripts/utils.sh1#!/usr/bin/env shCOMMENT
LOWadvanced/Scripts/utils.sh41COMMENT
LOWadvanced/Scripts/utils.sh101 # -s: FILE exists and has a size greater than zeroCOMMENT
LOWadvanced/Scripts/utils.sh121 # Pipe to cat to avoid pihole-FTL assuming this is an interactive commandCOMMENT
LOWadvanced/Scripts/piholeNetworkFlush.sh1#!/usr/bin/env bashCOMMENT
LOWadvanced/Scripts/api.sh1#!/usr/bin/env shCOMMENT
LOWadvanced/Scripts/piholeLogFlush.sh1#!/usr/bin/env bashCOMMENT
LOWadvanced/Scripts/updatecheck.sh1#!/usr/bin/env bashCOMMENT
LOWadvanced/Scripts/piholeCheckout.sh1#!/usr/bin/env bashCOMMENT
LOWadvanced/Scripts/update.sh1#!/usr/bin/env bashCOMMENT
LOWadvanced/Scripts/piholeDebug.sh1#!/usr/bin/env bashCOMMENT
LOWadvanced/Scripts/piholeDebug.sh661 fiCOMMENT
LOWadvanced/Scripts/piholeDebug.sh681 # Get interfacesCOMMENT
LOWadvanced/Scripts/query.sh1#!/usr/bin/env shCOMMENT
LOWadvanced/Scripts/list.sh1#!/usr/bin/env bashCOMMENT
LOWadvanced/Scripts/list.sh121 LoginAPICOMMENT
LOWadvanced/Scripts/version.sh1#!/usr/bin/env shCOMMENT
LOWadvanced/bash-completion/pihole-ftl.bash1#!/bin/bashCOMMENT
LOWautomated install/uninstall.sh1#!/usr/bin/env bashCOMMENT
LOWautomated install/basic-install.sh1#!/usr/bin/env bashCOMMENT
LOWautomated install/basic-install.sh21set -eCOMMENT
LOWautomated install/basic-install.sh2421 # Check for and disable systemd-resolved-DNSStubListener before reloading resolvedCOMMENT
LOW.github/workflows/sync-back-to-dev.yml1name: Sync Back to DevelopmentCOMMENT
Verbosity Indicators2 hits · 3 pts
SeverityFileLineSnippetContext
LOWgravity.sh739 # If we are root, we need to check if the pihole user has read permissionCOMMENT
LOWadvanced/Scripts/piholeDebug.sh673 # Next we need to check if Pi-hole can resolve a domain when the query is sent to it's IP addressCOMMENT
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippetContext
LOWgravity.sh1041# Usage:COMMENT
LOWadvanced/Scripts/utils.sh25# Example usage:COMMENT
AI Slop Vocabulary2 hits · 3 pts
SeverityFileLineSnippetContext
LOWadvanced/Scripts/updatecheck.sh31 # if ${2} is = "master" we need to use the "latest" endpoint, otherwise, we simply return nullCOMMENT
LOWadvanced/Scripts/piholeDebug.sh465 # Otherwise, just use pingCOMMENT