Repository Analysis

rustls/rustls

A modern TLS library in Rust

3.7 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of rustls/rustls, a Rust project with 7,521 GitHub stars. SynthScan v2.0 examined 81,665 lines of code across 237 source files, recording 268 pattern matches distributed across 4 syntactic categories. The overall adjusted score of 3.7 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).

3.7
Adjusted Score
3.7
Raw Score
100%
Time Factor
2026-07-14
Last Push
7.5K
Stars
Rust
Language
81.7K
Lines of Code
237
Files
268
Pattern Hits
2026-07-14
Scan Date
0.01
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

Severity Breakdown

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.

CRITICAL 1HIGH 1MEDIUM 6LOW 260

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 268 distinct pattern matches across 4 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.

Over-Commented Block260 hits · 258 pts
SeverityFileLineSnippetContext
LOWrustls-aws-lc-rs/src/hpke.rs761 }COMMENT
LOWrustls-aws-lc-rs/src/tls12.rs141 }COMMENT
LOWrustls-aws-lc-rs/src/kx.rs101 }COMMENT
LOWrustls-aws-lc-rs/src/kx.rs161 /// Whether the algorithm is allowed by FIPSCOMMENT
LOWrustls-aws-lc-rs/src/lib.rs1//! A `CryptoProvider` implementation backed by *aws-lc-rs*.COMMENT
LOWadmin/threads-seq.rs1#!/usr/bin/env -S cargo +nightly --quiet -ZscriptCOMMENT
LOWrustls-ring/src/kx.rs21 /// Whether the algorithm is allowed by FIPSCOMMENT
LOWrustls-ring/src/lib.rs121}COMMENT
LOWrustls-ring/src/verify.rs101};COMMENT
LOWrustls-ring/src/verify.rs121 };COMMENT
LOWrustls-ring/src/verify.rs141 };COMMENT
LOWrustls-post-quantum/src/lib.rs1//! This crate provide a [`CryptoProvider`] built on the default aws-lc-rs default provider.COMMENT
LOWrustls-test/tests/key_log_file_env/tests.rs1//! Tests of [`rustls::KeyLogFile`] that require us to set environment variables.COMMENT
LOWrustls-test/benches/verifybench.rs1//! This program does benchmarking of the functions in verify.rs,COMMENT
LOWrustls-test/src/lib.rs861 name.try_into().unwrap()COMMENT
LOWrustls-util/src/stream.rs1#![allow(clippy::std_instead_of_core)] // awaits core::io::IoSlice in stable (1.98)COMMENT
LOWrustls-util/src/lib.rs1use std::io;COMMENT
LOWrustls-util/src/lib.rs21/// until it is all written.COMMENT
LOWexamples/src/bin/tlsclient-mio.rs1//! This is an example client that uses rustls for TLS, and [mio] for I/O.COMMENT
LOWexamples/src/bin/tlsclient-mio.rs221#[derive(Debug, Parser)]COMMENT
LOWexamples/src/bin/tlsclient-mio.rs241 /// SUITE instead. May be used multiple times.COMMENT
LOWexamples/src/bin/tlsclient-mio.rs261COMMENT
LOWexamples/src/bin/ech-client.rs1//! This is a simple example demonstrating how to use Encrypted Client Hello (ECH) withCOMMENT
LOWexamples/src/bin/ech-client.rs161 tls.read_to_end(&mut plaintext)?;COMMENT
LOWexamples/src/bin/ech-client.rs181 /// Read root certificates from this file.COMMENT
LOWexamples/src/bin/tlsserver-mio.rs1//! This is an example server that uses rustls for TLS, and [mio] for I/O.COMMENT
LOWexamples/src/bin/tlsserver-mio.rs421///COMMENT
LOWexamples/src/bin/tlsserver-mio.rs441 protover: Vec<String>,COMMENT
LOWexamples/src/bin/tlsserver-mio.rs461 #[clap(long)]COMMENT
LOWexamples/src/bin/server_acceptor.rs321COMMENT
LOWexamples/src/bin/simple_0rtt_client.rs1//! This is an example client that uses rustls for TLS, and sends early 0-RTT data.COMMENT
LOWexamples/src/bin/simple_0rtt_server.rs1//! This is an example server that streams 0-RTT early data from the client.COMMENT
LOWci-bench/src/util.rs361 //!COMMENT
LOWci-bench/src/main.rs41mod valgrind;COMMENT
LOWrustls/src/tls12.rs21/// A TLS 1.2 cipher suite supported by rustls.COMMENT
LOWrustls/src/tls12.rs41 /// If you have a TLS1.2 PRF implementation, you should directly implement the [`crypto::tls12::Prf`] trait.COMMENT
LOWrustls/src/quic.rs41 /// Compute the keys for encrypting/decrypting 0-RTT packets, if availableCOMMENT
LOWrustls/src/quic.rs141 /// Returns the number of TLS1.3 tickets that have been received.COMMENT
LOWrustls/src/quic.rs241 }COMMENT
LOWrustls/src/quic.rs261COMMENT
LOWrustls/src/quic.rs281 pub fn received_resumption_data(&self) -> Option<&[u8]> {COMMENT
LOWrustls/src/quic.rs841 ///COMMENT
LOWrustls/src/quic.rs861 &self,COMMENT
LOWrustls/src/quic.rs901 /// Encrypt a QUIC packetCOMMENT
LOWrustls/src/quic.rs941 ///COMMENT
LOWrustls/src/quic.rs1101COMMENT
LOWrustls/src/quic.rs1121 },COMMENT
LOWrustls/src/x509.rs121 #[test]COMMENT
LOWrustls/src/lib.rs1//! # Rustls - a modern TLS libraryCOMMENT
LOWrustls/src/lib.rs21//! [`crypto::CryptoProvider`]: crate::crypto::CryptoProviderCOMMENT
LOWrustls/src/lib.rs41//! (for example, it does not support post-quantum algorithms).COMMENT
LOWrustls/src/lib.rs61//!COMMENT
LOWrustls/src/lib.rs81//! [OpenSSL]: https://openssl-library.org/COMMENT
LOWrustls/src/lib.rs101//! [hyper]: https://crates.io/crates/hyperCOMMENT
LOWrustls/src/lib.rs121//! [`process_new_packets()`]: Connection::process_new_packetsCOMMENT
LOWrustls/src/lib.rs141//!COMMENT
LOWrustls/src/lib.rs161//! # let root_store: rustls::RootCertStore = panic!();COMMENT
LOWrustls/src/lib.rs181//! # let client_config = Arc::new(rustls::ClientConfig::builder(DEFAULT_PROVIDER)COMMENT
LOWrustls/src/lib.rs201//! `process_new_packets()` will not do any new work and will return that error continually.COMMENT
LOWrustls/src/lib.rs221//! # use std::io::{Read, Write, Result};COMMENT
200 more matches not shown…
Decorative Section Separators6 hits · 27 pts
SeverityFileLineSnippetContext
MEDIUMrustls/src/conn/split.rs275/// ╭────────────────╮COMMENT
MEDIUMrustls/src/conn/split.rs276/// ╭───────▶│ ReceiveTraffic │COMMENT
MEDIUMrustls/src/conn/split.rs277/// │ ╰───────┬────────╯COMMENT
MEDIUMrustls/src/conn/split.rs280/// ╰────╭───────────────────────╮COMMENT
MEDIUMrustls/src/conn/split.rs282/// ╭───▶╰──┬────────────────────╯COMMENT
MEDIUMrustls/src/conn/split.rs287/// ╰───────┴──────────────╯COMMENT
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALrustls/src/client/tls13.rs1417 session_storage: st.hs.config.resumption.store.clone(),CODE
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHrustls/src/error/mod.rs1394 /// producing no output as requested.)COMMENT