Repository Analysis

pi-hole/pi-hole

A black hole for Internet advertisements

25.2 Moderate AI signal View on GitHub
25.2
Adjusted Score
25.2
Raw Score
100%
Time Factor
2026-05-29
Last Push
59,026
Stars
Shell
Language
9,652
Lines of Code
74
Files
120
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 16MEDIUM 24LOW 80

Pattern Findings

120 matches across 10 categories. Click a row to expand file-level details.

Self-Referential Comments24 hits · 72 pts
SeverityFileLineSnippet
MEDIUMgravity.sh10# This file is copyright under the latest version of the EUPL.
MEDIUMgravity.sh189 # Create a temporary file. We don't use '--suffix' here because not all
MEDIUMgravity.sh772 # Define the generic error message
MEDIUMadvanced/Scripts/utils.sh9# This file is copyright under the latest version of the EUPL.
MEDIUMadvanced/Scripts/piholeNetworkFlush.sh9# This file is copyright under the latest version of the EUPL.
MEDIUMadvanced/Scripts/api.sh9# This file is copyright under the latest version of the EUPL.
MEDIUMadvanced/Scripts/piholeLogFlush.sh8# This file is copyright under the latest version of the EUPL.
MEDIUMadvanced/Scripts/updatecheck.sh8# This file is copyright under the latest version of the EUPL.
MEDIUMadvanced/Scripts/piholeCheckout.sh8# This file is copyright under the latest version of the EUPL.
MEDIUMadvanced/Scripts/update.sh10# This file is copyright under the latest version of the EUPL.
MEDIUMadvanced/Scripts/piholeDebug.sh8# This file is copyright under the latest version of the EUPL.
MEDIUMadvanced/Scripts/piholeDebug.sh143 # Create a random temporary file for the log
MEDIUMadvanced/Scripts/piholeDebug.sh564 # Create an array for these ports in use
MEDIUMadvanced/Scripts/query.sh9# This file is copyright under the latest version of the EUPL.
MEDIUMadvanced/Scripts/list.sh9# This file is copyright under the latest version of the EUPL.
MEDIUMadvanced/Scripts/version.sh8# This file is copyright under the latest version of the EUPL.
MEDIUMadvanced/Scripts/database_migration/gravity-db.sh10# This file is copyright under the latest version of the EUPL.
MEDIUMautomated install/uninstall.sh8# This file is copyright under the latest version of the EUPL.
MEDIUMautomated install/basic-install.sh9# This file is copyright under the latest version of the EUPL.
MEDIUMautomated install/basic-install.sh333 # Create a fresh build directory with random name
MEDIUMautomated install/basic-install.sh1071 # Create an empty adList file with appropriate permissions.
MEDIUMautomated install/basic-install.sh1384 # Create a command from the package cache variable
MEDIUMautomated install/basic-install.sh2129 # Create a random temporary file for the log
MEDIUMautomated install/basic-install.sh2358 # Create the pihole user
Cross-File Repetition12 hits · 60 pts
SeverityFileLineSnippet
HIGHtest/conftest.py0allows for setup of commands we don't really want to have to run for real in unit tests
HIGHtest/conftest.py0allows for setup of commands we don't really want to have to run for real in unit tests
HIGHtest/conftest.py0allows for setup of commands we don't really want to have to run for real in unit tests
HIGHtest/conftest.py0cat <<eof> {script}\n{content}\neof chmod +x {script} rm -f /var/log/{scriptlog}
HIGHtest/conftest.py0cat <<eof> {script}\n{content}\neof chmod +x {script} rm -f /var/log/{scriptlog}
HIGHtest/conftest.py0cat <<eof> {script}\n{content}\neof chmod +x {script} rm -f /var/log/{scriptlog}
HIGHtest/conftest.py0cat <<eof> {script}\n{content}\neof chmod +x {script} rm -f /var/log/{scriptlog}
HIGHtest/test_any_automated_install.py0source /opt/pihole/basic-install.sh find_ipv6_information
HIGHtest/test_any_automated_install.py0source /opt/pihole/basic-install.sh find_ipv6_information
HIGHtest/test_any_automated_install.py0source /opt/pihole/basic-install.sh find_ipv6_information
HIGHtest/test_any_automated_install.py0source /opt/pihole/basic-install.sh find_ipv6_information
HIGHtest/test_any_automated_install.py0source /opt/pihole/basic-install.sh find_ipv6_information
Redundant / Tautological Comments38 hits · 57 pts
SeverityFileLineSnippet
LOWgravity.sh146 # Check if the backup directory exists
LOWgravity.sh224 # Read file line by line
LOWgravity.sh260# Check if a column with name ${2} exists in gravity table with name ${1}
LOWgravity.sh313 # Check if gravity database needs to be updated
LOWgravity.sh341 # Check if gravity database needs to be updated
LOWgravity.sh389 # Check if a backup exists
LOWgravity.sh525 # Check if etag is supported by the locally available version of curl
LOWgravity.sh552 # Check if we can write to the save location file without actually creating
LOWgravity.sh664 # Check if this domain is blocked by Pi-hole but only if the domain is not a
LOWgravity.sh671 # Check if this IP matches any IP of the system
LOWgravity.sh735 # Check if the file exists and is a regular file (i.e. not a socket, fifo, tty, block). Might still be a symlink.
LOWgravity.sh775 # Check if the installed curl version supports the "-w %{errormsg}" option (available as of curl 7.75.0)
LOWgravity.sh850 # Check if $listCurlBuffer is a non-zero length file
LOWgravity.sh1145# Check if DNS is available, no need to do any database manipulation if we're not able to download adlists
LOWadvanced/Scripts/api.sh78 # Check if 2FA is required
LOWadvanced/Scripts/piholeCheckout.sh47 # Check if FTL is installed - do this early on as FTL is a hard dependency for Pi-hole
LOWadvanced/Scripts/piholeCheckout.sh169 # Check if requested branch is available
LOWadvanced/Scripts/piholeDebug.sh329 # Check if a SELinux configuration file exists
LOWadvanced/Scripts/piholeDebug.sh360 # Check if FirewallD service is enabled
LOWadvanced/Scripts/piholeDebug.sh474 # Check if we are using IPv4 or IPv6
LOWadvanced/Scripts/piholeDebug.sh593 # Check if the right services are using the right ports
LOWadvanced/Scripts/piholeDebug.sh711 # Check if Pi-hole can use itself to block a domain
LOWadvanced/Scripts/piholeDebug.sh921 # Check if the file we want to view has a limit (because sometimes we just need a little bit of info
LOWadvanced/Scripts/piholeDebug.sh944 # Check if the directory exists
LOWadvanced/Scripts/piholeDebug.sh1275 # Check if tricorder.pi-hole.net is reachable and provide token
LOWautomated install/basic-install.sh455 # Display the message and use the color table to preface the message with an "info" indicator
LOWautomated install/basic-install.sh532 # Check if the directory is a repository
LOWautomated install/basic-install.sh750 # Check if it's ULA, GUA, or LL by using the function created earlier
LOWautomated install/basic-install.sh1361 # Check if Systemd-resolved's DNSStubListener is enabled and active on port 53
LOWautomated install/basic-install.sh1499# Check if the pihole user exists and create if it does not
LOWautomated install/basic-install.sh1701 # Check if the download exists and we can reach the server
LOWautomated install/basic-install.sh2074 # Check if the installed version matches the latest version
LOWautomated install/basic-install.sh2176 # Check if lighttpd is installed
LOWautomated install/basic-install.sh2217 # Print the output of the FTL migration prefacing every line with four
LOWautomated install/basic-install.sh2281 # Check if SELinux is Enforcing and exit before doing anything else
LOWautomated install/basic-install.sh2287 # Check if this is a fresh install or an update/repair
LOWautomated install/basic-install.sh2313 # Check if there is a usable FTL binary available on this architecture - do
LOWautomated install/basic-install.sh2405 # Check if gravity database needs to be upgraded. If so, do it without rebuilding
Over-Commented Block25 hits · 23 pts
SeverityFileLineSnippet
LOWgravity.sh1#!/usr/bin/env bash
LOWgravity.sh641 # from the given file by sending a custom If-None-Match header using the
LOWgravity.sh781 # If it is "7.75" then the current version is greater than or equal to "7.75.0".
LOWgravity.sh1021 echo -e "${OVER} ${TICK} ${str}"
LOWadvanced/Scripts/utils.sh1#!/usr/bin/env sh
LOWadvanced/Scripts/utils.sh41
LOWadvanced/Scripts/utils.sh121# Example getFTLConfigValue dns.piholePTR
LOWadvanced/Scripts/piholeNetworkFlush.sh1#!/usr/bin/env bash
LOWadvanced/Scripts/api.sh1#!/usr/bin/env sh
LOWadvanced/Scripts/piholeLogFlush.sh1#!/usr/bin/env bash
LOWadvanced/Scripts/updatecheck.sh1#!/usr/bin/env bash
LOWadvanced/Scripts/piholeCheckout.sh1#!/usr/bin/env bash
LOWadvanced/Scripts/update.sh1#!/usr/bin/env bash
LOWadvanced/Scripts/piholeDebug.sh1#!/usr/bin/env bash
LOWadvanced/Scripts/piholeDebug.sh661
LOWadvanced/Scripts/piholeDebug.sh681 # sed logic breakdown:
LOWadvanced/Scripts/query.sh1#!/usr/bin/env sh
LOWadvanced/Scripts/list.sh1#!/usr/bin/env bash
LOWadvanced/Scripts/list.sh121 LoginAPI
LOWadvanced/Scripts/version.sh1#!/usr/bin/env sh
LOWadvanced/bash-completion/pihole-ftl.bash1#!/bin/bash
LOWautomated install/uninstall.sh1#!/usr/bin/env bash
LOWautomated install/basic-install.sh1#!/usr/bin/env bash
LOWautomated install/basic-install.sh21set -e
LOW.github/workflows/sync-back-to-dev.yml1name: Sync Back to Development
Cross-Language Confusion4 hits · 15 pts
SeverityFileLineSnippet
HIGHtest/test_any_automated_install.py86 host.run("command -v apt-get > /dev/null && apt-get install -qq man")
HIGHtest/test_any_automated_install.py87 host.run("command -v dnf > /dev/null && dnf install -y man")
HIGHtest/test_any_automated_install.py88 host.run("command -v yum > /dev/null && yum install -y man")
HIGHtest/test_any_automated_install.py89 host.run("command -v apk > /dev/null && apk add mandoc man-pages")
Hyper-Verbose Identifiers9 hits · 6 pts
SeverityFileLineSnippet
LOWtest/test_any_utils.py1def test_key_val_replacement_works(host):
LOWtest/test_any_automated_install.py16def test_supported_package_manager(host):
LOWtest/test_any_automated_install.py33def test_selinux_not_detected(host):
LOWtest/test_any_automated_install.py47def get_directories_recursive(host, directory):
LOWtest/test_any_automated_install.py186def test_update_package_cache_success_no_errors(host):
LOWtest/test_any_automated_install.py200def test_update_package_cache_failure_no_errors(host):
LOWtest/test_any_automated_install.py441def test_package_manager_has_pihole_deps(host):
LOWtest/test_any_automated_install.py456def test_meta_package_uninstall(host):
LOWtest/test_centos_fedora_common_support.py24def test_selinux_enforcing_exit(host):
Verbosity Indicators2 hits · 3 pts
SeverityFileLineSnippet
LOWgravity.sh742 # If we are root, we need to check if the pihole user has read permission
LOWadvanced/Scripts/piholeDebug.sh672 # Next we need to check if Pi-hole can resolve a domain when the query is sent to it's IP address
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippet
LOWgravity.sh1028# Usage:
LOWadvanced/Scripts/utils.sh25# Example usage:
AI Slop Vocabulary2 hits · 3 pts
SeverityFileLineSnippet
LOWadvanced/Scripts/updatecheck.sh31 # if ${2} is = "master" we need to use the "latest" endpoint, otherwise, we simply return null
LOWadvanced/Scripts/piholeDebug.sh464 # Otherwise, just use ping
Unused Imports2 hits · 2 pts
SeverityFileLineSnippet
LOWtest/test_any_automated_install.py2
LOWtest/test_any_automated_install.py3