The Rust package manager
This report summarizes scanner evidence for rust-lang/cargo, a Rust project with 15,650 GitHub stars. SynthScan examined 416,727 lines of code across 1894 source files, recording 736 pattern matches distributed across 9 syntactic categories. The legacy adjusted pattern signal is 2.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? 726 finding(s).
Are imports declared and package/API names verified? 10 finding(s).
Are wrappers, guards, and repeated structures necessary? 0 finding(s).
Which changes need focused human review? 736 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 736 distinct pattern matches across 9 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 | deny.toml | 1 | # This template contains all of the possible sections and their default values | COMMENT |
| LOW | deny.toml | 21 | # `target_family = "unix"` configuration, that only having windows targets in | COMMENT |
| LOW | deny.toml | 41 | #exclude = [] | COMMENT |
| LOW | deny.toml | 61 | COMMENT | |
| LOW | deny.toml | 101 | "ISC", | COMMENT |
| LOW | deny.toml | 121 | # The package spec the clarification applies to | COMMENT |
| LOW | deny.toml | 141 | # One or more private registries that you might publish crates to, if a crate | COMMENT |
| LOW | deny.toml | 161 | highlight = "all" | COMMENT |
| LOW | deny.toml | 181 | #{ crate = "ansi_term@0.11.0", wrappers = ["this-crate-directly-depends-on-ansi_term"] }, | COMMENT |
| LOW | deny.toml | 201 | # "webpki-roots", | COMMENT |
| LOW | deny.toml | 221 | # This section is considered when running `cargo deny check sources`. | COMMENT |
| LOW | build.rs | 121 | // they are loaded on first use instead of at every process start. | COMMENT |
| LOW | publish.py | 1 | #!/usr/bin/env python3 | COMMENT |
| LOW | credential/cargo-credential/src/error.rs | 1 | use serde::{Deserialize, Serialize}; | COMMENT |
| LOW | credential/cargo-credential/src/error.rs | 21 | COMMENT | |
| LOW | credential/cargo-credential/src/lib.rs | 1 | //! Helper library for writing Cargo credential providers. | COMMENT |
| LOW | credential/cargo-credential/src/lib.rs | 21 | //! and an unsupported index URL is passed to the provider, it should respond with | COMMENT |
| LOW | credential/cargo-credential/src/lib.rs | 81 | pub struct CredentialRequest<'a> { | COMMENT |
| LOW | credential/cargo-credential/src/lib.rs | 141 | /// A record of what kind of operation is happening that we should generate a token for. | COMMENT |
| LOW | credential/cargo-credential/src/lib.rs | 201 | /// Do not cache this result. | COMMENT |
| LOW | credential/cargo-credential/src/secret.rs | 1 | use std::fmt; | COMMENT |
| LOW | credential/cargo-credential/src/secret.rs | 21 | #[serde(transparent)] | COMMENT |
| LOW | crates/home/src/env.rs | 81 | } | COMMENT |
| LOW | crates/home/src/lib.rs | 1 | //! Canonical definitions of `home_dir`, `cargo_home`, and `rustup_home`. | COMMENT |
| LOW | crates/home/src/lib.rs | 21 | //! > crate may make major changes to its APIs or be deprecated without warning. | COMMENT |
| LOW | crates/home/src/lib.rs | 41 | /// Some(path) if !path.as_os_str().is_empty() => println!("{}", path.display()), | COMMENT |
| LOW | crates/home/src/lib.rs | 61 | /// by the `home_dir` function. | COMMENT |
| LOW | crates/home/src/lib.rs | 81 | /// For more details, see [`cargo_home`]. | COMMENT |
| LOW | crates/home/src/lib.rs | 101 | /// | COMMENT |
| LOW | crates/cargo-test-support/src/cross_compile.rs | 1 | //! Support for cross-compile tests with the `--target` flag. | COMMENT |
| LOW | crates/cargo-test-support/src/cross_compile.rs | 61 | /// | COMMENT |
| LOW | crates/cargo-test-support/src/registry.rs | 1 | //! Interact with the [`TestRegistry`] | COMMENT |
| LOW | crates/cargo-test-support/src/registry.rs | 21 | //! .file("src/lib.rs", r#" | COMMENT |
| LOW | crates/cargo-test-support/src/registry.rs | 61 | COMMENT | |
| LOW | crates/cargo-test-support/src/registry.rs | 481 | registry | COMMENT |
| LOW | crates/cargo-test-support/src/registry.rs | 1181 | COMMENT | |
| LOW | crates/cargo-test-support/src/lib.rs | 1 | //! # Cargo test support. | COMMENT |
| LOW | crates/cargo-test-support/src/lib.rs | 21 | //! use cargo_test_support::prelude::*; | COMMENT |
| LOW | crates/cargo-test-support/src/lib.rs | 221 | fn dirname(&self) -> &Path { | COMMENT |
| LOW | crates/cargo-test-support/src/lib.rs | 481 | /// Creates a `ProcessBuilder` to run a program in the project | COMMENT |
| LOW | crates/cargo-test-support/src/lib.rs | 501 | /// Windows has a problem where a process cannot be reliably | COMMENT |
| LOW | crates/cargo-test-support/src/lib.rs | 621 | } | COMMENT |
| LOW | crates/cargo-test-support/src/lib.rs | 661 | pub fn with_process_builder(mut self, p: ProcessBuilder) -> Execs { | COMMENT |
| LOW | crates/cargo-test-support/src/lib.rs | 681 | /// However, `""` may be preferred for intentionally empty output so people don't accidentally | COMMENT |
| LOW | crates/cargo-test-support/src/lib.rs | 701 | /// use cargo_test_support::str; | COMMENT |
| LOW | crates/cargo-test-support/src/lib.rs | 721 | /// "#].is_json().against_jsonlines()); | COMMENT |
| LOW | crates/cargo-test-support/src/lib.rs | 741 | /// bless a change. | COMMENT |
| LOW | crates/cargo-test-support/src/lib.rs | 761 | /// use cargo_test_support::execs; | COMMENT |
| LOW | crates/cargo-test-support/src/lib.rs | 801 | /// Removes exit code check for the process. | COMMENT |
| LOW | crates/cargo-test-support/src/lib.rs | 821 | pub fn with_stdout_contains<S: ToString>(&mut self, expected: S) -> &mut Self { | COMMENT |
| LOW | crates/cargo-test-support/src/lib.rs | 841 | } | COMMENT |
| LOW | crates/cargo-test-support/src/lib.rs | 861 | self.expect_stdout_not_contains.push(expected.to_string()); | COMMENT |
| LOW | crates/cargo-test-support/src/lib.rs | 881 | pub fn with_stderr_does_not_contain<S: ToString>(&mut self, expected: S) -> &mut Self { | COMMENT |
| LOW | crates/cargo-test-support/src/lib.rs | 901 | /// | COMMENT |
| LOW | crates/cargo-test-support/src/lib.rs | 1441 | .env("CARGO_HOME", paths::cargo_home()) | COMMENT |
| LOW | crates/cargo-test-support/src/paths.rs | 401 | /// `kind` should be one of: | COMMENT |
| LOW | crates/cargo-test-support/src/paths.rs | 521 | } | COMMENT |
| LOW | crates/cargo-test-support/src/git.rs | 1 | //! # Git Testing Support | COMMENT |
| LOW | crates/cargo-test-support/src/git.rs | 21 | //! let p = project() | COMMENT |
| LOW | crates/cargo-test-support/src/compare.rs | 1 | //! Routines for comparing and diffing output. | COMMENT |
| 569 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | crates/cargo-test-support/src/git.rs | 3 | //! ## Creating a git dependency | COMMENT |
| MEDIUM | crates/cargo-util/src/paths.rs | 813 | # This file is a cache directory tag created by cargo. | COMMENT |
| MEDIUM | tests/testsuite/generate_lockfile.rs | 168 | assert!(lock0.starts_with("# This file is automatically @generated by Cargo.\n# It is not intended for manual editin | CODE |
| MEDIUM | tests/testsuite/generate_lockfile.rs | 177 | assert!(lock2.starts_with("# This file is automatically @generated by Cargo.\r\n# It is not intended for manual edit | CODE |
| MEDIUM | tests/testsuite/generate_lockfile.rs | 355 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/patch.rs | 3062 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/update.rs | 857 | assert!(lockfile.starts_with("# This file is automatically @generated by Cargo.\n# It is not intended for manual edi | CODE |
| MEDIUM | tests/testsuite/update.rs | 1524 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/update.rs | 1563 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/update.rs | 1602 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/update.rs | 1685 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/update.rs | 1749 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/update.rs | 1804 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/update.rs | 1887 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/update.rs | 1929 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/package.rs | 3664 | let cargo_lock_contents = r#"# This file is automatically @generated by Cargo. | CODE |
| MEDIUM | tests/testsuite/package.rs | 3767 | let cargo_lock_contents = r#"# This file is automatically @generated by Cargo. | CODE |
| MEDIUM | tests/testsuite/package.rs | 3883 | let cargo_lock_contents = r#"# This file is automatically @generated by Cargo. | CODE |
| MEDIUM | tests/testsuite/package.rs | 5855 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/package.rs | 6444 | r#"# This file is automatically @generated by Cargo. | CODE |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 80 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 122 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 183 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 225 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 261 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 297 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 368 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 427 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 505 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 586 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 648 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 698 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 780 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 824 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 906 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 957 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 1041 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 1092 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 1168 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 1232 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 1309 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 1385 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 1455 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 1523 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 1612 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/precise_pre_release.rs | 1742 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/git.rs | 3836 | r#"# This file is automatically @generated by Cargo. | CODE |
| MEDIUM | tests/testsuite/git.rs | 3903 | r#"# This file is automatically @generated by Cargo. | CODE |
| MEDIUM | tests/testsuite/min_publish_age.rs | 66 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/min_publish_age.rs | 129 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/min_publish_age.rs | 192 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/min_publish_age.rs | 398 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/min_publish_age.rs | 435 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/min_publish_age.rs | 508 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/min_publish_age.rs | 568 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/min_publish_age.rs | 792 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/min_publish_age.rs | 829 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/min_publish_age.rs | 893 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/min_publish_age.rs | 926 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | tests/testsuite/min_publish_age.rs | 985 | # This file is automatically @generated by Cargo. | COMMENT |
| 26 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/util/graph.rs | 130 | // Note that this implementation isn't the most robust per se, we'll | COMMENT |
| MEDIUM | src/sources/path.rs | 833 | // it with git-support to leverage ignored files and to avoid pulling in entire | COMMENT |
| MEDIUM | src/sources/git/utils.rs | 803 | // Essentially, if `attempts == 2` then in theory the only error was | COMMENT |
| MEDIUM | src/compiler/fingerprint/dep_info.rs | 583 | // Buffer size is the recommended amount to fully leverage SIMD instructions on AVX-512 as per | COMMENT |
| MEDIUM | src/compiler/job_queue/mod.rs | 1221 | // faithful representation of what's happening. This is somewhat nuanced | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/cargo-test-support/src/git.rs | 163 | t!(cfg.set_str("user.email", "foo@bar.com")); | CODE |
| LOW | tests/testsuite/package.rs | 3737 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt | CODE |
| LOW | tests/testsuite/package.rs | 3737 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt | CODE |
| LOW | tests/testsuite/package.rs | 3853 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt | CODE |
| LOW | tests/testsuite/package.rs | 3853 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt | CODE |
| LOW | tests/testsuite/git.rs | 3064 | cfg.set_str("user.email", "foo@bar.com").unwrap(); | CODE |
| LOW | tests/testsuite/logout.rs | 85 | token = "dummy-token" | CODE |
| LOW | tests/testsuite/logout.rs | 89 | check_token(Some("dummy-token"), Some("dummy-registry")); | CODE |
| LOW | tests/testsuite/git_gc.rs | 47 | cfg.set_str("user.email", "foo@bar.com").unwrap(); | CODE |
| LOW | tests/testsuite/git_gc.rs | 50 | cfg.set_str("user.email", "foo@bar.com").unwrap(); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/ops/cargo_update.rs | 139 | // so their dependencies can be updated as requested | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/cargo-util/src/paths.rs | 548 | // For Windows, we need to check if the file is a symlink to a directory | COMMENT |
| LOW | src/context/mod.rs | 1565 | /// The purpose of this function is to aid in the transition to using | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/workflows/main.yml | 54 | # Check if all jobs that we depend on (in the needs array) were successful. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/ops/cargo_fix/mod.rs | 990 | // TODO: implement a way to specify this. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/compiler/build_context/mod.rs | 42 | /// # How to use | COMMENT |