Go client for Kubernetes.
This report summarizes scanner evidence for kubernetes/client-go, a Go project with 9,912 GitHub stars. SynthScan examined 385,168 lines of code across 2506 source files, recording 1519 pattern matches distributed across 7 syntactic categories. The legacy adjusted pattern signal is 4.1 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 1518 finding(s).
Are imports declared and package/API names verified? 1 finding(s).
Are wrappers, guards, and repeated structures necessary? 0 finding(s).
Which changes need focused human review? 1519 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 1519 distinct pattern matches across 7 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | doc.go | 21 | // # Key Packages | COMMENT |
| LOW | doc.go | 41 | // - rest: Provides a lower-level RESTClient that manages the details of | COMMENT |
| LOW | doc.go | 61 | // | COMMENT |
| LOW | doc.go | 81 | // share management of an object by tracking field ownership. This prevents | COMMENT |
| LOW | doc.go | 101 | // read-only access to the cache, and Workqueues decouple event detection | COMMENT |
| LOW | informers/factory.go | 281 | // SharedInformerFactory provides shared informers for resources in all known | COMMENT |
| LOW | informers/factory.go | 301 | // } | COMMENT |
| LOW | informers/factory.go | 321 | // which run until the stop channel gets closed. | COMMENT |
| LOW | ktesting/helper_test.go | 61 | // normalize replaces parts of message texts which may vary with constant strings. | COMMENT |
| LOW | ktesting/client.go | 61 | // New methods allow retrieving instances of several client-go types without | COMMENT |
| LOW | ktesting/doc.go | 21 | // | COMMENT |
| LOW | tools/metrics/metrics.go | 41 | COMMENT | |
| LOW | tools/metrics/metrics.go | 141 | // RequestLatency is the latency metric that rest clients will update. | COMMENT |
| LOW | tools/record/event.go | 61 | LRUCacheSize int | COMMENT |
| LOW | tools/record/event.go | 81 | // If not specified (zero value), the default specified in events_cache.go will be picked | COMMENT |
| LOW | tools/record/event.go | 121 | // WithLogger replaces the context used for logging. This is a cheap call | COMMENT |
| LOW | tools/record/event_test.go | 141 | // | COMMENT |
| LOW | tools/record/events_cache.go | 221 | } | COMMENT |
| LOW | tools/record/events_cache.go | 401 | // EventCorrelator processes all incoming events and performs analysis to avoid overwhelming the system. It can filter | COMMENT |
| LOW | tools/record/events_cache.go | 421 | Skip bool | COMMENT |
| LOW | tools/cache/index.go | 21 | COMMENT | |
| LOW | tools/cache/shared_informer.go | 41 | utiltrace "k8s.io/utils/trace" | COMMENT |
| LOW | tools/cache/shared_informer.go | 61 | // other appropriate content or (2) "absent". | COMMENT |
| LOW | tools/cache/shared_informer.go | 81 | // states is correct. Note, however, that there is no promise about | COMMENT |
| LOW | tools/cache/shared_informer.go | 101 | // | COMMENT |
| LOW | tools/cache/shared_informer.go | 121 | // update. Client notifications happen after the corresponding cache | COMMENT |
| LOW | tools/cache/shared_informer.go | 141 | // to something else, for example through a | COMMENT |
| LOW | tools/cache/shared_informer.go | 161 | // consists of delivering to the handler an update notification | COMMENT |
| LOW | tools/cache/shared_informer.go | 181 | // its registration handle. | COMMENT |
| LOW | tools/cache/shared_informer.go | 201 | Run(stopCh <-chan struct{}) | COMMENT |
| LOW | tools/cache/shared_informer.go | 221 | // LastSyncResourceVersion is the resource version observed when last synced with the underlying | COMMENT |
| LOW | tools/cache/shared_informer.go | 241 | SetWatchErrorHandler(handler WatchErrorHandler) error | COMMENT |
| LOW | tools/cache/shared_informer.go | 261 | // Must be set before starting the informer. | COMMENT |
| LOW | tools/cache/shared_informer.go | 281 | // HasSyncedChecker reports if both the parent has synced and all pre-sync | COMMENT |
| LOW | tools/cache/shared_informer.go | 301 | // SharedIndexInformer provides add and get Indexers ability based on SharedInformer. | COMMENT |
| LOW | tools/cache/shared_informer.go | 561 | if err != nil { | COMMENT |
| LOW | tools/cache/shared_informer.go | 641 | done := len(instances) == 0 | COMMENT |
| LOW | tools/cache/shared_informer.go | 741 | // main components. One is an indexed local cache, `indexer Indexer`. | COMMENT |
| LOW | tools/cache/shared_informer.go | 1421 | syncTracker *synctrack.SingleFileTracker | COMMENT |
| LOW | tools/cache/shared_informer.go | 1441 | // resyncs at all. | COMMENT |
| LOW | tools/cache/controller.go | 41 | // example in | COMMENT |
| LOW | tools/cache/controller.go | 61 | // For batch processing to be used: | COMMENT |
| LOW | tools/cache/controller.go | 81 | // negative performance impact on controlplane. | COMMENT |
| LOW | tools/cache/controller.go | 121 | clock clock.Clock | COMMENT |
| LOW | tools/cache/controller.go | 261 | } | COMMENT |
| LOW | tools/cache/controller.go | 301 | type TypedResourceEventHandler[T Object] interface { | COMMENT |
| LOW | tools/cache/controller.go | 321 | // | COMMENT |
| LOW | tools/cache/controller.go | 641 | COMMENT | |
| LOW | tools/cache/controller.go | 661 | // Transform function, if set, will be called on all objects before they will be | COMMENT |
| LOW | tools/cache/controller.go | 681 | var clientState Store | COMMENT |
| LOW | tools/cache/controller.go | 721 | //nolint:logcheck // Cannot provide Logger here, use NewInformerWithOptions. | COMMENT |
| LOW | tools/cache/controller.go | 881 | clientState.Bookmark(info.ResourceVersion) | COMMENT |
| LOW | tools/cache/the_real_fifo_test.go | 161 | f.Add(obj) | COMMENT |
| LOW | tools/cache/store.go | 21 | "fmt" | COMMENT |
| LOW | tools/cache/store.go | 141 | // the object but not the object itself. | COMMENT |
| LOW | tools/cache/fifo.go | 41 | // Pop blocks until there is at least one key to process or the | COMMENT |
| LOW | tools/cache/fifo.go | 61 | // HasSyncedChecker is done once the first batch of keys have all been | COMMENT |
| LOW | tools/cache/fifo.go | 81 | COMMENT | |
| LOW | tools/cache/fifo.go | 101 | // object's key is in the queue before it has been processed then it | COMMENT |
| LOW | tools/cache/informer_metrics.go | 41 | // | COMMENT |
| 1438 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | example_test.go | 187 | // have more robust logic and a workqueue. | COMMENT |
| MEDIUM | doc.go | 91 | // found or already exists. This allows controllers to implement robust, | COMMENT |
| MEDIUM | tools/cache/reflector.go | 898 | // we utilize the temporaryStore to ensure independence from the current store implementation. | COMMENT |
| MEDIUM | …igurations/core/v1/nodeallocatableoverheadresources.go | 34 | // Adding to each container limit allows individual containers to utilize the overhead, while the parent pod-level cgro | COMMENT |
| MEDIUM | applyconfigurations/core/v1/endpointsubset.go | 39 | // should be considered safe for load balancers and clients to utilize. | COMMENT |
| MEDIUM | applyconfigurations/resource/v1/celdeviceselector.go | 66 | // A robust expression should check for the existence of attributes | COMMENT |
| MEDIUM | …lyconfigurations/resource/v1/devicederivedattribute.go | 58 | // extremely hard to detect. A robust expression should, for example, check | COMMENT |
| MEDIUM | …lyconfigurations/resource/v1beta2/celdeviceselector.go | 66 | // A robust expression should check for the existence of attributes | COMMENT |
| MEDIUM | …figurations/resource/v1beta2/devicederivedattribute.go | 58 | // extremely hard to detect. A robust expression should, for example, check | COMMENT |
| MEDIUM | …lyconfigurations/resource/v1beta1/celdeviceselector.go | 66 | // A robust expression should check for the existence of attributes | COMMENT |
| MEDIUM | …figurations/resource/v1beta1/devicederivedattribute.go | 58 | // extremely hard to detect. A robust expression should, for example, check | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | applyconfigurations/apps/v1/statefulset.go | 36 | // - Storage: As many VolumeClaims as requested. | COMMENT |
| HIGH | applyconfigurations/apps/v1beta2/statefulset.go | 38 | // - Storage: As many VolumeClaims as requested. | COMMENT |
| HIGH | applyconfigurations/apps/v1beta1/statefulset.go | 38 | // - Storage: As many VolumeClaims as requested. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | dynamic/fake/simple_test.go | 307 | // TODO: Add tests for strategic merge using v1.Pod for example to ensure the test cases | COMMENT |
| LOW | metadata/fake/simple_test.go | 200 | // TODO: Add tests for strategic merge using v1.Pod for example to ensure the test cases | COMMENT |
| LOW | rest/request.go | 1189 | // TODO: Add test for this. Steps may be: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/cache/fifo_test.go | 83 | // NOTE: This function is deprecated and may be removed in the future without | COMMENT |
| LOW | discovery/discovery_client.go | 763 | // NOTE: This function is resilient to the ordering of the | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/watch/retrywatcher.go | 101 | // and we need to check if stop wasn't requested while doing so. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/clientcmd/client_config_test.go | 1256 | if err := os.WriteFile(keyFile.Name(), []byte("dummy-key-content"), 0600); err != nil { | CODE |