AI Slop Code RIsk Monitor

chaijs/chai

BDD / TDD assertion framework for node.js and the browser that can be paired with any testing framework.

47.2 High pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for chaijs/chai, a JavaScript project with 8,265 GitHub stars. SynthScan examined 34,331 lines of code across 71 source files, recording 192 pattern matches distributed across 3 syntactic categories. The legacy adjusted pattern signal is 47.2 (High 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.

47.2
Adjusted Signal
47.2
Raw Pattern Score
100%
Time Factor
2026-10-05
Last Push
8.3K
Stars
JavaScript
Language
34.3K
Lines of Code
71
Files
192
Pattern Hits
2026-10-12
Scan Date
2.44
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 3.3/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 90.2/100 · CRITICAL

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

Agent Over-Engineering Ratio 2.6/100 · LOW

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

PR Review Velocity Impact 92.2/100 · CRITICAL

Which changes need focused human review? 192 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 173HIGH 0MEDIUM 0LOW 19

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 192 distinct pattern matches across 3 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.

Hallucination Indicators173 hits · 1598 pts
SeverityFileLineSnippetContext
CRITICALReleaseNotes.md211expect(true).to.be.true.and.not.false();CODE
CRITICAL⚡test/expect.js924 expect('foo').to.have.length.of.at.least(4, 'blah');CODE
CRITICAL⚡test/expect.js928 expect('foo', 'blah').to.have.length.of.at.least(4);CODE
CRITICAL⚡test/expect.js936 expect([ 1, 2, 3 ]).to.have.length.of.at.least(4, 'blah');CODE
CRITICAL⚡test/expect.js944 expect([ 1, 2, 3, 4 ]).to.not.have.length.of.at.least(4, 'blah');CODE
CRITICAL⚡test/expect.js948 expect([ 1, 2, 3, 4 ]).to.not.have.lengthOf.at.least(4, 'blah');CODE
CRITICAL⚡test/expect.js987 expect(new Map()).to.have.length.of.at.least(0);CODE
CRITICAL⚡test/expect.js995 expect(map).to.have.length.of.at.least(3);CODE
CRITICAL⚡test/expect.js999 expect(map).to.have.length.of.at.least(4, 'blah');CODE
CRITICAL⚡test/expect.js1006 expect(new Set()).to.have.length.of.at.least(0);CODE
CRITICAL⚡test/expect.js1014 expect(set).to.have.length.of.at.least(3);CODE
CRITICAL⚡test/expect.js1018 expect(set).to.have.length.of.at.least(4, 'blah');CODE
CRITICAL⚡test/expect.js1208 expect('foo').to.have.length.of.at.most(2, 'blah');CODE
CRITICAL⚡test/expect.js1212 expect('foo', 'blah').to.have.length.of.at.most(2);CODE
CRITICAL⚡test/expect.js1220 expect([ 1, 2, 3 ]).to.have.length.of.at.most(2, 'blah');CODE
CRITICAL⚡test/expect.js1228 expect([ 1, 2 ]).to.not.have.length.of.at.most(2, 'blah');CODE
CRITICAL⚡test/expect.js1232 expect([ 1, 2 ]).to.not.have.lengthOf.at.most(2, 'blah');CODE
CRITICAL⚡test/expect.js1260 expect(1).to.have.length.of.at.most(0, 'blah');CODE
CRITICAL⚡test/expect.js1264 expect(1, 'blah').to.have.length.of.at.most(0);CODE
CRITICAL⚡test/expect.js1271 expect(new Map()).to.have.length.of.at.most(0);CODE
CRITICAL⚡test/expect.js1279 expect(map).to.have.length.of.at.most(3);CODE
CRITICAL⚡test/expect.js1283 expect(map).to.have.length.of.at.most(2, 'blah');CODE
CRITICAL⚡test/expect.js1290 expect(new Set()).to.have.length.of.at.most(0);CODE
CRITICAL⚡test/expect.js1298 expect(set).to.have.length.of.at.most(3);CODE
CRITICAL⚡test/expect.js1302 expect(set).to.have.length.of.at.most(2, 'blah');CODE
CRITICAL⚡test/expect.js1331 expect(now).to.have.length.of.at.most(2, 'blah');CODE
CRITICAL⚡test/expect.js1335 expect('foo', 'blah').to.have.length.of.at.most(now);CODE
CRITICAL⚡test/expect.js1339 expect([ 1, 2, 3 ]).to.not.have.length.of.at.most(now, 'blah');CODE
CRITICAL⚡test/expect.js2055 expect(obj).to.not.have.deep.own.property('a', {z: 1});CODE
CRITICAL⚡test/expect.js2058 expect(obj).to.not.have.deep.own.property('a', {b: 7});CODE
CRITICAL⚡test/expect.js2061 expect(obj).to.not.have.deep.own.property('toString', Object.prototype.toString);CODE
CRITICAL⚡test/expect.js2146 expect(obj).to.not.have.deep.nested.property('a.b', {c: 7});CODE
CRITICAL⚡test/expect.js2147 expect(obj).to.not.have.deep.nested.property('a.b', {z: 1});CODE
CRITICAL⚡test/expect.js2148 expect(obj).to.not.have.deep.nested.property('a.z', {c: 1});CODE
CRITICAL⚡test/expect.js2711 expect(testMap).to.not.contain.all.deep.keys({thisIs: 'anExampleObject'}, 'thisDoesNotExist');CODE
CRITICAL⚡test/expect.js2713 expect(testMap).to.not.have.any.deep.keys({iDoNot: 'exist'});CODE
CRITICAL⚡test/expect.js2714 expect(testMap).to.not.have.any.deep.keys('thisIsNotAkey', {iDoNot: 'exist'}, {33: 20});CODE
CRITICAL⚡test/expect.js2715 expect(testMap).to.not.have.all.deep.keys('thisDoesNotExist', 'thisToo', {doingThisBecauseOf: 'referential equality'CODE
CRITICAL⚡test/expect.js2722 expect(testMap).to.not.have.any.deep.keys([{13: 37}, 'thisDoesNotExist', 'thisToo']);CODE
CRITICAL⚡test/expect.js2723 expect(testMap).to.not.have.any.deep.keys([20, 1, {13: 37}]);CODE
CRITICAL⚡test/expect.js2724 expect(testMap).to.not.have.all.deep.keys([{thisIs: 'anExampleObject'}, {'iDoNot': 'exist'}]);CODE
CRITICAL⚡test/expect.js2838 expect(testSet).to.not.contain.all.deep.keys({thisIs: 'anExampleObject'}, 'thisDoesNotExist');CODE
CRITICAL⚡test/expect.js2840 expect(testSet).to.not.have.any.deep.keys({iDoNot: 'exist'});CODE
CRITICAL⚡test/expect.js2841 expect(testSet).to.not.have.any.deep.keys('thisIsNotAkey', {iDoNot: 'exist'}, {33: 20});CODE
CRITICAL⚡test/expect.js2842 expect(testSet).to.not.have.all.deep.keys('thisDoesNotExist', 'thisToo', {doingThisBecauseOf: 'referential equality'CODE
CRITICAL⚡test/expect.js2849 expect(testSet).to.not.have.any.deep.keys([{13: 37}, 'thisDoesNotExist', 'thisToo']);CODE
CRITICAL⚡test/expect.js2850 expect(testSet).to.not.have.any.deep.keys([20, 1, {13: 37}]);CODE
CRITICAL⚡test/expect.js2851 expect(testSet).to.not.have.all.deep.keys([{thisIs: 'anExampleObject'}, {'iDoNot': 'exist'}]);CODE
CRITICALtest/expect.js906 expect('foo').to.have.length.of.at.least(2);CODE
CRITICALtest/expect.js908 expect([ 1, 2, 3 ]).to.have.length.of.at.least(2);CODE
CRITICALtest/expect.js1190 expect('foo').to.have.length.of.at.most(4);CODE
CRITICALtest/expect.js1192 expect([ 1, 2, 3 ]).to.have.length.of.at.most(4);CODE
CRITICALtest/expect.js2074 expect(obj).to.not.have.deep.own.property('a', {b: 1}, 'blah');CODE
CRITICALtest/expect.js2159 expect(obj).to.not.have.deep.nested.property('a.b', {c: 1}, 'blah');CODE
CRITICALtest/utilities.js434 expect([1, 2, 3]).to.be.a.thing.with.length.above(2);CODE
CRITICALtest/utilities.js588 expect([1, 2, 3]).to.be.an.foo.length.below(1000);CODE
CRITICALtest/utilities.js594 expect([1, 2, 3]).to.be.a.foo.with.length.above(2);CODE
CRITICAL⚡test/should.js849 (new Map()).should.have.length.of.at.least(0);CODE
CRITICAL⚡test/should.js857 map.should.have.length.of.at.least(3);CODE
CRITICAL⚡test/should.js858 map.should.have.lengthOf.at.least(3);CODE
113 more matches not shown…
Hyper-Verbose Identifiers14 hits · 18 pts
SeverityFileLineSnippetContext
LOW⚡test/configuration.js76 function badOverwrittenPropertyAssertion() {CODE
LOW⚡test/configuration.js82 function badOverwrittenMethodAssertion() {CODE
LOW⚡test/configuration.js85 function badChainableMethodAssertion() {CODE
LOW⚡test/configuration.js88 function badOverwrittenChainableMethodAssertion() {CODE
LOW⚡test/configuration.js370 function badOverwrittenPropertyAssertion() {CODE
LOW⚡test/configuration.js376 function badOverwrittenMethodAssertion() {CODE
LOW⚡test/configuration.js379 function badChainableMethodAssertion() {CODE
LOW⚡test/configuration.js382 function badOverwrittenChainableMethodAssertion() {CODE
LOWlib/chai/core/assertions.js2157function assertOwnPropertyDescriptor(name, descriptor, msg) {CODE
LOWlib/chai/utils/overwriteProperty.js55 get: function overwritingPropertyGetter() {CODE
LOWlib/chai/utils/getOwnEnumerableProperties.js22export function getOwnEnumerableProperties(obj) {CODE
LOWlib/chai/utils/getOwnEnumerablePropertySymbols.js20export function getOwnEnumerablePropertySymbols(obj) {CODE
LOWlib/chai/utils/overwriteChainableMethod.js59 function overwritingChainableMethodGetter() {CODE
LOWlib/chai/utils/overwriteChainableMethod.js74 chainableBehavior.method = function overwritingChainableMethodWrapper() {CODE
Over-Commented Block5 hits · 5 pts
SeverityFileLineSnippetContext
LOWlib/chai/utils/addChainableMethod.js121 // frames from the stack trace of a failed assertion.COMMENT
LOWlib/chai/utils/overwriteProperty.js61 // the `lockSsfi` flag isn't set and proxy protection is disabled.COMMENT
LOWlib/chai/utils/overwriteMethod.js61 // function to be the starting point for removing implementation frames fromCOMMENT
LOWlib/chai/utils/addProperty.js41 Object.defineProperty(ctx, name, {COMMENT
LOWlib/chai/utils/addMethod.js41 /**COMMENT