Rust Kubernetes client and controller runtime
This report summarizes scanner evidence for kube-rs/kube, a Rust project with 3,845 GitHub stars. SynthScan examined 49,269 lines of code across 223 source files, recording 453 pattern matches distributed across 6 syntactic categories. The legacy adjusted pattern signal is 9.3 (Moderate 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.
Can maintainers explain intent, assumptions, and trade-offs? 453 finding(s).
Are imports declared and package/API names verified? 0 finding(s).
Are wrappers, guards, and repeated structures necessary? 0 finding(s).
Which changes need focused human review? 453 finding(s).
Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.
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 453 distinct pattern matches across 6 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 | release.toml | 1 | # Release process :: cargo-release >= 0.18.3 | COMMENT |
| LOW | kube-runtime/src/events.rs | 21 | const CACHE_TTL: SignedDuration = SignedDuration::from_mins(6); | COMMENT |
| LOW | kube-runtime/src/events.rs | 41 | COMMENT | |
| LOW | kube-runtime/src/events.rs | 61 | /// | COMMENT |
| LOW | kube-runtime/src/events.rs | 101 | pub reason: String, | COMMENT |
| LOW | kube-runtime/src/events.rs | 121 | /// | COMMENT |
| LOW | kube-runtime/src/events.rs | 161 | Self { | COMMENT |
| LOW | kube-runtime/src/events.rs | 181 | /// instance: std::env::var("CONTROLLER_POD_NAME").ok(), | COMMENT |
| LOW | kube-runtime/src/events.rs | 201 | /// }, | COMMENT |
| LOW | kube-runtime/src/wait.rs | 21 | /// | COMMENT |
| LOW | kube-runtime/src/wait.rs | 41 | /// use k8s_openapi::apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinition; | COMMENT |
| LOW | kube-runtime/src/wait.rs | 81 | /// use k8s_openapi::api::core::v1::Pod; | COMMENT |
| LOW | kube-runtime/src/wait.rs | 101 | /// # Usage | COMMENT |
| LOW | kube-runtime/src/wait.rs | 121 | /// # use kube_runtime::wait::Condition; | COMMENT |
| LOW | kube-runtime/src/lib.rs | 1 | //! Common components for building Kubernetes operators | COMMENT |
| LOW | kube-runtime/src/finalizer.rs | 81 | /// in your [`applier`](crate::applier)/[`Controller`](crate::Controller)'s `reconcile` function. | COMMENT |
| LOW | kube-runtime/src/finalizer.rs | 101 | /// If [`Event::Apply`] is ever started then [`Event::Cleanup`] must succeed before the Kubernetes object deletion compl | COMMENT |
| LOW | kube-runtime/src/finalizer.rs | 121 | /// | COMMENT |
| LOW | kube-runtime/src/finalizer.rs | 241 | pub enum Event<K> { | COMMENT |
| LOW | kube-runtime/src/watcher.rs | 61 | pub type Result<T, E = Error> = std::result::Result<T, E>; | COMMENT |
| LOW | kube-runtime/src/watcher.rs | 81 | /// A series of `InitApply` events are expected to follow until all matching objects | COMMENT |
| LOW | kube-runtime/src/watcher.rs | 121 | /// This allows for memory optimizations in watch streams. | COMMENT |
| LOW | kube-runtime/src/watcher.rs | 201 | api: Api<K>, | COMMENT |
| LOW | kube-runtime/src/watcher.rs | 221 | /// This is faster and much less taxing on the apiserver, but can result | COMMENT |
| LOW | kube-runtime/src/watcher.rs | 241 | /// | COMMENT |
| LOW | kube-runtime/src/watcher.rs | 261 | /// | COMMENT |
| LOW | kube-runtime/src/watcher.rs | 281 | /// streaming list bookmarks (opt-in feature gate in Kubernetes 1.27). | COMMENT |
| LOW | kube-runtime/src/watcher.rs | 321 | /// | COMMENT |
| LOW | kube-runtime/src/watcher.rs | 361 | /// Configure typed label selectors | COMMENT |
| LOW | kube-runtime/src/watcher.rs | 781 | /// | COMMENT |
| LOW | kube-runtime/src/watcher.rs | 801 | /// # async fn wrapper() -> Result<(), watcher::Error> { | COMMENT |
| LOW | kube-runtime/src/watcher.rs | 821 | /// This will normally happen immediately, but you can use [`StreamBackoff`](crate::utils::StreamBackoff) | COMMENT |
| LOW | kube-runtime/src/watcher.rs | 861 | /// [`try_for_each`](futures::TryStreamExt::try_for_each) and [`try_concat`](futures::TryStreamExt::try_concat)) | COMMENT |
| LOW | kube-runtime/src/watcher.rs | 881 | /// println!("Applied: {}", p.name_any()); | COMMENT |
| LOW | kube-runtime/src/watcher.rs | 921 | /// ## Scope Warning | COMMENT |
| LOW | kube-runtime/src/scheduler.rs | 21 | /// The time the message is scheduled for | COMMENT |
| LOW | kube-runtime/src/scheduler.rs | 41 | /// | COMMENT |
| LOW | kube-runtime/src/reflector/store.rs | 81 | /// | COMMENT |
| LOW | kube-runtime/src/reflector/store.rs | 281 | COMMENT | |
| LOW | kube-runtime/src/reflector/object_ref.rs | 101 | #[derive(Educe)] | COMMENT |
| LOW | kube-runtime/src/reflector/object_ref.rs | 121 | /// ``` | COMMENT |
| LOW | kube-runtime/src/reflector/object_ref.rs | 141 | /// | COMMENT |
| LOW | kube-runtime/src/reflector/dispatcher.rs | 41 | /// Messages will be buffered until all active readers have received a copy | COMMENT |
| LOW | kube-runtime/src/reflector/dispatcher.rs | 61 | // Calls broadcast on the channel. Will return when the channel has enough | COMMENT |
| LOW | kube-runtime/src/reflector/dispatcher.rs | 81 | /// shared stream reader should be polled independently and driven to readiness | COMMENT |
| LOW | kube-runtime/src/reflector/dispatcher.rs | 381 | COMMENT | |
| LOW | kube-runtime/src/reflector/mod.rs | 21 | /// It passes the raw [`watcher()`] stream through unmodified. | COMMENT |
| LOW | kube-runtime/src/reflector/mod.rs | 41 | /// use k8s_openapi::api::core::v1::Node; | COMMENT |
| LOW | kube-runtime/src/reflector/mod.rs | 61 | /// # } | COMMENT |
| LOW | kube-runtime/src/reflector/mod.rs | 81 | /// | COMMENT |
| LOW | kube-runtime/src/reflector/mod.rs | 101 | /// | COMMENT |
| LOW | kube-runtime/src/utils/mod.rs | 41 | /// like a streaming variant of pattern matching. | COMMENT |
| LOW | kube-runtime/src/utils/watch_ext.rs | 61 | { | COMMENT |
| LOW | kube-runtime/src/utils/watch_ext.rs | 81 | /// deploy.managed_fields_mut().clear(); | COMMENT |
| LOW | kube-runtime/src/utils/watch_ext.rs | 101 | /// | COMMENT |
| LOW | kube-runtime/src/utils/watch_ext.rs | 121 | /// # fn example(api: Api<Deployment>) { | COMMENT |
| LOW | kube-runtime/src/utils/watch_ext.rs | 141 | /// # let client: kube::Client = todo!(); | COMMENT |
| LOW | kube-runtime/src/utils/watch_ext.rs | 161 | COMMENT | |
| LOW | kube-runtime/src/utils/watch_ext.rs | 181 | /// tokio::spawn(async move { | COMMENT |
| LOW | kube-runtime/src/utils/watch_ext.rs | 201 | /// .await; | COMMENT |
| 380 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | kube-runtime/Cargo.toml | 22 | # Define the configuration attribute `docsrs`. Used to enable `doc_cfg` feature. | COMMENT |
| MEDIUM | kube-client/Cargo.toml | 41 | # Define the configuration attribute `docsrs`. Used to enable `doc_cfg` feature. | COMMENT |
| MEDIUM | kube-core/src/params.rs | 579 | /// # Creating a patch via serde_json | COMMENT |
| MEDIUM | kube-core/src/params.rs | 594 | /// # Creating a patch from a type | COMMENT |
| MEDIUM | scripts/release-pre.sh | 8 | # Create a new UNRELEASED header, and add compare url to it | COMMENT |
| MEDIUM | kube/Cargo.toml | 69 | # Define the configuration attribute `docsrs`. Used to enable `doc_cfg` feature. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | kube-core/src/response.rs | 137 | /// be completed as requested. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | kube-client/src/client/mod.rs | 443 | /// ### Example usage: | COMMENT |
| LOW | kube-client/src/client/mod.rs | 492 | /// ### Example usage: | COMMENT |
| LOW | kube-client/src/client/mod.rs | 526 | /// ### Example usage: | COMMENT |
| LOW | scripts/release-afterdoc.sh | 33 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | kube-runtime/src/reflector/mod.rs | 71 | /// While generally acceptable, there are techniques you can leverage to reduce the memory usage | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | kube-core/src/crd.rs | 24 | /// NOTE: This function returns *declared* short names (at compile-time, using the `#[kube(shortname = "foo")]`) | COMMENT |