Repository Analysis

redis/go-redis

Redis Go client

2.3 Likely human-written View on GitHub
2.3
Adjusted Score
2.3
Raw Score
100%
Time Factor
2026-05-30
Last Push
22,115
Stars
Go
Language
138,542
Lines of Code
351
Files
234
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 1MEDIUM 35LOW 198

Pattern Findings

234 matches across 5 categories. Click a row to expand file-level details.

Over-Commented Block166 hits · 158 pts
SeverityFileLineSnippet
LOWhash_commands.go121 return cmd
LOWcommand.go1101 }
LOWoptions.go41 Allow() error
LOWoptions.go61 //
LOWoptions.go81 Protocol int
LOWoptions.go101 // There will be a conflict between them; if CredentialsProviderContext exists, we will ignore CredentialsProvider.
LOWoptions.go121 // MinRetryBackoff is the minimum backoff between each retry.
LOWoptions.go141
LOWoptions.go161 ReadTimeout time.Duration
LOWoptions.go181 ReadBufferSize int
LOWoptions.go201 // Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.
LOWoptions.go221 // default: 0
LOWoptions.go241 // If d <= 0, connections are not closed due to a connection's idle time.
LOWoptions.go261 //
LOWoptions.go281 // Deprecated: Use DisableIdentity instead.
LOWoptions.go461// Scheme is required.
LOWoptions.go481// names will be treated as unknown parameters
LOWosscluster.go141 //
LOWosscluster.go281// The URL must be in the form:
LOWosscluster.go301// - fields "network", "addr", "username" and "password" can only be set using other
LOWhset_benchmark_test.go21//
LOWsortedset_commands.go341 return cmd
LOWsortedset_commands.go361type ZRangeArgs struct {
LOWsortedset_commands.go381 // Stop: "(3",
LOWsortedset_commands.go401 // Start: "(def",
LOWinternal_maint_notif_test.go21//
LOWhotkeys_commands.go1package redis
LOWhotkeys_commands.go41 // Duration is the auto-stop tracking after this many seconds.
LOWpubsub.go81
LOWosscluster_maintnotifications_test.go221// +SMIGRATED <- message name
LOWpipeline.go1package redis
LOWuniversal_test.go81 // reports zero usable replicas (post-failover replicas often
LOWstream_commands.go381 // Must be one of [XNackModeSilent], [XNackModeFail], or [XNackModeFatal]:
LOWredis.go101
LOWredis.go121// hook-2:
LOWredis.go221 return hs.current.txPipeline(ctx, cmds)
LOWredis.go241// motivated issue #3772.
LOWredis.go581
LOWredis.go1561}
LOWredis.go1701// processPushNotifications processes all pending push notifications on a connection
LOWset_commands.go161// Returns if member is a member of the set stored at key.
LOWset_commands.go201}
LOWset_commands.go241// This version returns up to count random members.
LOWset_commands.go261 return cmd
LOWstring_commands.go81 //
LOWstring_commands.go241 // Saturate clamps the result to LBOUND/UBOUND (or ±LDBL_MAX when no
LOWstring_commands.go481 // MatchDigest is used with IFDEQ/IFDNE modes for digest-based compare-and-set.
LOWstring_commands.go721 return cmd
LOWstring_commands.go761// and returns the previous value.
LOWstring_commands.go801//
LOWinternal_test.go341 }
LOWinternal_test.go1021func (*stubCredentialsListener) OnNext(auth.Credentials) {}
LOWinternal_test.go1081 }
LOWuniversal.go121 // DisableIndentity - Disable set-lib on connect.
LOWuniversal.go361
LOWsentinel.go141
LOWsentinel.go161 FailingTimeoutSeconds int
LOWsentinel.go361// To add additional addresses, specify the query parameter, "addr" one or more times. e.g:
LOWring.go141 // Smaller buffers can improve memory usage for larger pools.
LOWotel.go41 // poolName: name of the connection pool (e.g., "main", "pubsub")
106 more matches not shown…
Decorative Section Separators35 hits · 99 pts
SeverityFileLineSnippet
MEDIUMexample/otel/uptrace.yml1# =============================================================================
MEDIUMexample/otel/uptrace.yml3# =============================================================================
MEDIUMexample/otel/uptrace.yml11# =============================================================================
MEDIUMexample/otel/uptrace.yml13# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml15# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml21# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml23# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml246# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml248# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml255# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml257# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml42# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml44# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml67# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml69# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml85# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml87# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml142# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml144# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml185# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml187# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml201# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml203# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml225# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml227# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml274# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml276# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml333# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml335# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml350# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml352# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml377# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml379# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml405# -----------------------------------------------------------------------------
MEDIUMexample/otel/uptrace.yml407# -----------------------------------------------------------------------------
Verbosity Indicators29 hits · 52 pts
SeverityFileLineSnippet
LOWtls_cert_auth_test.go53 // Step 1: Create a non-TLS client to set up the ACL user
LOWtls_cert_auth_test.go67 // Step 2: Create ACL user with specific permissions
LOWtls_cert_auth_test.go91 // Step 3: Load CA certificate for server verification
LOWtls_cert_auth_test.go97 // Step 4: Load the pre-generated client certificate with CN=testcertuser
LOWtls_cert_auth_test.go107 // Step 5: Create TLS config with the client certificate
LOWtls_cert_auth_test.go118 // Step 6: Connect with TLS using the certificate
LOWtls_cert_auth_test.go129 // Step 7: Verify we're authenticated as the correct user
LOWtls_cert_auth_test.go140 // Step 8: Test that we can execute allowed commands
LOWtls_cert_auth_test.go154 // Step 9: Test that we CANNOT execute disallowed commands
LOWtls_cert_auth_test.go183 // Step 1: Create a non-TLS client to ensure the user does NOT exist
LOWtls_cert_auth_test.go209 // Step 2: Load CA certificate for server verification
LOWtls_cert_auth_test.go215 // Step 3: Load the client certificate with CN=testcertuser
LOWtls_cert_auth_test.go225 // Step 4: Create TLS config with the client certificate
LOWtls_cert_auth_test.go236 // Step 5: Connect with TLS using the certificate
LOWtls_cert_auth_test.go243 // Step 6: Verify we're authenticated as "default" (fallback)
LOWtls_cert_auth_test.go255 // Step 7: Verify we can execute commands as default user
LOWexample/tls-cert-auth/main.go42 // Step 1: First, ensure the ACL user exists (using non-TLS connection)
LOWexample/tls-cert-auth/main.go60 // Step 2: Load CA certificate
LOWexample/tls-cert-auth/main.go68 // Step 3: Load client certificate (CN must match the Redis ACL username)
LOWexample/tls-cert-auth/main.go77 // Step 4: Create TLS config
LOWexample/tls-cert-auth/main.go85 // Step 5: Connect to Redis with TLS - NO username/password needed!
LOWexample/tls-cert-auth/main.go93 // Step 6: Verify authentication
LOWexample/tls-cert-auth/main.go100 // Step 7: Test some commands
LOWmaintnotifications/e2e/proxy_fault_injector_server.go499 // Step 1: Inject SMIGRATING notification
LOWmaintnotifications/e2e/proxy_fault_injector_server.go519 // Step 2: Inject SMIGRATED notification
LOWmaintnotifications/e2e/proxy_fault_injector_server.go645 // Step 1: Inject FAILING_OVER notification
LOWmaintnotifications/e2e/proxy_fault_injector_server.go664 // Step 2: Inject FAILED_OVER notification
LOWmaintnotifications/e2e/proxy_fault_injector_server.go688 // Step 1: Inject MIGRATING notification (no MOVING for migrate action)
LOWmaintnotifications/e2e/proxy_fault_injector_server.go709 // Step 2: Inject MIGRATED notification
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippet
HIGHosscluster_test.go2611 // Values should be in the same order as requested keys
Fake / Example Data3 hits · 3 pts
SeverityFileLineSnippet
LOWsearch_builders_test.go324 client.HSet(ctx, "doc1", "title", "hello world", "body", "lorem ipsum")
LOWsearch_test.go313 client.HSet(ctx, "doc2", "f1", "very important", "f2", "lorem ipsum")
LOWsearch_test.go4488 client.HSet(ctx, "doc2", "f1", "very important", "f2", "lorem ipsum")