A black hole for Internet advertisements
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).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | gravity.sh | 10 | # This file is copyright under the latest version of the EUPL. | COMMENT |
| MEDIUM | gravity.sh | 189 | # Create a temporary file with random filename with '.gravity' suffix. | COMMENT |
| MEDIUM | gravity.sh | 621 | # Create a temporary file with random filename with '.phgpb' suffix. | COMMENT |
| MEDIUM | gravity.sh | 769 | # Define the generic error message | COMMENT |
| MEDIUM | advanced/Scripts/utils.sh | 9 | # This file is copyright under the latest version of the EUPL. | COMMENT |
| MEDIUM | advanced/Scripts/piholeNetworkFlush.sh | 9 | # This file is copyright under the latest version of the EUPL. | COMMENT |
| MEDIUM | advanced/Scripts/api.sh | 9 | # This file is copyright under the latest version of the EUPL. | COMMENT |
| MEDIUM | advanced/Scripts/piholeLogFlush.sh | 8 | # This file is copyright under the latest version of the EUPL. | COMMENT |
| MEDIUM | advanced/Scripts/updatecheck.sh | 8 | # This file is copyright under the latest version of the EUPL. | COMMENT |
| MEDIUM | advanced/Scripts/piholeCheckout.sh | 8 | # This file is copyright under the latest version of the EUPL. | COMMENT |
| MEDIUM | advanced/Scripts/update.sh | 10 | # This file is copyright under the latest version of the EUPL. | COMMENT |
| MEDIUM | advanced/Scripts/piholeDebug.sh | 8 | # This file is copyright under the latest version of the EUPL. | COMMENT |
| MEDIUM | advanced/Scripts/piholeDebug.sh | 144 | # Create a random temporary file for the log | COMMENT |
| MEDIUM | advanced/Scripts/piholeDebug.sh | 565 | # Create an array for these ports in use | COMMENT |
| MEDIUM | advanced/Scripts/query.sh | 9 | # This file is copyright under the latest version of the EUPL. | COMMENT |
| MEDIUM | advanced/Scripts/list.sh | 9 | # This file is copyright under the latest version of the EUPL. | COMMENT |
| MEDIUM | advanced/Scripts/version.sh | 8 | # This file is copyright under the latest version of the EUPL. | COMMENT |
| MEDIUM | advanced/Scripts/database_migration/gravity-db.sh | 10 | # This file is copyright under the latest version of the EUPL. | COMMENT |
| MEDIUM | automated install/uninstall.sh | 8 | # This file is copyright under the latest version of the EUPL. | COMMENT |
| MEDIUM | automated install/basic-install.sh | 9 | # This file is copyright under the latest version of the EUPL. | COMMENT |
| MEDIUM | automated install/basic-install.sh | 334 | # Create a fresh build directory with random name | COMMENT |
| MEDIUM | automated install/basic-install.sh | 1117 | # Create an empty adList file with appropriate permissions. | COMMENT |
| MEDIUM | automated install/basic-install.sh | 1430 | # Create a command from the package cache variable | COMMENT |
| MEDIUM | automated install/basic-install.sh | 2152 | # Create a random temporary file for the log | COMMENT |
| MEDIUM | automated install/basic-install.sh | 2381 | # Create the pihole user | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gravity.sh | 146 | # Check if the backup directory exists | COMMENT |
| LOW | gravity.sh | 222 | # Read file line by line | COMMENT |
| LOW | gravity.sh | 258 | # Check if a column with name ${2} exists in gravity table with name ${1} | COMMENT |
| LOW | gravity.sh | 311 | # Check if gravity database needs to be updated | COMMENT |
| LOW | gravity.sh | 339 | # Check if gravity database needs to be updated | COMMENT |
| LOW | gravity.sh | 387 | # Check if a backup exists | COMMENT |
| LOW | gravity.sh | 523 | # Check if etag is supported by the locally available version of curl | COMMENT |
| LOW | gravity.sh | 550 | # Check if we can write to the save location file without actually creating | COMMENT |
| LOW | gravity.sh | 661 | # Check if this domain is blocked by Pi-hole but only if the domain is not a | COMMENT |
| LOW | gravity.sh | 668 | # Check if this IP matches any IP of the system | COMMENT |
| LOW | gravity.sh | 732 | # Check if the file exists and is a regular file (i.e. not a socket, fifo, tty, block). Might still be a symlink. | COMMENT |
| LOW | gravity.sh | 775 | # Check if the installed curl version supports the "-w %{errormsg}" option. | COMMENT |
| LOW | gravity.sh | 852 | # Check if $listCurlBuffer is a non-zero length file | COMMENT |
| LOW | gravity.sh | 1158 | # Check if DNS is available, no need to do any database manipulation if we're not able to download adlists | COMMENT |
| LOW | advanced/Scripts/api.sh | 78 | # Check if 2FA is required | COMMENT |
| LOW | advanced/Scripts/piholeCheckout.sh | 47 | # Check if FTL is installed - do this early on as FTL is a hard dependency for Pi-hole | COMMENT |
| LOW | advanced/Scripts/piholeCheckout.sh | 169 | # Check if requested branch is available | COMMENT |
| LOW | advanced/Scripts/piholeDebug.sh | 330 | # Check if a SELinux configuration file exists | COMMENT |
| LOW | advanced/Scripts/piholeDebug.sh | 361 | # Check if FirewallD service is enabled | COMMENT |
| LOW | advanced/Scripts/piholeDebug.sh | 475 | # Check if we are using IPv4 or IPv6 | COMMENT |
| LOW | advanced/Scripts/piholeDebug.sh | 594 | # Check if the right services are using the right ports | COMMENT |
| LOW | advanced/Scripts/piholeDebug.sh | 712 | # Check if Pi-hole can use itself to block a domain | COMMENT |
| LOW | advanced/Scripts/piholeDebug.sh | 922 | # Check if the file we want to view has a limit (because sometimes we just need a little bit of info | COMMENT |
| LOW | advanced/Scripts/piholeDebug.sh | 945 | # Check if the directory exists | COMMENT |
| LOW | advanced/Scripts/piholeDebug.sh | 1276 | # Check if tricorder.pi-hole.net is reachable and provide token | COMMENT |
| LOW | automated install/basic-install.sh | 456 | # Display the message and use the color table to preface the message with an "info" indicator | COMMENT |
| LOW | automated install/basic-install.sh | 533 | # Check if the directory is a repository | COMMENT |
| LOW | automated install/basic-install.sh | 751 | # Check if it's ULA, GUA, or LL by using the function created earlier | COMMENT |
| LOW | automated install/basic-install.sh | 1407 | # Check if Systemd-resolved's DNSStubListener is enabled and active on port 53 | COMMENT |
| LOW | automated install/basic-install.sh | 1545 | # Check if the pihole user exists and create if it does not | COMMENT |
| LOW | automated install/basic-install.sh | 1723 | # Check if the download exists and we can reach the server | COMMENT |
| LOW | automated install/basic-install.sh | 2097 | # Check if the installed version matches the latest version | COMMENT |
| LOW | automated install/basic-install.sh | 2199 | # Check if lighttpd is installed | COMMENT |
| LOW | automated install/basic-install.sh | 2240 | # Print the output of the FTL migration prefacing every line with four | COMMENT |
| LOW | automated install/basic-install.sh | 2304 | # Check if SELinux is Enforcing and exit before doing anything else | COMMENT |
| LOW | automated install/basic-install.sh | 2310 | # Check if this is a fresh install or an update/repair | COMMENT |
| LOW | automated install/basic-install.sh | 2336 | # Check if there is a usable FTL binary available on this architecture - do | COMMENT |
| LOW | automated install/basic-install.sh | 2428 | # Check if gravity database needs to be upgraded. If so, do it without rebuilding | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | test/run.sh | 7 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/run.sh | 9 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/run.sh | 52 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/run.sh | 54 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/run.sh | 86 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/run.sh | 94 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | test/run.sh | 107 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | test/run.sh | 112 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | test/run.sh | 120 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | test/run.sh | 122 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/run.sh | 138 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/run.sh | 140 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/run.sh | 151 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/run.sh | 154 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/run.sh | 169 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/run.sh | 171 | # --------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gravity.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | gravity.sh | 621 | # Create a temporary file with random filename with '.phgpb' suffix. | COMMENT |
| LOW | gravity.sh | 781 | # (see https://github.com/pi-hole/pi-hole/issues/6615) | COMMENT |
| LOW | gravity.sh | 1041 | # Usage: | COMMENT |
| LOW | advanced/Scripts/utils.sh | 1 | #!/usr/bin/env sh | COMMENT |
| LOW | advanced/Scripts/utils.sh | 41 | COMMENT | |
| LOW | advanced/Scripts/utils.sh | 101 | # -s: FILE exists and has a size greater than zero | COMMENT |
| LOW | advanced/Scripts/utils.sh | 121 | # Pipe to cat to avoid pihole-FTL assuming this is an interactive command | COMMENT |
| LOW | advanced/Scripts/piholeNetworkFlush.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | advanced/Scripts/api.sh | 1 | #!/usr/bin/env sh | COMMENT |
| LOW | advanced/Scripts/piholeLogFlush.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | advanced/Scripts/updatecheck.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | advanced/Scripts/piholeCheckout.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | advanced/Scripts/update.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | advanced/Scripts/piholeDebug.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | advanced/Scripts/piholeDebug.sh | 661 | fi | COMMENT |
| LOW | advanced/Scripts/piholeDebug.sh | 681 | # Get interfaces | COMMENT |
| LOW | advanced/Scripts/query.sh | 1 | #!/usr/bin/env sh | COMMENT |
| LOW | advanced/Scripts/list.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | advanced/Scripts/list.sh | 121 | LoginAPI | COMMENT |
| LOW | advanced/Scripts/version.sh | 1 | #!/usr/bin/env sh | COMMENT |
| LOW | advanced/bash-completion/pihole-ftl.bash | 1 | #!/bin/bash | COMMENT |
| LOW | automated install/uninstall.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | automated install/basic-install.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | automated install/basic-install.sh | 21 | set -e | COMMENT |
| LOW | automated install/basic-install.sh | 2421 | # Check for and disable systemd-resolved-DNSStubListener before reloading resolved | COMMENT |
| LOW | .github/workflows/sync-back-to-dev.yml | 1 | name: Sync Back to Development | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gravity.sh | 739 | # If we are root, we need to check if the pihole user has read permission | COMMENT |
| LOW | advanced/Scripts/piholeDebug.sh | 673 | # Next we need to check if Pi-hole can resolve a domain when the query is sent to it's IP address | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gravity.sh | 1041 | # Usage: | COMMENT |
| LOW | advanced/Scripts/utils.sh | 25 | # Example usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | advanced/Scripts/updatecheck.sh | 31 | # if ${2} is = "master" we need to use the "latest" endpoint, otherwise, we simply return null | COMMENT |
| LOW | advanced/Scripts/piholeDebug.sh | 465 | # Otherwise, just use ping | COMMENT |