Cross-platform Rust rewrite of the GNU coreutils
This report presents the forensic synthetic code analysis of uutils/coreutils, a Rust project with 23,772 GitHub stars. SynthScan v2.0 examined 275,838 lines of code across 884 source files, recording 677 pattern matches distributed across 14 syntactic categories. The overall adjusted score of 2.6 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 677 distinct pattern matches across 14 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Cargo.toml | 21 | COMMENT | |
| LOW | util/check-toctou.sh | 1 | #!/bin/bash | COMMENT |
| LOW | util/dwr.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | util/update-version.sh | 1 | #!/bin/sh | COMMENT |
| LOW | util/build-run-test-coverage-linux.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | util/android-commands.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | util/android-commands.sh | 201 | # finishes a command run with a summary. It returns with the exit code of the probe if specified as | COMMENT |
| LOW | util/build-gnu.sh | 341 | # don't need to replicate that behavior. | COMMENT |
| LOW | util/GHA-delete-GNU-workflow-logs.sh | 1 | #!/bin/sh | COMMENT |
| LOW | tests/test_uudoc.rs | 1 | // This file is part of the uutils coreutils package. | COMMENT |
| LOW | tests/by-util/test_env.rs | 1 | // This file is part of the uutils coreutils package. | COMMENT |
| LOW | tests/by-util/test_env.rs | 1201 | } | COMMENT |
| LOW | tests/by-util/test_env.rs | 1221 | /// println!("Executing: {}", shell_words::join(args)); | COMMENT |
| LOW | tests/by-util/test_uptime.rs | 101 | COMMENT | |
| LOW | tests/by-util/test_mv.rs | 1881 | COMMENT | |
| LOW | tests/by-util/test_tee.rs | 1 | // This file is part of the uutils coreutils package. | COMMENT |
| LOW | tests/by-util/test_ls.rs | 1 | // This file is part of the uutils coreutils package. | COMMENT |
| LOW | tests/by-util/test_ls.rs | 1181 | // A line of the output should be: | COMMENT |
| LOW | tests/by-util/test_ls.rs | 1221 | .arg("dir") | COMMENT |
| LOW | tests/by-util/test_ls.rs | 1241 | // the 1st color is the target color, in a fixed-size array of size 2. | COMMENT |
| LOW | tests/by-util/test_ls.rs | 1261 | // ├── ln-file1 -> dir1/file1 | COMMENT |
| LOW | tests/by-util/test_stdbuf.rs | 1 | // This file is part of the uutils coreutils package. | COMMENT |
| LOW | tests/by-util/test_cp.rs | 3281 | } ); | COMMENT |
| LOW | tests/by-util/test_tail.rs | 341 | .stderr_is("tail: error reading 'standard input': Is a directory\n"); | COMMENT |
| LOW | tests/by-util/test_tail.rs | 461 | COMMENT | |
| LOW | tests/by-util/test_tail.rs | 2461 | not(target_os = "openbsd") | COMMENT |
| LOW | tests/by-util/test_tail.rs | 4561 | .kill() | COMMENT |
| LOW | tests/by-util/test_tail.rs | 4581 | // < | COMMENT |
| LOW | tests/by-util/test_tail.rs | 4641 | #[rstest] | COMMENT |
| LOW | tests/by-util/test_touch.rs | 661 | #[test] | COMMENT |
| LOW | tests/by-util/test_sleep.rs | 281 | .fails() | COMMENT |
| LOW | tests/by-util/test_eintr_handling.rs | 1 | // This file is part of the uutils coreutils package. | COMMENT |
| LOW | tests/by-util/test_mkdir.rs | 321 | // posix_acl entries are in the form of | COMMENT |
| LOW | tests/by-util/test_cat.rs | 821 | child.pipe_in("content"); | COMMENT |
| LOW | tests/by-util/test_id.rs | 421 | // for now, we print clap's standard response for "conflicts_with" instead of: | COMMENT |
| LOW | tests/by-util/test_cksum.rs | 21 | #[case::crc("crc")] | COMMENT |
| LOW | tests/by-util/test_chown.rs | 1 | // This file is part of the uutils coreutils package. | COMMENT |
| LOW | tests/by-util/test_chown.rs | 261 | .fails() | COMMENT |
| LOW | tests/by-util/test_chown.rs | 501 | .stderr_contains("invalid spec"); | COMMENT |
| LOW | tests/by-util/test_tac.rs | 161 | // FIXME: See https://github.com/uutils/coreutils/issues/4204 | COMMENT |
| LOW | tests/by-util/test_tac.rs | 181 | // "xx". | COMMENT |
| LOW | tests/by-util/test_tac.rs | 201 | // separator, since there are no more characters preceding it. | COMMENT |
| LOW | tests/by-util/test_tac.rs | 361 | new_ucmd!() | COMMENT |
| LOW | tests/by-util/test_seq.rs | 1061 | // likely not the primary cause, as even double (64-bit) values can differ when compared to | COMMENT |
| LOW | tests/by-util/test_seq.rs | 1081 | // GNU `seq` manual states that, when the parameters "all use a fixed point | COMMENT |
| LOW | tests/by-util/test_seq.rs | 1121 | // provided numbers "all use a fixed point decimal representation", | COMMENT |
| LOW | tests/by-util/test_mktemp.rs | 541 | /// Decide whether a string matches a given template. | COMMENT |
| LOW | tests/by-util/test_more.rs | 1 | // This file is part of the uutils coreutils package. | COMMENT |
| LOW | tests/by-util/test_nice.rs | 1 | // This file is part of the uutils coreutils package. | COMMENT |
| LOW | tests/by-util/test_head.rs | 561 | )] | COMMENT |
| LOW | tests/by-util/test_head.rs | 661 | #[test] | COMMENT |
| LOW | tests/uutests/src/lib/random.rs | 1 | // This file is part of the uutils coreutils package. | COMMENT |
| LOW | tests/uutests/src/lib/random.rs | 21 | /// .sample_iter(AlphanumericNewline) | COMMENT |
| LOW | tests/uutests/src/lib/random.rs | 61 | /// use crate::common::random::{AlphanumericNewline, RandomizedString}; | COMMENT |
| LOW | tests/uutests/src/lib/random.rs | 101 | /// * `dist`: A `u8` [`Distribution`] | COMMENT |
| LOW | tests/uutests/src/lib/util.rs | 1 | // This file is part of the uutils coreutils package. | COMMENT |
| LOW | tests/uutests/src/lib/util.rs | 301 | } | COMMENT |
| LOW | tests/uutests/src/lib/util.rs | 481 | ); | COMMENT |
| LOW | tests/uutests/src/lib/util.rs | 501 | self.stderr_str() | COMMENT |
| LOW | tests/uutests/src/lib/util.rs | 581 | self.stdout_is(String::from_utf8(contents).unwrap()) | COMMENT |
| 555 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | util/test_compare_test_results.py | 518 | # Instead of assertRaises, just call main() and check its return value | COMMENT |
| MEDIUM | util/run-gnu-test.sh | 38 | # --- Self-heal: make the shared GNU harness point at THIS checkout ---------- | COMMENT |
| MEDIUM | util/run-gnu-test.sh | 41 | # PATH, so the harness can silently run a stale/other build. Re-point the PATH | COMMENT |
| MEDIUM | util/run-gnu-test.sh | 52 | # to whatever 'target/*/coreutils' actually exists so the harness adapts to the | COMMENT |
| MEDIUM | tests/by-util/test_ls.rs | 3632 | // Essentially the same test as above, but only test symlinks and directories, | COMMENT |
| MEDIUM | tests/by-util/test_chmod.rs | 1470 | // Assert on the path only (not the mode bits), so the test is robust to the | COMMENT |
| MEDIUM | src/uu/md5sum/Cargo.toml | 45 | # harness = false | COMMENT |
| MEDIUM | src/uu/checksum_common/Cargo.toml | 32 | # harness = false | COMMENT |
| MEDIUM | src/uucore/src/lib/mods/clap_localization.rs | 11 | //! instead of parsing error strings, providing a more robust solution. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | util/test_compare_size_results.py | 28 | def test_load_sizes_date_keyed(self): | CODE |
| LOW | util/test_compare_size_results.py | 48 | def test_load_sizes_flat_fallback(self): | CODE |
| LOW | util/test_compare_size_results.py | 74 | def test_compare_threshold_boundaries(self): | CODE |
| LOW⚡ | util/test_compare_size_results.py | 99 | def test_compare_added_removed_and_totals(self): | CODE |
| LOW⚡ | util/test_compare_size_results.py | 109 | def test_compare_sort_and_zero_reference(self): | CODE |
| LOW⚡ | util/test_compare_size_results.py | 116 | def test_format_report_renders_changes(self): | CODE |
| LOW | util/test_compare_size_results.py | 137 | def test_main_writes_only_when_significant(self): | CODE |
| LOW | util/test_compare_size_results.py | 156 | def test_main_missing_reference_is_not_fatal(self): | CODE |
| LOW | util/test_compare_test_results.py | 53 | def test_log_extension_removal(self): | CODE |
| LOW | util/test_compare_test_results.py | 93 | def test_with_comments_and_blanks(self): | CODE |
| LOW | util/test_compare_test_results.py | 213 | def test_new_and_removed_tests(self): | CODE |
| LOW | util/test_compare_test_results.py | 249 | def test_skip_to_fail_not_regression(self): | CODE |
| LOW | util/test_compare_test_results.py | 315 | def test_main_exit_code_with_real_regressions(self): | CODE |
| LOW | util/test_compare_test_results.py | 351 | def test_filter_intermittent_fixes(self): | CODE |
| LOW | util/test_compare_test_results.py | 425 | def test_console_output_formatting(self, mock_stderr, mock_stdout): | CODE |
| LOW | util/test_compare_test_results.py | 468 | def test_file_output_generation(self): | CODE |
| LOW | util/test_compare_test_results.py | 506 | def test_exit_code_with_no_regressions(self): | CODE |
| LOW | util/test_compare_test_results.py | 523 | def test_exit_code_with_regressions(self): | CODE |
| LOW | util/test_compare_test_results.py | 547 | def test_github_actions_formatting(self): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | util/compare_gnu_result.py | 42 | # Check if all failing tests are intermittent based on the environment variable | COMMENT |
| LOW | util/analyze-gnu-results.py | 135 | # Check if file arguments were provided | COMMENT |
| LOW | util/analyze-gnu-results.py | 145 | # Check if the first argument is an output file (starts with -) | COMMENT |
| LOW | util/run-gnu-test.sh | 133 | # Check if the file exists with .sh, .pl extension or without any extension in the $path_GNU directory | COMMENT |
| LOW | util/build-gnu.sh | 81 | # Check if all patches are already applied | COMMENT |
| LOW | .github/workflows/l10n.yml | 549 | # Check if symlinks exist | COMMENT |
| LOW | .github/workflows/manpage-lint.yml | 69 | # Check if manpages were generated | COMMENT |
| LOW | .github/workflows/manpage-lint.yml | 92 | # Check if mandoc produced any output (errors only, not style warnings) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/uu/touch/src/touch.rs | 502 | // we need to check if the path is the path to a directory (ends with a separator) | COMMENT |
| LOW⚡ | src/uu/dirname/src/dirname.rs | 49 | // Step 1: Strip trailing slashes (but not if the entire path is slashes) | COMMENT |
| LOW⚡ | src/uu/dirname/src/dirname.rs | 59 | // Step 2: Check if it ends with `/.` and strip the `/+.` pattern | COMMENT |
| LOW | src/uu/dirname/src/dirname.rs | 81 | // Step 3: Normal dirname - find last / and remove everything after it | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | util/remaining-gnu-error.py | 22 | except Exception as e: | CODE |
| MEDIUM | util/analyze-gnu-results.py | 158 | print(f"Error: File '{json_files[0]}' not found.", file=sys.stderr) | CODE |
| LOW | util/gnu-json-result.py | 37 | except Exception as e: | CODE |
| MEDIUM | util/gnu-json-result.py | 38 | print(f"Error processing file {path}: {e}", file=sys.stderr) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/by-util/test_tail.rs | 4030 | // TODO: Add test for the warning `--pid=PID is not supported on this system` | COMMENT |
| LOW | tests/by-util/test_chown.rs | 269 | // TODO: implement once output "failed to change" to stdout is fixed | COMMENT |
| LOW | src/uu/cp/src/cp.rs | 768 | // TODO: implement the following args | COMMENT |
| LOW | src/uu/cp/src/cp.rs | 2674 | // TODO: implement something similar to gnu's lchown | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | src/uu/dirname/src/dirname.rs | 49 | // Step 1: Strip trailing slashes (but not if the entire path is slashes) | COMMENT |
| LOW⚡ | src/uu/dirname/src/dirname.rs | 59 | // Step 2: Check if it ends with `/.` and strip the `/+.` pattern | COMMENT |
| LOW | src/uu/dirname/src/dirname.rs | 81 | // Step 3: Normal dirname - find last / and remove everything after it | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | util/test_compare_test_results.py | 409 | # Create an ignore file | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | util/analyze-gnu-results.py | 49 | CODE | |
| LOW | util/compare_test_results.py | 44 | CODE | |
| LOW | util/run-clippy.py | 34 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | util/run-gnu-test.sh | 89 | # --------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/by-util/test_mv.rs | 2909 | fs::write(&dst_path, "placeholder").expect("Failed to write placeholder dst"); | CODE |
| LOW | tests/by-util/test_basenc.rs | 289 | let input = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. ".repeat(50); | CODE |
| LOW | tests/by-util/test_basenc.rs | 289 | let input = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. ".repeat(50); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/uucore/src/lib/features/update_control.rs | 22 | //! # Usage example | COMMENT |
| LOW | src/uucore/src/lib/features/backup_control.rs | 35 | //! # Usage example | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | util/run-clippy.py | 6 | CODE |