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
14.0
Adjusted Score
14.0
Raw Score
100%
Time Factor
2026-05-30
Last Push
13,348
Stars
Python
Language
9,000
Lines of Code
50
Files
86
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 5MEDIUM 9LOW 72

Pattern Findings

86 matches across 9 categories. Click a row to expand file-level details.

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