Redis Go client
This report presents the forensic synthetic code analysis of redis/go-redis, a Go project with 22,192 GitHub stars. SynthScan v2.0 examined 142,192 lines of code across 365 source files, recording 276 pattern matches distributed across 6 syntactic categories. The overall adjusted score of 2.7 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).
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 276 distinct pattern matches across 6 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 |
|---|---|---|---|---|
| LOW | hash_commands.go | 121 | return cmd | COMMENT |
| LOW | command.go | 961 | return true | COMMENT |
| LOW | command.go | 2001 | // Many commands will respond to two formats: | COMMENT |
| LOW | options.go | 41 | Allow() error | COMMENT |
| LOW | options.go | 61 | // | COMMENT |
| LOW | options.go | 81 | Protocol int | COMMENT |
| LOW | options.go | 101 | // There will be a conflict between them; if CredentialsProviderContext exists, we will ignore CredentialsProvider. | COMMENT |
| LOW | options.go | 121 | // MinRetryBackoff is the minimum backoff between each retry. | COMMENT |
| LOW | options.go | 141 | COMMENT | |
| LOW | options.go | 161 | ReadTimeout time.Duration | COMMENT |
| LOW | options.go | 181 | ReadBufferSize int | COMMENT |
| LOW | options.go | 201 | // Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS. | COMMENT |
| LOW | options.go | 221 | // default: 0 | COMMENT |
| LOW | options.go | 241 | // If d <= 0, connections are not closed due to a connection's idle time. | COMMENT |
| LOW | options.go | 261 | // | COMMENT |
| LOW | options.go | 281 | // Deprecated: Use DisableIdentity instead. | COMMENT |
| LOW | options.go | 461 | // Scheme is required. | COMMENT |
| LOW | options.go | 481 | // names will be treated as unknown parameters | COMMENT |
| LOW | osscluster.go | 141 | // | COMMENT |
| LOW | osscluster.go | 281 | // The URL must be in the form: | COMMENT |
| LOW | osscluster.go | 301 | // - fields "network", "addr", "username" and "password" can only be set using other | COMMENT |
| LOW | hset_benchmark_test.go | 21 | // | COMMENT |
| LOW | sortedset_commands.go | 341 | return cmd | COMMENT |
| LOW | sortedset_commands.go | 361 | type ZRangeArgs struct { | COMMENT |
| LOW | sortedset_commands.go | 381 | // Stop: "(3", | COMMENT |
| LOW | sortedset_commands.go | 401 | // Start: "(def", | COMMENT |
| LOW | internal_maint_notif_test.go | 21 | // | COMMENT |
| LOW | hotkeys_commands.go | 1 | package redis | COMMENT |
| LOW | hotkeys_commands.go | 41 | // Duration is the auto-stop tracking after this many seconds. | COMMENT |
| LOW | pubsub.go | 81 | COMMENT | |
| LOW | osscluster_maintnotifications_test.go | 221 | // +SMIGRATED <- message name | COMMENT |
| LOW | pipeline.go | 1 | package redis | COMMENT |
| LOW | universal_test.go | 81 | // reports zero usable replicas (post-failover replicas often | COMMENT |
| LOW | stream_commands.go | 81 | COMMENT | |
| LOW | stream_commands.go | 401 | ) | COMMENT |
| LOW | stream_commands.go | 421 | // counter is set to MAXINT, which will immediately move the message to | COMMENT |
| LOW | stream_commands.go | 561 | int64(a.MinIdle/time.Millisecond)) | COMMENT |
| LOW | redis.go | 141 | if h.txPipeline == nil { | COMMENT |
| LOW | redis.go | 161 | // return nil | COMMENT |
| LOW | redis.go | 261 | // by NewFailoverClient to tear down sentinel failover background work. | COMMENT |
| LOW | redis.go | 641 | COMMENT | |
| LOW | redis.go | 1601 | // Channels can be omitted to create empty subscription. | COMMENT |
| LOW | redis.go | 1741 | // | COMMENT |
| LOW | set_commands.go | 161 | // Returns if member is a member of the set stored at key. | COMMENT |
| LOW | set_commands.go | 201 | } | COMMENT |
| LOW | set_commands.go | 241 | // This version returns up to count random members. | COMMENT |
| LOW | set_commands.go | 261 | return cmd | COMMENT |
| LOW | string_commands.go | 81 | // | COMMENT |
| LOW | string_commands.go | 121 | // | COMMENT |
| LOW | string_commands.go | 181 | func (c cmdable) GetDel(ctx context.Context, key string) *StringCmd { | COMMENT |
| LOW | string_commands.go | 261 | // Saturate clamps the result to LBOUND/UBOUND (or ±LDBL_MAX when no | COMMENT |
| LOW | string_commands.go | 501 | // MatchDigest is used with IFDEQ/IFDNE modes for digest-based compare-and-set. | COMMENT |
| LOW | string_commands.go | 581 | // to the socket — effectively zero-copy on the send path. | COMMENT |
| LOW | string_commands.go | 761 | _ = c(ctx, cmd) | COMMENT |
| LOW | string_commands.go | 801 | // SetIFDEQGet sets the value only if the current value's digest equals matchDigest, | COMMENT |
| LOW | string_commands.go | 841 | // The matchDigest parameter is a uint64 xxh3 hash value. | COMMENT |
| LOW | internal_test.go | 341 | } | COMMENT |
| LOW | internal_test.go | 1021 | func (*stubCredentialsListener) OnNext(auth.Credentials) {} | COMMENT |
| LOW | internal_test.go | 1081 | } | COMMENT |
| LOW | universal.go | 121 | // DisableIndentity - Disable set-lib on connect. | COMMENT |
| 118 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | example/otel/uptrace.yml | 1 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | example/otel/uptrace.yml | 3 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | example/otel/uptrace.yml | 11 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | example/otel/uptrace.yml | 13 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | example/otel/uptrace.yml | 15 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | example/otel/uptrace.yml | 21 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | example/otel/uptrace.yml | 23 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | example/otel/uptrace.yml | 246 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | example/otel/uptrace.yml | 248 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | example/otel/uptrace.yml | 255 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | example/otel/uptrace.yml | 257 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 42 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 44 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 67 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 69 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 85 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 87 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 142 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 144 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 185 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 187 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 201 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 203 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 225 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 227 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 274 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 276 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 333 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 335 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 350 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 352 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 377 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 379 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 405 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | example/otel/uptrace.yml | 407 | # ----------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tls_cert_auth_test.go | 91 | // Step 3: Load CA certificate for server verification | COMMENT |
| LOW⚡ | tls_cert_auth_test.go | 97 | // Step 4: Load the pre-generated client certificate with CN=testcertuser | COMMENT |
| LOW⚡ | tls_cert_auth_test.go | 107 | // Step 5: Create TLS config with the client certificate | COMMENT |
| LOW⚡ | tls_cert_auth_test.go | 209 | // Step 2: Load CA certificate for server verification | COMMENT |
| LOW⚡ | tls_cert_auth_test.go | 215 | // Step 3: Load the client certificate with CN=testcertuser | COMMENT |
| LOW⚡ | tls_cert_auth_test.go | 225 | // Step 4: Create TLS config with the client certificate | COMMENT |
| LOW⚡ | tls_cert_auth_test.go | 236 | // Step 5: Connect with TLS using the certificate | COMMENT |
| LOW⚡ | tls_cert_auth_test.go | 243 | // Step 6: Verify we're authenticated as "default" (fallback) | COMMENT |
| LOW | tls_cert_auth_test.go | 53 | // Step 1: Create a non-TLS client to set up the ACL user | COMMENT |
| LOW | tls_cert_auth_test.go | 67 | // Step 2: Create ACL user with specific permissions | COMMENT |
| LOW | tls_cert_auth_test.go | 118 | // Step 6: Connect with TLS using the certificate | COMMENT |
| LOW | tls_cert_auth_test.go | 129 | // Step 7: Verify we're authenticated as the correct user | COMMENT |
| LOW | tls_cert_auth_test.go | 140 | // Step 8: Test that we can execute allowed commands | COMMENT |
| LOW | tls_cert_auth_test.go | 154 | // Step 9: Test that we CANNOT execute disallowed commands | COMMENT |
| LOW | tls_cert_auth_test.go | 183 | // Step 1: Create a non-TLS client to ensure the user does NOT exist | COMMENT |
| LOW | tls_cert_auth_test.go | 255 | // Step 7: Verify we can execute commands as default user | COMMENT |
| LOW | example/tls-cert-auth/main.go | 42 | // Step 1: First, ensure the ACL user exists (using non-TLS connection) | COMMENT |
| LOW⚡ | example/tls-cert-auth/main.go | 60 | // Step 2: Load CA certificate | COMMENT |
| LOW⚡ | example/tls-cert-auth/main.go | 68 | // Step 3: Load client certificate (CN must match the Redis ACL username) | COMMENT |
| LOW⚡ | example/tls-cert-auth/main.go | 77 | // Step 4: Create TLS config | COMMENT |
| LOW⚡ | example/tls-cert-auth/main.go | 85 | // Step 5: Connect to Redis with TLS - NO username/password needed! | COMMENT |
| LOW⚡ | example/tls-cert-auth/main.go | 93 | // Step 6: Verify authentication | COMMENT |
| LOW⚡ | example/tls-cert-auth/main.go | 100 | // Step 7: Test some commands | COMMENT |
| LOW | maintnotifications/e2e/proxy_fault_injector_server.go | 499 | // Step 1: Inject SMIGRATING notification | COMMENT |
| LOW | maintnotifications/e2e/proxy_fault_injector_server.go | 519 | // Step 2: Inject SMIGRATED notification | COMMENT |
| LOW | maintnotifications/e2e/proxy_fault_injector_server.go | 645 | // Step 1: Inject FAILING_OVER notification | COMMENT |
| LOW | maintnotifications/e2e/proxy_fault_injector_server.go | 664 | // Step 2: Inject FAILED_OVER notification | COMMENT |
| LOW | maintnotifications/e2e/proxy_fault_injector_server.go | 688 | // Step 1: Inject MIGRATING notification (no MOVING for migrate action) | COMMENT |
| LOW | maintnotifications/e2e/proxy_fault_injector_server.go | 709 | // Step 2: Inject MIGRATED notification | COMMENT |
| LOW | logging/logging.go | 41 | // NOTE: This function is not thread-safe. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tls_cert_auth_test.go | 91 | // Step 3: Load CA certificate for server verification | COMMENT |
| LOW⚡ | tls_cert_auth_test.go | 97 | // Step 4: Load the pre-generated client certificate with CN=testcertuser | COMMENT |
| LOW⚡ | tls_cert_auth_test.go | 107 | // Step 5: Create TLS config with the client certificate | COMMENT |
| LOW⚡ | tls_cert_auth_test.go | 209 | // Step 2: Load CA certificate for server verification | COMMENT |
| LOW⚡ | tls_cert_auth_test.go | 215 | // Step 3: Load the client certificate with CN=testcertuser | COMMENT |
| LOW⚡ | tls_cert_auth_test.go | 225 | // Step 4: Create TLS config with the client certificate | COMMENT |
| LOW⚡ | tls_cert_auth_test.go | 236 | // Step 5: Connect with TLS using the certificate | COMMENT |
| LOW⚡ | tls_cert_auth_test.go | 243 | // Step 6: Verify we're authenticated as "default" (fallback) | COMMENT |
| LOW | tls_cert_auth_test.go | 53 | // Step 1: Create a non-TLS client to set up the ACL user | COMMENT |
| LOW | tls_cert_auth_test.go | 67 | // Step 2: Create ACL user with specific permissions | COMMENT |
| LOW | tls_cert_auth_test.go | 118 | // Step 6: Connect with TLS using the certificate | COMMENT |
| LOW | tls_cert_auth_test.go | 129 | // Step 7: Verify we're authenticated as the correct user | COMMENT |
| LOW | tls_cert_auth_test.go | 140 | // Step 8: Test that we can execute allowed commands | COMMENT |
| LOW | tls_cert_auth_test.go | 154 | // Step 9: Test that we CANNOT execute disallowed commands | COMMENT |
| LOW | tls_cert_auth_test.go | 183 | // Step 1: Create a non-TLS client to ensure the user does NOT exist | COMMENT |
| LOW | tls_cert_auth_test.go | 255 | // Step 7: Verify we can execute commands as default user | COMMENT |
| LOW | example/tls-cert-auth/main.go | 42 | // Step 1: First, ensure the ACL user exists (using non-TLS connection) | COMMENT |
| LOW⚡ | example/tls-cert-auth/main.go | 60 | // Step 2: Load CA certificate | COMMENT |
| LOW⚡ | example/tls-cert-auth/main.go | 68 | // Step 3: Load client certificate (CN must match the Redis ACL username) | COMMENT |
| LOW⚡ | example/tls-cert-auth/main.go | 77 | // Step 4: Create TLS config | COMMENT |
| LOW⚡ | example/tls-cert-auth/main.go | 85 | // Step 5: Connect to Redis with TLS - NO username/password needed! | COMMENT |
| LOW⚡ | example/tls-cert-auth/main.go | 93 | // Step 6: Verify authentication | COMMENT |
| LOW⚡ | example/tls-cert-auth/main.go | 100 | // Step 7: Test some commands | COMMENT |
| LOW | maintnotifications/e2e/proxy_fault_injector_server.go | 499 | // Step 1: Inject SMIGRATING notification | COMMENT |
| LOW | maintnotifications/e2e/proxy_fault_injector_server.go | 519 | // Step 2: Inject SMIGRATED notification | COMMENT |
| LOW | maintnotifications/e2e/proxy_fault_injector_server.go | 645 | // Step 1: Inject FAILING_OVER notification | COMMENT |
| LOW | maintnotifications/e2e/proxy_fault_injector_server.go | 664 | // Step 2: Inject FAILED_OVER notification | COMMENT |
| LOW | maintnotifications/e2e/proxy_fault_injector_server.go | 688 | // Step 1: Inject MIGRATING notification (no MOVING for migrate action) | COMMENT |
| LOW | maintnotifications/e2e/proxy_fault_injector_server.go | 709 | // Step 2: Inject MIGRATED notification | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | osscluster_test.go | 2611 | // Values should be in the same order as requested keys | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | search_builders_test.go | 324 | client.HSet(ctx, "doc1", "title", "hello world", "body", "lorem ipsum") | CODE |
| LOW | search_test.go | 313 | client.HSet(ctx, "doc2", "f1", "very important", "f2", "lorem ipsum") | CODE |
| LOW | search_test.go | 4478 | client.HSet(ctx, "doc2", "f1", "very important", "f2", "lorem ipsum") | CODE |