Repository Analysis

sshuttle/sshuttle

Transparent proxy server that works as a poor man's VPN. Forwards over ssh. Doesn't require admin. Works with Linux and MacOS. Supports DNS tunneling.

14.0 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of sshuttle/sshuttle, a Python project with 13,458 GitHub stars. SynthScan v2.0 examined 9,000 lines of code across 50 source files, recording 86 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 14.0 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).

14.0
Adjusted Score
14.0
Raw Score
100%
Time Factor
2026-07-10
Last Push
13.5K
Stars
Python
Language
9.0K
Lines of Code
50
Files
86
Pattern Hits
2026-07-14
Scan Date
0.10
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 5MEDIUM 9LOW 72

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 86 distinct pattern matches across 9 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.

Excessive Try-Catch Wrapping22 hits · 30 pts
SeverityFileLineSnippetContext
LOWsshuttle/server.py154 except Exception:CODE
LOWsshuttle/hostwatch.py60 except Exception:CODE
LOWsshuttle/firewall.py258 except Exception:CODE
LOWsshuttle/firewall.py280 except Exception:CODE
LOWsshuttle/firewall.py384 except Exception:CODE
LOWsshuttle/firewall.py391 except Exception:CODE
LOWsshuttle/firewall.py395 except Exception:CODE
LOWsshuttle/firewall.py402 except Exception:CODE
LOWsshuttle/firewall.py406 except Exception:CODE
LOWsshuttle/firewall.py412 except Exception:CODE
LOWsshuttle/firewall.py416 except Exception:CODE
LOWsshuttle/firewall.py422 except Exception:CODE
LOWsshuttle/firewall.py426 except Exception:CODE
MEDIUMsshuttle/firewall.py225def _read_next_string_line():CODE
LOWsshuttle/helpers.py269 except Exception:CODE
LOWsshuttle/helpers.py303 except Exception:CODE
LOWsshuttle/helpers.py323 except Exception:CODE
LOWsshuttle/helpers.py337 except Exception:CODE
MEDIUMsshuttle/helpers.py318def stream_reader_to_sock():CODE
MEDIUMsshuttle/helpers.py330def stream_sock_to_writer():CODE
LOWsshuttle/methods/windivert.py364 except Exception:CODE
MEDIUMsshuttle/methods/windivert.py361def _target():CODE
Hyper-Verbose Identifiers22 hits · 21 pts
SeverityFileLineSnippetContext
LOWtests/client/test_options.py123def test_convert_arg_line_to_args_skips_comments():CODE
LOWtests/client/test_options.py129def test_parse_subnetport_host(mock_getaddrinfo):CODE
LOWtests/client/test_options.py148def test_parse_subnetport_host_with_port(mock_getaddrinfo):CODE
LOWtests/client/test_methods_tproxy.py9def test_get_supported_features():CODE
LOWtests/client/test_firewall.py68def test_rewrite_etc_hosts_no_overwrite(mock_link, mock_rename, tmpdir):STRING
LOWtests/client/test_sudoers.py8def test_build_config_pythonpath_is_site_packages_parent():CODE
LOWtests/client/test_sudoers.py46def test_build_config_contains_user_name_and_cmd_alias():CODE
LOWtests/client/test_methods_pf.py11def test_get_supported_features():CODE
LOWtests/client/test_methods_pf.py93def test_firewall_command_darwin(mock_pf_get_dev, mock_ioctl, mock_stdout):CODE
LOWtests/client/test_methods_pf.py116def test_firewall_command_freebsd(mock_pf_get_dev, mock_ioctl, mock_stdout):CODE
LOWtests/client/test_methods_pf.py139def test_firewall_command_openbsd(mock_pf_get_dev, mock_ioctl, mock_stdout):CODE
LOWtests/client/test_methods_pf.py174def test_setup_firewall_darwin(mock_pf_get_dev, mock_ioctl, mock_pfctl):CODE
LOWtests/client/test_methods_pf.py293def test_setup_firewall_freebsd(mock_pf_get_dev, mock_ioctl, mock_pfctl,CODE
LOWtests/client/test_methods_pf.py403def test_setup_firewall_openbsd(mock_pf_get_dev, mock_ioctl, mock_pfctl):CODE
LOWtests/client/test_methods_nat.py11def test_get_supported_features():CODE
LOWtests/client/test_helpers.py120def test_resolvconf_nameservers(mock_open):CODE
LOWtests/client/test_helpers.py146def test_get_random_nameserver(mock_open):STRING
LOWtests/client/test_sdnotify.py9def test_notify_invalid_socket_path(mock_get):CODE
LOWtests/client/test_sdnotify.py15def test_notify_socket_not_there(mock_get):CODE
LOWsshuttle/firewall.py98def _setup_daemon_for_unix_like():CODE
LOWsshuttle/firewall.py124def _setup_daemon_for_windows():CODE
LOWsshuttle/methods/windivert.py295 def _get_bind_address_for_port(self, port, family):CODE
Over-Commented Block15 hits · 15 pts
SeverityFileLineSnippetContext
LOWdocs/conf.py1#!/usr/bin/env python3COMMENT
LOWdocs/conf.py21# If extensions (or modules to document with autodoc) are in another directory,COMMENT
LOWdocs/conf.py41# The suffix of source filenames.COMMENT
LOWdocs/conf.py61version = '.'.join(release.split('.')[:2])COMMENT
LOWdocs/conf.py81# If true, '()' will be appended to :func: etc. cross-reference text.COMMENT
LOWdocs/conf.py101COMMENT
LOWdocs/conf.py121# html_short_title = NoneCOMMENT
LOWdocs/conf.py141COMMENT
LOWdocs/conf.py161# html_use_index = TrueCOMMENT
LOWdocs/conf.py201# (source start file, target name, title,COMMENT
LOW.github/workflows/codeql.yml1# For most projects, this workflow file will not need changing; you simply needCOMMENT
LOW.github/workflows/codeql.yml61 # ✏️ If the Autobuild fails above, remove it and uncomment the following three linesCOMMENT
LOWsshuttle/ssh.py141 pyscript = pyscript.replace(c, '`' + c)COMMENT
LOWsshuttle/ssh.py161 # below).COMMENT
LOWsshuttle/helpers.py81 #COMMENT
Synthetic Comment Markers2 hits · 15 pts
SeverityFileLineSnippetContext
HIGHsshuttle/methods/nft.py56 # Redirect DNS traffic as requested. This includes routing trafficCOMMENT
HIGHsshuttle/methods/nat.py53 # Redirect DNS traffic as requested. This includes routing trafficCOMMENT
Deep Nesting14 hits · 14 pts
SeverityFileLineSnippetContext
LOWsshuttle/server.py20CODE
LOWsshuttle/server.py288CODE
LOWsshuttle/hostwatch.py116CODE
LOWsshuttle/firewall.py200CODE
LOWsshuttle/client.py591CODE
LOWsshuttle/client.py808CODE
LOWsshuttle/cmdline.py17CODE
LOWsshuttle/ssh.py87CODE
LOWsshuttle/helpers.py66CODE
LOWsshuttle/ssnet.py146CODE
LOWsshuttle/ssnet.py401CODE
LOWsshuttle/methods/tproxy.py20CODE
LOWsshuttle/methods/windivert.py404CODE
LOWsshuttle/methods/windivert.py485CODE
Cross-Language Confusion3 hits · 12 pts
SeverityFileLineSnippetContext
HIGHsshuttle/server.py69 mask = _maskbits(maskw) # returns 32 if maskw is nullCODE
HIGHsshuttle/hostwatch.py166 p = ssubprocess.Popen(argv, stdout=ssubprocess.PIPE, stderr=null,CODE
HIGHsshuttle/ssh.py186 pycmd = ("P=python3; $P -V 2>%s || P=python; "STRING
AI Slop Vocabulary4 hits · 10 pts
SeverityFileLineSnippetContext
LOWsshuttle/server.py360 # different platforms we can not just set the socket familyCOMMENT
MEDIUMsshuttle/client.py226 if is_admin_user(): # No need to elevate privilegesCODE
MEDIUMsshuttle/client.py233 # XXX: Attempt to elevate privilege using 'runas' in windows seems not working.COMMENT
MEDIUMsshuttle/client.py352 # entered the wrong password to elevate privileges.COMMENT
Self-Referential Comments2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMdocs/conf.py7# This file is execfile()d with the current directory set to itsCOMMENT
MEDIUMsshuttle/client.py87 # Create a daemon process with a new session id.COMMENT
Redundant / Tautological Comments2 hits · 2 pts
SeverityFileLineSnippetContext
LOWsshuttle/hostwatch.py239 # Check if this jobs needs to run.COMMENT
LOWsshuttle/client.py348 rv = self.p.poll() # Check if process is still runningCODE