A simple TLS proxy with mutual authentication for securing non-TLS services.
This report presents the forensic synthetic code analysis of ghostunnel/ghostunnel, a Go project with 2,181 GitHub stars. SynthScan v2.0 examined 45,850 lines of code across 385 source files, recording 128 pattern matches distributed across 8 syntactic categories. The overall adjusted score of 5.1 places this repository in the Low 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 128 distinct pattern matches across 8 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 |
|---|---|---|---|---|
| HIGH | …s/test-server-handles-client-closes-connection-unix.py | 0 | ensures when server disconnects that the client connection also disconnects, with unix sockets. | STRING |
| HIGH | …s/test-client-handles-client-closes-connection-unix.py | 0 | ensures when server disconnects that the client connection also disconnects, with unix sockets. | STRING |
| HIGH | …s/test-server-handles-server-closes-connection-unix.py | 0 | ensures when server disconnects that the client connection also disconnects, with unix sockets. | STRING |
| HIGH | …s/test-client-handles-server-closes-connection-unix.py | 0 | ensures when server disconnects that the client connection also disconnects, with unix sockets. | STRING |
| HIGH | tests/test-client-handles-client-closes-connection.py | 0 | ensures when server disconnects that the client connection also disconnects. | STRING |
| HIGH | tests/test-server-handles-client-closes-connection.py | 0 | ensures when server disconnects that the client connection also disconnects. | STRING |
| HIGH | tests/test-client-handles-server-closes-connection.py | 0 | ensures when server disconnects that the client connection also disconnects. | STRING |
| HIGH | tests/test-server-handles-server-closes-connection.py | 0 | ensures when server disconnects that the client connection also disconnects. | STRING |
| HIGH | tests/test-client-reload-broken-certificate.py | 0 | ensures that tunnel sees & reloads certificate changes. there are various cases to take into account: - tunnel picks up | STRING |
| HIGH | tests/test-client-auto-reload-certificate.py | 0 | ensures that tunnel sees & reloads certificate changes. there are various cases to take into account: - tunnel picks up | STRING |
| HIGH | tests/test-client-reloads-keystore.py | 0 | ensures that tunnel sees & reloads certificate changes. there are various cases to take into account: - tunnel picks up | STRING |
| HIGH | tests/test-service-lifecycle.py | 0 | run a ghostunnel service subcommand and return (returncode, stdout, stderr). | STRING |
| HIGH | tests/test-service-install-duplicate.py | 0 | run a ghostunnel service subcommand and return (returncode, stdout, stderr). | STRING |
| HIGH | tests/test-service-start-stop.py | 0 | run a ghostunnel service subcommand and return (returncode, stdout, stderr). | STRING |
| HIGH | tests/test-server-auto-reload-certificate.py | 0 | ensures that tunnel sees & reloads a certificate change. | STRING |
| HIGH | tests/test-server-reloads-keystore.py | 0 | ensures that tunnel sees & reloads a certificate change. | STRING |
| HIGH | tests/test-server-reload-broken-certificate.py | 0 | ensures that tunnel sees & reloads a certificate change. | STRING |
| HIGH | tests/test-server-reloads-split-cert-key.py | 0 | ensures that tunnel sees & reloads a certificate change. | STRING |
| HIGH | tests/test-client-systemd-socket-activation-error.py | 0 | spins up a client and tests systemd socket activation. | STRING |
| HIGH | tests/test-client-launchd-socket-activation-error.py | 0 | spins up a client and tests systemd socket activation. | STRING |
| HIGH | tests/test-client-systemd-socket-activation.py | 0 | spins up a client and tests systemd socket activation. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test-server-max-tls-version.py | 55 | except Exception: | CODE |
| LOW | tests/test-server-shutdown-timeout.py | 43 | except Exception: | CODE |
| LOW | tests/test-server-quiet-handshake-errs.py | 56 | except Exception: | CODE |
| LOW | tests/test-service-graceful-shutdown.py | 68 | except Exception: | CODE |
| LOW | tests/test-service-lifecycle.py | 113 | except Exception: | CODE |
| LOW | tests/test-server-keychain-identity-windows.py | 39 | except Exception as e: | CODE |
| LOW | tests/test-service-eventlog-source.py | 45 | except Exception: | CODE |
| MEDIUM | tests/test-service-eventlog-source.py | 39 | def uninstall_quietly(): | CODE |
| LOW | tests/test-service-install-duplicate.py | 77 | except Exception: | CODE |
| LOW | tests/test-service-install-duplicate.py | 84 | except Exception: | CODE |
| LOW | tests/test-server-opa-slow-policy.py | 105 | except Exception: | CODE |
| LOW | tests/test-client-shutdown-timeout.py | 42 | except Exception: | CODE |
| LOW | tests/test-server-landlock-ssl-cert-file.py | 75 | except Exception: | CODE |
| LOW | tests/test-server-quiet-conn-errs.py | 57 | except Exception: | CODE |
| LOW | tests/test-server-quiet-conn-errs.py | 60 | except Exception as e: | CODE |
| LOW | tests/test-server-quiet-conn-errs.py | 72 | except Exception: | CODE |
| LOW | tests/test-client-via-http-connect-proxy.py | 49 | except Exception: | CODE |
| LOW | tests/test-server-max-concurrent-conns.py | 106 | except Exception as exc: | CODE |
| LOW | tests/test-server-max-concurrent-conns.py | 111 | except Exception: | CODE |
| LOW | tests/test-client-shutdown-http.py | 47 | except Exception: | CODE |
| LOW | tests/test-service-scm-graceful-shutdown.py | 63 | except Exception: | CODE |
| LOW | tests/test-service-scm-graceful-shutdown.py | 128 | except Exception as exc: | CODE |
| MEDIUM | tests/test-service-scm-graceful-shutdown.py | 57 | def uninstall_quietly(): | CODE |
| MEDIUM | tests/test-service-scm-graceful-shutdown.py | 123 | def do_stop(): | CODE |
| LOW | tests/common.py | 114 | except Exception: | CODE |
| LOW | tests/common.py | 182 | except Exception: | CODE |
| LOW | tests/common.py | 191 | except Exception: | CODE |
| LOW | tests/common.py | 208 | except Exception as e: | CODE |
| LOW | tests/common.py | 234 | except Exception as e: | CODE |
| LOW | tests/common.py | 407 | except Exception: | CODE |
| LOW | tests/common.py | 511 | except Exception: | CODE |
| LOW | tests/common.py | 658 | except Exception as e: | CODE |
| LOW | tests/common.py | 725 | except Exception as e: | CODE |
| LOW | tests/common.py | 801 | except Exception as e: | CODE |
| LOW | tests/common.py | 952 | except Exception as e: | CODE |
| LOW | tests/test-service-start-stop.py | 123 | except Exception: | CODE |
| LOW | tests/test-service-start-stop.py | 130 | except Exception: | CODE |
| LOW | tests/test-service-foreign-start-stop.py | 69 | except Exception: | CODE |
| LOW | tests/test-server-shutdown-sigterm.py | 42 | except Exception: | CODE |
| LOW | tests/test-client-shutdown-sigterm.py | 41 | except Exception: | CODE |
| LOW | tests/test-server-keychain-identity-darwin.py | 76 | except Exception as e: | CODE |
| LOW | tests/test-client-socks5-proxy.py | 58 | except Exception: | CODE |
| LOW | tests/test-client-socks5-proxy.py | 71 | except Exception: | CODE |
| LOW | tests/test-client-socks5-proxy.py | 75 | except Exception: | CODE |
| LOW | tests/test-client-socks5-proxy.py | 86 | except Exception: | CODE |
| LOW | tests/test-client-socks5-proxy.py | 125 | except Exception as e: | CODE |
| LOW | tests/test-client-socks5-proxy.py | 129 | except Exception: | CODE |
| LOW | tests/test-service-uninstall-foreign.py | 59 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | windows_service.go | 41 | COMMENT | |
| LOW | magefile.go | 181 | return fmt.Errorf("codesign verification of %s failed: %w", binary, err) | COMMENT |
| LOW | landlock_linux.go | 81 | // exact set of files required in every conceivable situation. | COMMENT |
| LOW | landlock_linux.go | 241 | } | COMMENT |
| LOW | main.go | 601 | // observe the registry, so we skip metrics collection entirely: the proxy | COMMENT |
| LOW | main_test.go | 1301 | COMMENT | |
| LOW | windows.go | 101 | // isRunningAsService reports whether the process was started by the Windows | COMMENT |
| LOW | proxy/churn_bench_test.go | 81 | // -cpu=1,4,8 to observe how the per-connection accept path scales across cores. | COMMENT |
| LOW | proxy/churn_bench_test.go | 101 | // all unset, the default). Comparing it against BenchmarkConnectionChurn | COMMENT |
| LOW | proxy/proxy.go | 161 | // Enable HAproxy's PROXY protocol | COMMENT |
| LOW | proxy/proxy.go | 621 | // | COMMENT |
| LOW | auth/auth.go | 41 | COMMENT | |
| LOW | auth/auth.go | 61 | // AllowURIs lists URI SANs that should be allowed access. If a principal | COMMENT |
| LOW | auth/doc.go | 1 | // Package auth provides methods to perform authorization on incoming or | COMMENT |
| LOW | certstore/certstore_windows.go | 61 | COMMENT | |
| LOW | tests/test-server-landlock-ssl-cert-file.py | 81 | """Variant 1: server without --cacert; rely on SSL_CERT_FILE.""" | COMMENT |
| LOW | tests/test-server-acme-tls-alpn-renewal.py | 101 | COMMENT | |
| LOW | tests/test-server-acme-tls-alpn-renewal.py | 301 | '--auto-acme-agree-to-tos', | COMMENT |
| LOW | tests/test-server-acme-tls-alpn-renewal.py | 361 | # certmagic's background loop will wake up (every 1s thanks to the | COMMENT |
| LOW | tests/test-client-socks5-proxy.py | 1 | #!/usr/bin/env python3 | COMMENT |
| LOW | wildcard/matcher.go | 21 | // We expose functions to build matchers from simple wildcard patterns. Each | COMMENT |
| LOW | certloader/acmetlsconfig.go | 81 | // certs. If the desired goal is for ghostunnel to use the ACME CAs test | COMMENT |
| LOW | certloader/acmetlsconfig.go | 261 | // repeated builds never alias or grow the base config's NextProtos. | COMMENT |
| LOW | certloader/spiffe_tls_config.go | 121 | config := c.base.Clone() | COMMENT |
| LOW | certloader/certtlsconfig.go | 1 | package certloader | COMMENT |
| LOW | certloader/tlsconfig.go | 21 | ) | COMMENT |
| LOW | certloader/doc.go | 1 | // Package certloader provides abstractions over certificates that can be used | COMMENT |
| LOW | socket/net.go | 81 | https = true | COMMENT |
| LOW | socket/doc.go | 1 | // Package socket provides method for parsing addresses and opening | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test-server-acme-tls-alpn-renewal.py | 329 | # ----------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test-server-acme-tls-alpn-renewal.py | 334 | # ----------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test-server-acme-tls-alpn-renewal.py | 358 | # ----------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test-server-acme-tls-alpn-renewal.py | 375 | # ----------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test-server-acme-tls-alpn-renewal.py | 397 | # ----------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test-server-acme-tls-alpn-renewal.py | 399 | # ----------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test-server-acme-tls-alpn-renewal.py | 73 | def wait_for_ghostunnel_listener(port, client_cert, timeout=60): | CODE |
| LOW | tests/test-server-acme-tls-alpn-renewal.py | 230 | def fetch_server_cert_fingerprint(port, client_cert): | CODE |
| LOW | tests/common.py | 310 | def assert_connection_rejected(client, server, name, timeout_ok=True, timeout=2): | CODE |
| LOW⚡ | tests/common.py | 888 | def validate_can_send_from_client(self, string, msg): | CODE |
| LOW⚡ | tests/common.py | 896 | def validate_can_send_from_server(self, string, msg): | CODE |
| LOW⚡ | tests/common.py | 904 | def validate_closing_client_closes_server(self, msg): | CODE |
| LOW⚡ | tests/common.py | 912 | def validate_half_closing_client_closes_server(self, msg): | CODE |
| LOW | tests/common.py | 925 | def validate_closing_server_closes_client(self, msg): | CODE |
| LOW | tests/common.py | 933 | def validate_half_closing_server_closes_client(self, msg): | CODE |
| LOW | tests/test-server-unix-socket-listener.py | 130 | def _run_proxy_protocol_phase(): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/common.py | 104 | # Create a per-test temporary working directory for cert file isolation | COMMENT |
| MEDIUM | tests/test-service-foreign-start-stop.py | 25 | # Create a dummy service that ghostunnel did not install. | COMMENT |
| MEDIUM | tests/test-service-uninstall-foreign.py | 26 | # Create a dummy service that ghostunnel did not install. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test-server-shutdown-timeout.py | 5 | CODE | |
| LOW | tests/test-client-shutdown-timeout.py | 5 | CODE | |
| LOW | tests/test-client-shutdown-http.py | 9 | CODE | |
| LOW | tests/test-server-shutdown-sigterm.py | 5 | CODE | |
| LOW | tests/test-client-shutdown-sigterm.py | 5 | CODE | |
| LOW | tests/test-service-uninstall-foreign.py | 13 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test-server-landlock-ssl-cert-file.py | 42 | CODE | |
| LOW | tests/test-client-via-http-connect-proxy.py | 15 | CODE | |
| LOW | tests/common.py | 166 | CODE | |
| LOW | tests/test-client-socks5-proxy.py | 46 | CODE | |
| LOW | tests/test-client-socks5-proxy.py | 79 | CODE |