Repository Analysis

tailscale/tailscale

The easiest, most secure way to use WireGuard and 2FA.

2.4 Likely human-written View on GitHub
2.4
Adjusted Score
2.4
Raw Score
100%
Time Factor
2026-05-30
Last Push
32,023
Stars
Go
Language
570,314
Lines of Code
2397
Files
1293
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 10HIGH 2MEDIUM 16LOW 1265

Pattern Findings

1293 matches across 11 categories. Click a row to expand file-level details.

Over-Commented Block1237 hits · 1176 pts
SeverityFileLineSnippet
LOWbuild_docker.sh1#!/usr/bin/env sh
LOWheader.txt1// Copyright (c) Tailscale Inc & contributors
LOWmisc/git_hook/git-hook.go1// Copyright (c) Tailscale Inc & contributors
LOWmisc/git_hook/githook/launcher.sh1#!/usr/bin/env bash
LOWprober/dns.go21 // Networks is the list of networks to resolve; if non-empty, it should
LOWprober/derp.go881 return runDerpProbeNodePair(ctx, from, to, fromc, toc, size)
LOWcmd/cloner/cloner.go1// Copyright (c) Tailscale Inc & contributors
LOWcmd/natc/natc.go261 // dnsAddr is the IPv4 address to listen on for DNS requests. It is used to
LOWcmd/vet/subtestnames/analyzer.go1// Copyright (c) Tailscale Inc & contributors
LOWcmd/vet/jsontags/analyzer.go41 var seenName, hasFormat bool
LOWcmd/vet/jsontags/analyzer.go81 // other than when the map or slice are empty.
LOWcmd/vet/jsontags/report.go41 }
LOWcmd/gitops-pusher/cache.go1// Copyright (c) Tailscale Inc & contributors
LOWcmd/k8s-nameserver/main.go41 defaultDNSConfigDir = "/config"
LOWcmd/k8s-nameserver/main.go361 if err != nil {
LOWcmd/derper/ace.go41 // to the bidirectional ts2021 Noise protocol.
LOWcmd/sync-containers/main.go1// Copyright (c) Tailscale Inc & contributors
LOWcmd/containerboot/test_tailscale.sh1#!/usr/bin/env bash
LOWcmd/containerboot/main.go1// Copyright (c) Tailscale Inc & contributors
LOWcmd/containerboot/main.go21// Must be used together with TS_CLIENT_ID. If the value begins with "file:", it is
LOWcmd/containerboot/main.go41// destination defined by an IP.
LOWcmd/containerboot/main.go61// logged in. If false (the default, for backwards
LOWcmd/containerboot/main.go81// - TS_EXPERIMENTAL_VERSIONED_CONFIG_DIR: if specified, a path to a
LOWcmd/containerboot/main.go101// cluster using the same hostname (in this case, the MagicDNS name of the ingress proxy)
LOWcmd/containerboot/main.go861
LOWcmd/jsonimports/format.go21// mustFormatFile formats a Go source file and adjust "json" imports.
LOWcmd/jsonimports/jsonimports.go1// Copyright (c) Tailscale Inc & contributors
LOWcmd/jsonimports/jsonimports.go21// and "encoding/json/jsontext" into the standard library
LOWcmd/tsnet-proxy/tsnet-proxy.go1// Copyright (c) Tailscale Inc & contributors
LOWcmd/tl-longchain/tl-longchain.go1// Copyright (c) Tailscale Inc & contributors
LOWcmd/proxy-to-grafana/proxy-to-grafana.go1// Copyright (c) Tailscale Inc & contributors
LOWcmd/proxy-to-grafana/proxy-to-grafana.go21// whitelist = 127.0.0.1
LOWcmd/tsconnect/wasmbuild/wasmbuild.go41// excluded via its ts_omit_ build tag (computed by [Tags]).
LOWcmd/tta/wgserver_linux.go41// - listen-port: WG listen port
LOWcmd/tailscale/generate.go1// Copyright (c) Tailscale Inc & contributors
LOWcmd/tailscale/cli/up.go261// Fields output when `tailscale up --json` is used. Two JSON blocks will be output.
LOWcmd/tailscale/cli/up.go401 warning = "netfilter=nodivert; add iptables calls to ts-* chains manually."
LOWcmd/tailscale/cli/up.go981 backendState string
LOWcmd/tailscale/cli/serve_legacy.go221// serve config types like proxy, path, and text.
LOWcmd/tailscale/cli/file.go321
LOWcmd/tailscale/cli/exitnode.go201
LOWcmd/tailscale/cli/jsonoutput/tailnet-lock-log.go181 LastAUMHash string `json:"LastAUMHash,omitzero"`
LOWcmd/tailscale/cli/jsonoutput/jsonoutput.go1// Copyright (c) Tailscale Inc & contributors
LOWcmd/testwrapper/testwrapper.go461 // `go test FILE` rather than `go test PKG`. It's more
LOWcmd/testwrapper/flakytest/flakytest.go41//
LOWcmd/netlogfmt/main.go1// Copyright (c) Tailscale Inc & contributors
LOWcmd/tsshd/tsshd.go1// Copyright (c) Tailscale Inc & contributors
LOWcmd/k8s-operator/proxygroup_specs.go261 // This mechanism currently (2025-01-26) rely on the local health check being accessible on the Pod's
LOWcmd/k8s-operator/operator.go781 tailscaleNamespace string // namespace in which operator resources will be deployed
LOWcmd/k8s-operator/operator.go801 // We should fix that and preferably integrate with that mechanism as
LOWcmd/k8s-operator/egress-pod-readiness.go41// https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-readiness-gate
LOWcmd/k8s-operator/egress-pod-readiness.go61//
LOWcmd/k8s-operator/proxygroup.go221 // Our custom logic for ensuring minimum downtime ProxyGroup update rollouts relies on the local health check
LOWcmd/k8s-operator/egress-services.go81}
LOWcmd/k8s-operator/dnsrecords.go41// records.
LOWcmd/k8s-operator/dnsrecords.go121//
LOWcmd/k8s-operator/ingress-for-pg.go81// mode (on a ProxyGroup). It looks at all Ingresses with
LOWcmd/k8s-operator/ingress-for-pg.go221 // that in edge cases (a single update changed both hostname and removed
LOWcmd/k8s-operator/deploy/chart/values.yaml1# Copyright (c) Tailscale Inc & contributors
LOWcmd/k8s-operator/deploy/chart/values.yaml21
1177 more matches not shown…
Hallucination Indicators10 hits · 100 pts
SeverityFileLineSnippet
CRITICALcmd/k8s-operator/proxyclass.go184 if errs := metavalidation.ValidateLabels(pc.Spec.Metrics.ServiceMonitor.Labels.Parse(), field.NewPath(".spec.metrics.s
CRITICALcmd/k8s-operator/sts_test.go192 wantSS.Spec.Template.Labels = proxyClassAllOpts.Spec.StatefulSet.Pod.Labels.Parse()
CRITICALcmd/k8s-operator/sts_test.go226 wantSS.Spec.Template.Labels = proxyClassJustLabels.Spec.StatefulSet.Pod.Labels.Parse()
CRITICALcmd/k8s-operator/sts_test.go238 wantSS.Spec.Template.Labels = proxyClassAllOpts.Spec.StatefulSet.Pod.Labels.Parse()
CRITICALcmd/k8s-operator/sts_test.go265 wantSS.Spec.Template.Labels = proxyClassJustLabels.Spec.StatefulSet.Pod.Labels.Parse()
CRITICALipn/ipnlocal/peerapi.go445 if hasCGNATInterface, err := h.ps.b.sys.NetMon.Get().HasCGNATInterface(); hasCGNATInterface {
CRITICALipn/ipnlocal/peerapi_drive.go56 fs, ok := h.ps.b.sys.DriveForRemote.GetOK()
CRITICALwgengine/magicsock/relaymanager.go111 if !r.wlb.ep.c.debugLogging.Load() {
CRITICALwgengine/magicsock/relaymanager.go351 if !r.wlb.ep.c.debugLogging.Load() {
CRITICALwgengine/magicsock/relaymanager.go415 sharedKey: work.wlb.ep.c.discoAtomic.Private().Shared(work.se.ServerDisco),
AI Slop Vocabulary10 hits · 30 pts
SeverityFileLineSnippet
MEDIUMtailcfg/tailcfg.go175// - 126: 2025-09-17: Client uses seamless key renewal unless disabled by control (tailscale/corp#31479)
MEDIUMutil/eventbus/debug.go33// deliberately withheld from bus clients to encourage more robust and
MEDIUMutil/winutil/restartmgr_windows.go149 // processes that utilize the binaries previously specified by calls to
MEDIUMutil/winutil/authenticode/authenticode_windows.go403 // 1. Subsequent API calls directly utilize the file's Win32 HANDLE;
MEDIUMtstest/largetailnet/delta_test.go106 // are robust against interleaving (assuming no other test runs in
MEDIUMwgengine/magicsock/magicsock.go1221// should provide a mechanism for seamless rotation by supporting short term use
MEDIUMwgengine/magicsock/endpoint.go1913 // Prefer IPv6 for being a bit more robust, as long as
MEDIUM…ature/buildfeatures/feature_listenrawdisco_disabled.go10// HasListenRawDisco is whether the binary was built with support for modular feature "Use raw sockets for more robust d
MEDIUMfeature/buildfeatures/feature_listenrawdisco_enabled.go10// HasListenRawDisco is whether the binary was built with support for modular feature "Use raw sockets for more robust d
MEDIUMcontrol/tsp/map_test.go90 // the test robust if a server-side keepalive arrives mid-test.
Synthetic Comment Markers2 hits · 15 pts
SeverityFileLineSnippet
HIGHutil/winutil/winutil.go106// the calling executable as requested via opts. This should be called by any
HIGHfeature/conn25/conn25.go538 // OK indicates that the mapping was created as requested.
Fake / Example Data14 hits · 14 pts
SeverityFileLineSnippet
LOWcmd/tailscale/cli/netcheck_test.go82 cliAddress: "lorem ipsum",
LOWcmd/tailscale/cli/netcheck_test.go84 wantError: `invalid bind address: "lorem ipsum"`,
LOWcmd/hello/helloserver/helloserver.go86 LoginName string // "foo@bar.com"
LOWipn/ipnlocal/diskcache_test.go30 LoginName: "user@example.com",
LOWipn/ipnlocal/profiles_test.go1205 LoginName: "user@example.com",
LOWutil/deephash/tailscale_types_test.go168 {ID: 1, LoginName: "foo@bar.com"},
LOWutil/dnsname/dnsname_test.go165 {"email", "admin@example.com", "admin-example-com"},
LOWssh/tailssh/tailssh_test.go207 Principals: []*tailcfg.SSHPrincipal{{UserLogin: "foo@bar.com"}},
LOWssh/tailssh/tailssh_test.go210 ci: &sshConnInfo{uprof: tailcfg.UserProfile{LoginName: "foo@bar.com"}},
LOWssh/tailssh/auditd_linux_test.go47 message: `op=login hostname="test-host" exe="/usr/bin/tailscaled" ts_user="user@example.com" ts_node="node.tail-scal
LOWk8s-operator/api-proxy/proxy_events_test.go73 LoginName: "user@example.com",
LOWk8s-operator/api-proxy/proxy_events_test.go86 NodeUser: "user@example.com",
LOWclient/web/web_test.go532 user := &tailcfg.UserProfile{LoginName: "user@example.com", ID: tailcfg.UserID(1)}
LOWclient/web/web_test.go853 user := &tailcfg.UserProfile{LoginName: "user@example.com", ID: tailcfg.UserID(1)}
Verbosity Indicators7 hits · 10 pts
SeverityFileLineSnippet
LOWcmd/containerboot/settings.go410// Step 1: run 'tailscaled'
LOWcmd/containerboot/settings.go420// Step 1: run 'tailscaled'
LOWipn/ipnlocal/peerapi.go698 // we need to check if they're allowed access to the internet.
LOWscripts/installer.sh23 # Step 1: detect the current linux distro, version, and packaging system.
LOWscripts/installer.sh422 # Step 2: having detected an OS we support, is it one of the
LOWscripts/installer.sh510 # Step 3: work out if we can run privileged commands, and if so,
LOWscripts/installer.sh532 # Step 4: run the installation.
Example Usage Blocks6 hits · 9 pts
SeverityFileLineSnippet
LOWcmd/netlogfmt/main.go9// Example usage:
LOWsafeweb/http.go47// # Example usage
LOWutil/must/must.go6// Example usage:
LOWutil/ctxkey/key.go6// Example usage:
LOWutil/ctxkey/key.go33// Example usage:
LOWutil/ctxkey/key.go53// Example usage:
Self-Referential Comments3 hits · 9 pts
SeverityFileLineSnippet
MEDIUMcmd/k8s-operator/deploy/manifests/proxy.yaml1# This file is not a complete manifest, it's a skeleton that the operator embeds
MEDIUMcmd/k8s-operator/deploy/manifests/userspace-proxy.yaml1# This file is not a complete manifest, it's a skeleton that the operator embeds
MEDIUMtstest/integration/vms/nixos_test.go65 # Define the package (derivation) for Tailscale based on the binaries we
Excessive Try-Catch Wrapping2 hits · 4 pts
SeverityFileLineSnippet
MEDIUMtstest/tailmac/Swift/Common/TailMacConfigHelper.swift117 print("Error binding virtual network client socket - \(String(cString: strerror(errno)))")
MEDIUMtstest/tailmac/Swift/Common/TailMacConfigHelper.swift134 print("Error connecting to server socket \(serverSocket) - \(String(cString: strerror(errno)))")
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMbuild_docker.sh10# If you want to build local images for testing, you can use make, which provides few convenience wrappers around this s
Hyper-Verbose Identifiers1 hit · 1 pts
SeverityFileLineSnippet
LOWclient/web/src/components/update-available.tsx10export function UpdateAvailableNotification({