AI Slop Code RIsk Monitor

rhaiscript/rhai

Rhai - An embedded scripting language for Rust.

8.2 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for rhaiscript/rhai, a Rust project with 5,725 GitHub stars. SynthScan examined 111,731 lines of code across 355 source files, recording 1041 pattern matches distributed across 4 syntactic categories. The legacy adjusted pattern signal is 8.2 (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.

8.2
Adjusted Signal
8.2
Raw Pattern Score
100%
Time Factor
2026-10-08
Last Push
5.7K
Stars
Rust
Language
111.7K
Lines of Code
355
Files
1.0K
Pattern Hits
2026-10-12
Scan Date
0.00
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 33.5/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 1039 finding(s).

Hallucinated Dependency & Supply Chain Risk 0.1/100 · LOW

Are imports declared and package/API names verified? 2 finding(s).

Agent Over-Engineering Ratio 0.0/100 · LOW

Are wrappers, guards, and repeated structures necessary? 0 finding(s).

PR Review Velocity Impact 37.7/100 · MEDIUM

Which changes need focused human review? 1041 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 0MEDIUM 9LOW 1032

Directory Score Breakdown

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.

Pattern Findings

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

Over-Commented Block1022 hits · 872 pts
SeverityFileLineSnippetContext
LOWtools/reserved.txt1// This file holds a list of reserved symbols for the Rhai language.COMMENT
LOWtools/keywords.txt1// This file holds a list of keywords/symbols for the Rhai language, with mapping toCOMMENT
LOWtests/arrays.rs361 "COMMENT
LOWtests/mod.rs1mod grain {COMMENT
LOWtests/mod.rs21 #[cfg(feature = "debugging")]COMMENT
LOWtests/grain/format.rs1//! An artifact must mean what the program it came from meant, and nothing aCOMMENT
LOWtests/grain/format.rs121 // rests on into a panic in Rhai, so the case is not run at all there.COMMENT
LOWtests/grain/format.rs141 }COMMENT
LOWtests/grain/format.rs161 let mut scope = Scope::new();COMMENT
LOWtests/grain/format.rs461/// artifact holding jump targets that are not in the code, and so the one theCOMMENT
LOWtests/grain/format.rs641/// Flipping each bit of each byte is exhaustive over single-bit corruption,COMMENT
LOWtests/grain/format.rs681 // case worth having run above.COMMENT
LOWtests/grain/format.rs741 let long = Compiler::new().compile(&engine.compile("let a = 1; while a < 9 { a += 1 } a").unwrap());COMMENT
LOWtests/grain/format.rs761/// nothing to resolve.COMMENT
LOWtests/grain/call_fn.rs1//! Calling one compiled function, with the environment and receiver Rhai givesCOMMENT
LOWtests/grain/call_fn.rs21COMMENT
LOWtests/grain/custom_syntax.rs1//! Custom syntax against the walker's own scope and control-flow rules.COMMENT
LOWtests/grain/custom_syntax.rs181}COMMENT
LOWtests/grain/limits.rs1//! Compiled code must still be stoppable.COMMENT
LOWtests/grain/callback.rs161}COMMENT
LOWtests/grain/scope.rs1//! Variables the caller already had, which no slot can name.COMMENT
LOWtests/grain/scope.rs441COMMENT
LOWtests/grain/differential.rs1//! The VM must mean exactly what Rhai means.COMMENT
LOWtests/grain/differential.rs181COMMENT
LOWtests/grain/differential.rs221/// five bytes and a dispatch and can never do anything, and because it isCOMMENT
LOWtests/grain/fuzz.rs1//! Randomized loading, on the assumption that an artifact is hostile.COMMENT
LOWtests/grain/fuzz.rs221///COMMENT
LOWtests/grain/projection.rs1//! What would a lowering of this script actually weigh?COMMENT
LOWtests/grain/allocation.rs1//! What the AST costs, and what the VM costs instead.COMMENT
LOWtests/grain/debugger.rs1//! A compiled program must be visible to the debugger, and stoppable.COMMENT
LOWtests/grain/debugger.rs381/// What a callback declares must not disturb the program it stopped.COMMENT
LOWtests/grain/corpus/generate.rs1// Random Rhai scripts, for comparing the VM against the walker on programsCOMMENT
LOWtests/grain/corpus/generate.rs21// argument order for captures, pinned in `tests/callback.rs`. Closures areCOMMENT
LOWtests/grain/corpus/generate.rs101COMMENT
LOWtests/grain/corpus/generate.rs121/// which is worth generating rather than worth avoiding.COMMENT
LOWtests/grain/corpus/generate.rs141pub struct Generator {COMMENT
LOWtests/grain/corpus/generate.rs501 9 => self.map(),COMMENT
LOWtests/grain/corpus/generate.rs541 // form is `fn` in disguise, so `no_function` takes it too.COMMENT
LOWtests/grain/corpus/mod.rs1//! Scripts the VM must agree with Rhai on.COMMENT
LOWtests/grain/corpus/mod.rs21 pub name: &'static str,COMMENT
LOWtests/grain/corpus/mod.rs81 // a script can be given one: sharing is otherwise something Rhai does to aCOMMENT
LOWtests/grain/corpus/mod.rs141 Case { name, source }COMMENT
LOWtests/grain/corpus/mod.rs441 // The loop variable is pushed once and mutated in place rather thanCOMMENT
LOWtests/grain/corpus/mod.rs461 case("switch_float_literal", " let x = 2; switch x { 1.5 => 1, _=> 0 }"),COMMENT
LOWtests/grain/corpus/mod.rs481 case("switch_non-hashable_subject", "let w = widget(3); switch w { 1 => \"int\", _ => \"other\" }"),COMMENT
LOWtests/grain/corpus/mod.rs521 case("fn_call", "fn add(a, b) { a + b } add(2, 3)"),COMMENT
LOWtests/grain/corpus/mod.rs541 // `this` is what leaves the body non-lowerable, and calling it by nameCOMMENT
LOWtests/grain/corpus/mod.rs561 case("call_style_receiver_twice_over", "let a = [1]; insert(a, 0, a); a"),COMMENT
LOWtests/grain/corpus/mod.rs581 // Function pointers are invoked via `.call()`; `f(5)` would look for aCOMMENT
LOWtests/grain/corpus/mod.rs601 // was measured to move the divergence onto the common path instead ofCOMMENT
LOWtests/grain/corpus/mod.rs621 // an error (`eval/chaining.rs:461`).COMMENT
LOWtests/grain/corpus/mod.rs641 // The other half of it: only a write creates a key. Reading one that isCOMMENT
LOWtests/grain/corpus/mod.rs701 // a different dispatch path and positions itself differently.COMMENT
LOWtests/grain/corpus/mod.rs721 // --- what an escaping error leaves in the scope -------------------------COMMENT
LOWtests/grain/corpus/mod.rs761 case("try_catch_rethrow", "try { try { throw 1; } catch { throw; } } catch (e) { e }"),COMMENT
LOWtests/grain/corpus/mod.rs801 // The mirror of it: an *index* step handing back the temporary, with theCOMMENT
LOWcodegen/src/lib.rs1//! This crate contains procedural macros to make creating Rhai plugin modules much easier.COMMENT
LOWcodegen/src/lib.rs21//! let m = exported_module!(advanced_math);COMMENT
LOWcodegen/src/lib.rs41mod function;COMMENT
LOWcodegen/src/lib.rs61/// }COMMENT
962 more matches not shown…
AI Slop Vocabulary9 hits · 27 pts
SeverityFileLineSnippetContext
MEDIUMsrc/types/dynamic.rs1375 // Coded this way in order to maximally leverage potentials for dead-code removal.COMMENT
MEDIUMsrc/types/dynamic.rs1501 // Coded this way in order to maximally leverage potentials for dead-code removal.COMMENT
MEDIUMsrc/types/dynamic.rs1870 // Coded this way in order to maximally leverage potentials for dead-code removal.COMMENT
MEDIUMsrc/types/dynamic.rs1973 // Coded this way in order to maximally leverage potentials for dead-code removal.COMMENT
MEDIUMsrc/module/mod.rs1612 /// Essentially, this method is a shortcut for:COMMENT
MEDIUMsrc/api/custom_syntax.rs230 // Coded this way in order to maximally leverage potentials for dead-code removal.COMMENT
MEDIUMsrc/api/events.rs24 /// the current [`Scope`][crate::Scope]. Essentially the correct variable is at positionCOMMENT
MEDIUMsrc/func/call.rs692 // convert to method-call style in order to leverage potential &mut first argumentCOMMENT
MEDIUMsrc/func/call.rs783 // If so, convert to method-call style in order to leverage potentialCOMMENT
Redundant / Tautological Comments8 hits · 12 pts
SeverityFileLineSnippetContext
LOWsrc/api/custom_syntax.rs562 /// ## Return valueCOMMENT
LOWsrc/api/custom_syntax.rs615 /// ## Return valueCOMMENT
LOWsrc/api/events.rs29 /// ## Return valueCOMMENT
LOWsrc/api/events.rs85 /// ## Return valueCOMMENT
LOWsrc/api/events.rs205 /// ## Return valueCOMMENT
LOWsrc/api/events.rs347 /// ## Return valueCOMMENT
LOWsrc/api/events.rs426 /// ## Return valueCOMMENT
LOWsrc/api/events.rs502 /// ## Return valueCOMMENT
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/parse_json.rs32 assert_eq!(map["name"].clone().into_immutable_string().expect("name should exist"), "John Doe");CODE
LOWtests/parse_json.rs156 assert_eq!(map["name"].clone().into_immutable_string().expect("name should exist"), "John Doe");CODE