Repository Analysis

cloudflare/cloudflared

Cloudflare Tunnel client

2.3 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of cloudflare/cloudflared, a Go project with 14,846 GitHub stars. SynthScan v2.0 examined 67,634 lines of code across 426 source files, recording 90 pattern matches distributed across 13 syntactic categories. The overall adjusted score of 2.3 places this repository in the Likely human-written 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).

2.3
Adjusted Score
2.3
Raw Score
100%
Time Factor
2026-07-13
Last Push
14.8K
Stars
Go
Language
67.6K
Lines of Code
426
Files
90
Pattern Hits
2026-07-14
Scan Date
0.01
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 2HIGH 1MEDIUM 14LOW 73

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 90 distinct pattern matches across 13 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.

Decorative Section Separators7 hits · 32 pts
SeverityFileLineSnippetContext
MEDIUMcomponent-tests/test_prechecks.py301 # ── table structure ──────────────────────────────────────────────────COMMENT
MEDIUMcomponent-tests/test_prechecks.py311 # ── row content ──────────────────────────────────────────────────────COMMENT
MEDIUMcomponent-tests/test_prechecks.py346 # ── no action lines ──────────────────────────────────────────────────COMMENT
MEDIUMcomponent-tests/test_prechecks.py350 # ── summary line ─────────────────────────────────────────────────────COMMENT
MEDIUMcomponent-tests/test_prechecks.py354 # ── structured log ───────────────────────────────────────────────────COMMENT
MEDIUMcomponent-tests/test_prechecks.py410 # ── table structure ──────────────────────────────────────────────────COMMENT
MEDIUMcomponent-tests/test_prechecks.py420 # ── row content ──────────────────────────────────────────────────────COMMENT
Hyper-Verbose Identifiers29 hits · 29 pts
SeverityFileLineSnippetContext
LOWrelease_pkgs.py172 def _setup_rpm_pkg_directories(self, artifacts_path, gpg_key_name, archs=["aarch64", "x86_64", "386"]):CODE
LOWcomponent-tests/conftest.py54def wait_previous_cloudflared():CODE
LOWcomponent-tests/test_termination.py57 def test_shutdown_once_no_connection(self, tmp_path, component_tests_config, signal, protocol):CODE
LOWcomponent-tests/test_termination.py77 def test_no_connection_shutdown(self, tmp_path, component_tests_config, signal, protocol):CODE
LOWcomponent-tests/test_tail.py16 async def test_start_stop_streaming(self, tmp_path, component_tests_config):CODE
LOWcomponent-tests/test_tail.py62 async def test_streaming_logs_filters(self, tmp_path, component_tests_config):CODE
LOWcomponent-tests/test_tail.py90 async def test_streaming_logs_sampling(self, tmp_path, component_tests_config):CODE
LOWcomponent-tests/test_tail.py118 async def test_streaming_logs_actor_override(self, tmp_path, component_tests_config):CODE
LOWcomponent-tests/test_tail.py136async def start_streaming_to_be_remotely_closed(url):CODE
LOWcomponent-tests/test_tail.py156async def generate_and_validate_http_events(websocket: WebSocketClientProtocol, url: str, count_send: int):CODE
LOWcomponent-tests/test_tail.py174async def generate_and_validate_no_log_event(websocket: WebSocketClientProtocol, url: str):CODE
LOWcomponent-tests/test_service.py26 def test_launchd_service_log_to_file(self, tmp_path, component_tests_config):CODE
LOWcomponent-tests/test_service.py43 def test_launchd_service_with_token(self, tmp_path, component_tests_config):CODE
LOWcomponent-tests/test_service.py58 def test_launchd_service_rotating_log(self, tmp_path, component_tests_config):CODE
LOWcomponent-tests/test_service.py89 def test_sysv_service_log_to_file(self, tmp_path, component_tests_config):CODE
LOWcomponent-tests/test_service.py106 def test_sysv_service_rotating_log(self, tmp_path, component_tests_config):CODE
LOWcomponent-tests/test_service.py125 def test_sysv_service_with_token(self, tmp_path, component_tests_config):CODE
LOWcomponent-tests/util.py138def run_cloudflared_background(cmd, allow_input, capture_output):CODE
LOWcomponent-tests/util.py198def check_tunnel_not_connected():CODE
LOWcomponent-tests/test_prechecks.py123def _poll_log_file_for_precheck_complete(log_file: str, timeout: float) -> list[dict]:CODE
LOWcomponent-tests/test_prechecks.py144def _read_precheck_log_lines_from_file(log_file: str) -> list[dict]:CODE
LOWcomponent-tests/test_prechecks.py238def _assert_precheck_summary_log(CODE
LOWcomponent-tests/test_prechecks.py271 def test_prechecks_pass_on_healthy_connection(self, tmp_path, component_tests_config):CODE
LOWcomponent-tests/test_prechecks.py381 def test_prechecks_hard_fail_when_edge_unreachable(self, tmp_path, component_tests_config):CODE
LOWcomponent-tests/test_prechecks.py476 def test_diag_contains_prechecks_json(self, tmp_path, component_tests_config):CODE
LOWcomponent-tests/test_management.py93 def test_get_metrics_when_disabled(self, tmp_path, component_tests_config):CODE
LOWcomponent-tests/test_edge_discovery.py64 def expect_address_connections(self, tmp_path, component_tests_config, protocol, edge_ip_version, assert_address_typCODE
LOWcomponent-tests/test_token.py18 def test_get_credentials_file(self, tmp_path, component_tests_config):CODE
LOWcomponent-tests/test_config.py7 def test_validate_ingress_rules(self, tmp_path, component_tests_config):CODE
Over-Commented Block22 hits · 22 pts
SeverityFileLineSnippetContext
LOW.golangci.yaml61 max-issues-per-linter: 50COMMENT
LOW.golangci.yaml81 # Can use regexp here: `generated.*`, regexp is applied on full path,COMMENT
LOW.gitlab-ci.yml41 #####################################################COMMENT
LOW.gitlab-ci.yml61 #####################################################COMMENT
LOWtoken/encrypt.go1// Package encrypter is suitable for encrypting messages you would like to securely share between two points.COMMENT
LOWcmd/cloudflared/linux_service.go121# chkconfig: 2345 99 01COMMENT
LOWcrypto/curves.go21// Canonical curve lists returned by GetCurvePreferences. They are keptCOMMENT
LOWcrypto/doc.go1// Package crypto centralizes the cryptographic primitives and TLSCOMMENT
LOWcrypto/doc.go21// CLI flag. No classical fallback is offered, so a peer that does notCOMMENT
LOWingress/config.go301 // HTTP proxy timeout for closing an idle connectionCOMMENT
LOWconfig/configuration.go181 OriginRequest OriginRequestConfig `yaml:"originRequest" json:"originRequest"`COMMENT
LOWconfig/configuration.go201 KeepAliveConnections *int `yaml:"keepAliveConnections" json:"keepAliveConnections,omitempty"`COMMENT
LOWedgediscovery/allregions/discovery.go81 TCP *net.TCPAddrCOMMENT
LOWprechecks/types.go81 // Addrs holds the resolved edge addresses for this target. May be emptyCOMMENT
LOWprechecks/types.go121 // exercises the same code paths the tunnel itself will use.COMMENT
LOWprechecks/checker.go41COMMENT
LOWprechecks/checker.go321 }COMMENT
LOWquic/v3/datagram.go61COMMENT
LOWquic/v3/datagram.go201// The datagram structure for UDPSessionPayloadDatagram is:COMMENT
LOWquic/v3/datagram.go281 // Session was received and is ready to proxy.COMMENT
LOWquic/v3/datagram.go301// 8| (16 Bytes) |COMMENT
LOWquic/v3/datagram.go381COMMENT
Hallucination Indicators2 hits · 20 pts
SeverityFileLineSnippetContext
CRITICALconnection/control.go112 c.observer.metrics.localConfigMetrics.pushesErrors.Inc()CODE
CRITICALconnection/control.go115 c.observer.metrics.localConfigMetrics.pushes.Inc()CODE
AI Slop Vocabulary5 hits · 16 pts
SeverityFileLineSnippetContext
LOW.ci/release.gitlab-ci.yml21 # we simply set both to the same value.COMMENT
MEDIUMingress/origin_icmp_proxy.go40 // response to utilize.COMMENT
MEDIUMingress/origins/dns.go206// NewDNSDialer creates a custom dialer for the DNS resolver service to utilize.COMMENT
MEDIUMcomponent-tests/test_prechecks.py302 # zerolog writes to stderr which is merged into stdout by the harness.COMMENT
MEDIUMcomponent-tests/test_prechecks.py411 # zerolog writes to stderr which is merged into stdout by the harness.COMMENT
Unused Imports8 hits · 8 pts
SeverityFileLineSnippetContext
LOWgithub_release.py15CODE
LOWcomponent-tests/test_management.py5CODE
LOWcomponent-tests/test_management.py8CODE
LOWcomponent-tests/test_reconnect.py2CODE
LOWcomponent-tests/test_reconnect.py9CODE
LOWcomponent-tests/test_tunnel.py6CODE
LOWcomponent-tests/test_tunnel.py7CODE
LOWcomponent-tests/test_tunnel.py8CODE
Excessive Try-Catch Wrapping5 hits · 6 pts
SeverityFileLineSnippetContext
LOWgithub_release.py311 except Exception as e:CODE
LOWrelease_pkgs.py410 except Exception as e:CODE
LOWgithub_message.py166 except Exception as e:CODE
LOWcomponent-tests/util.py162 except Exception as e:CODE
MEDIUMcomponent-tests/util.py159def wait_tunnel_ready(tunnel_url=None, require_min_connections=1, cfd_logs=None)CODE
Self-Referential Comments2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUM.ci/scripts/vuln-check.sh4# Define the file to store the list of vulnerabilities to ignore.COMMENT
MEDIUM.ci/scripts/component-tests.sh16# Define the cleanup functionCOMMENT
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHcomponent-tests/util.py245 Decode the payload section of a JWT token without signature verification. JWT Structure: =============STRING
Redundant / Tautological Comments3 hits · 4 pts
SeverityFileLineSnippetContext
LOW.ci/scripts/vuln-check.sh8# Check if the ignored vulnerabilities file exists. If not, create an empty one.COMMENT
LOW.ci/scripts/release-target.sh4# Check if a make target is provided as an argumentCOMMENT
LOW.ci/scripts/linux/build-packages.sh4# Check if architecture argument is providedCOMMENT
Deep Nesting3 hits · 3 pts
SeverityFileLineSnippetContext
LOWgithub_release.py276CODE
LOWrelease_pkgs.py172CODE
LOWcomponent-tests/test_prechecks.py144CODE
AI Structural Patterns2 hits · 2 pts
SeverityFileLineSnippetContext
LOWcomponent-tests/util.py109CODE
LOWcomponent-tests/cli.py25CODE
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippetContext
LOWcfsetup.yaml2dummy_key: trueCODE