Sarama is a Go library for Apache Kafka.
This report summarizes scanner evidence for IBM/sarama, a Go project with 12,525 GitHub stars. SynthScan examined 95,752 lines of code across 385 source files, recording 82 pattern matches distributed across 3 syntactic categories. The legacy adjusted pattern signal is 1.0 (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? 81 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? 82 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 82 distinct pattern matches across 3 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 | partitioner.go | 21 | // partitions (even ones known to be unavailable), and its choice must be | COMMENT |
| LOW | config.go | 41 | // Net is the namespace for network-level properties used by the Broker, and | COMMENT |
| LOW | config.go | 61 | // original address list. Similar to the `client.dns.lookup` option in | COMMENT |
| LOW | config.go | 81 | Enable bool | COMMENT |
| LOW | config.go | 141 | // cluster is in the middle of a leader election (default 3). | COMMENT |
| LOW | config.go | 161 | COMMENT | |
| LOW | config.go | 181 | } | COMMENT |
| LOW | config.go | 201 | // RequiredAcks (defaults to 10 seconds). This is only relevant when | COMMENT |
| LOW | config.go | 221 | // Transaction specify | COMMENT |
| LOW | config.go | 241 | } | COMMENT |
| LOW | config.go | 261 | // across all its accumulated topic and partition batches. Producer.MaxMessageBytes | COMMENT |
| LOW | config.go | 281 | // Similar to the `message.send.max.retries` setting of the JVM producer. | COMMENT |
| LOW | config.go | 301 | // Defaults to 0 for unlimited. | COMMENT |
| LOW | config.go | 321 | Session struct { | COMMENT |
| LOW | config.go | 341 | // | COMMENT |
| LOW | config.go | 381 | // under-replication where a replica does not have all the data yet. It can be | COMMENT |
| LOW | config.go | 401 | } | COMMENT |
| LOW | config.go | 421 | // (no limit). Similar to the JVM's `fetch.message.max.bytes`. The | COMMENT |
| LOW | config.go | 441 | // The maximum amount of time the consumer expects a message takes to | COMMENT |
| LOW | config.go | 461 | // you must read from them to prevent deadlock. | COMMENT |
| LOW | config.go | 481 | // When disabled, marked offsets are only sent by | COMMENT |
| LOW | config.go | 501 | // (default is 0: disabled). | COMMENT |
| LOW | config.go | 521 | // interceptor chain. | COMMENT |
| LOW | config.go | 541 | // and most 3rdparty ones. | COMMENT |
| LOW | metadata.go | 241 | ch, queued := m.refreshOrQueue(topics) | COMMENT |
| LOW | sync_producer.go | 21 | type SyncProducer interface { | COMMENT |
| LOW | async_producer.go | 21 | COMMENT | |
| LOW | async_producer.go | 41 | // when both the Errors and Successes channels have been closed. When calling | COMMENT |
| LOW | async_producer.go | 361 | // Sarama completely ignores this field and is only to be used for | COMMENT |
| LOW | list_transactions_request.go | 21 | // one of the filtered states are returned | COMMENT |
| LOW | CHANGELOG.md | 1321 | ### Improvements | COMMENT |
| LOW | CHANGELOG.md | 1341 | ## Fixes | COMMENT |
| LOW | sarama.go | 101 | COMMENT | |
| LOW | describe_groups_response.go | 221 | COMMENT | |
| LOW | request_test.go | 421 | // TODO: FindCoordinatorRequest v5 is not supported, but expected for KafkaVersion 3.8.0 | COMMENT |
| LOW | request_test.go | 441 | // apiKeyListOffsets: 9, // up from 8 | COMMENT |
| LOW | request_test.go | 461 | // apiKeyEndTxn: 5, // up from 4 | COMMENT |
| LOW | request.go | 221 | return &UpdateFeaturesRequest{Version: version} | COMMENT |
| LOW | offset_manager.go | 621 | } | COMMENT |
| LOW | offset_manager.go | 641 | // To follow upstream conventions, you are expected to mark the offset of the | COMMENT |
| LOW | offset_manager.go | 661 | // Consumer.Return.Errors setting to true, and read from this channel. | COMMENT |
| LOW | client.go | 21 | // automatically when it passes out of scope. It is safe to share a client amongst many | COMMENT |
| LOW | client.go | 81 | // available metadata for those topics. If no topics are provided, it will refresh | COMMENT |
| LOW | client.go | 121 | // to call this function before a client object passes out of scope, as it will | COMMENT |
| LOW | client.go | 1081 | // Close may have run since the check above, leaving nil maps | COMMENT |
| LOW | interceptors.go | 1 | package sarama | COMMENT |
| LOW | produce_response.go | 1 | package sarama | COMMENT |
| LOW | admin.go | 21 | // It may take several seconds after CreateTopic returns success for all the brokers | COMMENT |
| LOW | admin.go | 41 | // If partitions are increased for a topic that has a key, the partition logic or ordering of | COMMENT |
| LOW | admin.go | 61 | // The returned configuration includes default values and the Default is true | COMMENT |
| LOW | admin.go | 81 | // This operation is supported by brokers with version 0.11.0.0 or higher. | COMMENT |
| LOW | admin.go | 101 | // | COMMENT |
| LOW | admin.go | 121 | // ElectLeaders allows to trigger the election of preferred leaders for a set of partitions. | COMMENT |
| LOW | admin.go | 141 | // is re-batched. Non-retriable per-group errors are returned in the per-group Err. | COMMENT |
| LOW | consumer.go | 61 | // This method is the same as Client.Partitions(), and is provided for convenience. | COMMENT |
| LOW | consumer.go | 361 | for _, partitions := range c.children { | COMMENT |
| LOW | consumer.go | 381 | // | COMMENT |
| LOW | consumer.go | 401 | // Messages returns the read channel for the messages that are returned by | COMMENT |
| LOW | fetch_request.go | 61 | return err | COMMENT |
| LOW | fetch_request.go | 81 | // transactional records. Using READ_UNCOMMITTED (isolation_level = 0) | COMMENT |
| 20 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | partitioner_test.go | 324 | // org.apache.kafka.common.utils.Utils.murmur2() implementation | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | utils.go | 366 | // Example usage: | COMMENT |