AI Slop Code RIsk Monitor

josdejong/mathjs

An extensive math library for JavaScript and Node.js

6.8 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for josdejong/mathjs, a JavaScript project with 15,086 GitHub stars. SynthScan examined 163,717 lines of code across 1146 source files, recording 203 pattern matches distributed across 5 syntactic categories. The legacy adjusted pattern signal is 6.8 (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.

6.8
Adjusted Signal
6.8
Raw Pattern Score
100%
Time Factor
2026-09-13
Last Push
15.1K
Stars
JavaScript
Language
163.7K
Lines of Code
1.1K
Files
203
Pattern Hits
2026-10-12
Scan Date
0.13
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 1.7/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 27.7/100 · MEDIUM

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

Agent Over-Engineering Ratio 0.7/100 · LOW

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

PR Review Velocity Impact 26.0/100 · MEDIUM

Which changes need focused human review? 203 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 3HIGH 151MEDIUM 0LOW 49

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 203 distinct pattern matches across 5 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.

Cross-Language Confusion (JS/TS)151 hits · 1016 pts
SeverityFileLineSnippetContext
HIGHtypes/index.d.ts3388 print(CODE
HIGHtypes/index.d.ts7086 print(CODE
HIGH⚡examples/expressions.js22print(evaluate('sqrt(3^2 + 4^2)')) // 5CODE
HIGH⚡examples/expressions.js23print(evaluate('sqrt(-4)')) // 2iCODE
HIGH⚡examples/expressions.js24print(evaluate('2 inch to cm')) // 5.08 cmCODE
HIGH⚡examples/expressions.js25print(evaluate('cos(45 deg)')) // 0.70711CODE
HIGH⚡examples/expressions.js29print(evaluate([CODE
HIGH⚡examples/expressions.js43print(evaluate('a * b', scope)) // 12CODE
HIGH⚡examples/expressions.js46print(evaluate('c = 2.3 + 4.5', scope)) // 6.8CODE
HIGH⚡examples/expressions.js47print(scope.c) // 6.8CODE
HIGH⚡examples/expressions.js53print(evaluate('hello("hero")', scope)) // "hello, hero!"CODE
HIGH⚡examples/expressions.js57print(f(2)) // 8CODE
HIGH⚡examples/expressions.js58print(scope.f(2)) // 8CODE
HIGH⚡examples/expressions.js74print(node1.toString()) // "sqrt((3 ^ 2) + (4 ^ 2))"CODE
HIGH⚡examples/expressions.js78print(node1.evaluate()) // 5CODE
HIGH⚡examples/expressions.js84print(node2.toString()) // "x ^ a"CODE
HIGH⚡examples/expressions.js89print(code2.evaluate(scope2)) // 9CODE
HIGH⚡examples/expressions.js93print(code2.evaluate(scope2)) // 27CODE
HIGH⚡examples/expressions.js133print(myParser.evaluate('sqrt(3^2 + 4^2)')) // 5CODE
HIGH⚡examples/expressions.js134print(myParser.evaluate('sqrt(-4)')) // 2iCODE
HIGH⚡examples/expressions.js135print(myParser.evaluate('2 inch to cm')) // 5.08 cmCODE
HIGH⚡examples/expressions.js136print(myParser.evaluate('cos(45 deg)')) // 0.70710678118655CODE
HIGH⚡examples/expressions.js140print(myParser.evaluate('x = 7 / 2')) // 3.5CODE
HIGH⚡examples/expressions.js141print(myParser.evaluate('x + 3')) // 6.5CODE
HIGH⚡examples/expressions.js142print(myParser.evaluate('f2(x, y) = x^y')) // f2(x, y)CODE
HIGH⚡examples/expressions.js143print(myParser.evaluate('f2(2, 3)')) // 8CODE
HIGH⚡examples/expressions.js150print(myParser.evaluate('k = [1, 2; 3, 4]')) // [[1, 2], [3, 4]]CODE
HIGH⚡examples/expressions.js151print(myParser.evaluate('l = zeros(2, 2)')) // [[0, 0], [0, 0]]CODE
HIGH⚡examples/expressions.js152print(myParser.evaluate('l[1, 1:2] = [5, 6]')) // [5, 6]CODE
HIGH⚡examples/expressions.js153print(myParser.evaluate('l')) // [[5, 6], [0, 0]]CODE
HIGH⚡examples/expressions.js154print(myParser.evaluate('l[2, :] = [7, 8]')) // [7, 8]CODE
HIGH⚡examples/expressions.js155print(myParser.evaluate('l')) // [[5, 6], [7, 8]]CODE
HIGH⚡examples/expressions.js156print(myParser.evaluate('m = k * l')) // [[19, 22], [43, 50]]CODE
HIGH⚡examples/expressions.js157print(myParser.evaluate('n = m[2, 1]')) // 43CODE
HIGH⚡examples/expressions.js158print(myParser.evaluate('n = m[:, 1]')) // [[19], [43]]CODE
HIGHexamples/expressions.js111print(code3.evaluate()) // 5CODE
HIGHexamples/expressions.js120print(scope3.a) // 10CODE
HIGHexamples/expressions.js170print(myParser.evaluate('i / 2')) // 250CODE
HIGHexamples/expressions.js174print(myParser.evaluate('hello("hero")')) // "hello, hero!"CODE
HIGH⚡examples/basic_usage.js23print(round(e, 3)) // 2.718CODE
HIGH⚡examples/basic_usage.js24print(atan2(3, -3) / pi) // 0.75CODE
HIGH⚡examples/basic_usage.js25print(log(10000, 10)) // 4CODE
HIGH⚡examples/basic_usage.js26print(sqrt(-4)) // 2iCODE
HIGH⚡examples/basic_usage.js27print(pow([[-1, 2], [3, 1]], 2)) // [[7, 0], [0, 7]]CODE
HIGH⚡examples/basic_usage.js28print(derivative('x^2 + x', 'x')) // 2 * x + 1CODE
HIGH⚡examples/basic_usage.js33print(evaluate('1.2 * (2 + 4.5)')) // 7.8CODE
HIGH⚡examples/basic_usage.js34print(evaluate('12.7 cm to inch')) // 5 inchCODE
HIGH⚡examples/basic_usage.js35print(evaluate('sin(45 deg) ^ 2')) // 0.5CODE
HIGH⚡examples/basic_usage.js36print(evaluate('9 / 3 + 2i')) // 3 + 2iCODE
HIGH⚡examples/basic_usage.js37print(evaluate('det([-1, 2; 3, 1])')) // -7CODE
HIGH⚡examples/basic_usage.js46print(a) // 14CODE
HIGH⚡examples/basic_usage.js51print(add(4, [5, 6])) // number + Array, [9, 10]CODE
HIGH⚡examples/basic_usage.js52print(multiply(unit('5 mm'), 3)) // Unit * number, 15 mmCODE
HIGH⚡examples/basic_usage.js53print(subtract([2, 3, 4], 5)) // Array - number, [-3, -2, -1]CODE
HIGH⚡examples/basic_usage.js54print(add(matrix([2, 3]), [4, 5])) // Matrix + Array, [6, 8]CODE
HIGH⚡examples/import.js20print(math.myConstant * 2) // 84CODE
HIGH⚡examples/import.js21print(math.hello('user')) // 'hello, user!'CODE
HIGH⚡examples/import.js23print(math.evaluate('myConstant + 10')) // 52CODE
HIGH⚡examples/import.js24print(math.evaluate('hello("user")')) // 'hello, user!'CODE
HIGHexamples/import.js40 print(math.fibonacci(7)) // 13CODE
91 more matches not shown…
Hallucination Indicators3 hits · 45 pts
SeverityFileLineSnippetContext
CRITICAL⚡test/unit-tests/expression/security.test.js235 math.evaluate('cos.syntax="global.eval";s=unit("5 cm");s.units=[]._data;s.value=cos;s._compile=s.toString;expressiCODE
CRITICAL⚡test/unit-tests/expression/security.test.js241 math.evaluate('expression.node.ConstantNode.prototype.clone.call({"value":"evaluate"}).evaluate()("console.log(\'hCODE
CRITICAL⚡test/unit-tests/expression/security.test.js247 math.evaluate('c(x,y)="console.log(\'hacked...\')";expression.node.Node.prototype.compile.apply({_compile:c}).evalCODE
Hyper-Verbose Identifiers21 hits · 22 pts
SeverityFileLineSnippetContext
LOWgulpfile.js219function generateEntryFilesCallback (done) {CODE
LOWtools/entryGenerator.js192function generateDependenciesFiles ({ suffix, factories, entryFolder }) {CODE
LOWtest/unit-tests/function/probability/random.test.js135function assertUniformDistribution (values, min, max) {CODE
LOWtest/unit-tests/function/algebra/derivative.test.js11 function derivativeWithoutSimplify (expr, value) {CODE
LOW…t/unit-tests/function/algebra/decomposition/qr.test.js59function assertValidQRDecomposition (A, Q, R) {CODE
LOWtest/unit-tests/expression/parse.test.js30function parseAndStringifyWithParens (expr) {CODE
LOWsrc/factoriesNumber.js340function createNumberOptionalSecondArgFactory (name, fn) {CODE
LOW⚡src/core/function/import.js370 function hasTypedFunctionSignature (fn) {CODE
LOW⚡src/core/function/import.js378 function factoryAllowedInExpressions (factory) {CODE
LOW⚡src/core/function/import.js384 function isTransformFunctionFactory (factory) {CODE
LOWsrc/utils/array.js928 function recursiveForEachWithIndex (value, depth) {CODE
LOWsrc/utils/snapshot.js97export function createSnapshotFromFactories (factories) {CODE
LOWsrc/utils/bignumber/bitwise.js215function decCoefficientToBinaryString (x) {CODE
LOWsrc/function/matrix/matrixFromColumns.js69 function checkVectorTypeAndReturnLength (vec) {CODE
LOWsrc/function/matrix/matrixFromRows.js58 function checkVectorTypeAndReturnLength (vec) {CODE
LOWsrc/type/number.js29function makeNumberFromNonDecimalParts (parts) {CODE
LOWsrc/expression/parse.js1065 function parseMultiplyDivideModulus (state) {CODE
LOWsrc/expression/parse.js1101 function parseImplicitMultiplication (state) {CODE
LOWsrc/expression/node/FunctionAssignmentNode.js107 return function evalFunctionAssignmentNode (scope, args, context) {CODE
LOWsrc/expression/node/OperatorNode.js48 function calculateNecessaryParentheses (root, parenthesis, implicit, args, latex) {CODE
LOWsrc/expression/node/RangeNode.js19 function calculateNecessaryParentheses (node, parenthesis, implicit) {CODE
TODO Padding15 hits · 22 pts
SeverityFileLineSnippetContext
LOW…t/unit-tests/function/algebra/simplifyConstant.test.js64 // TODO: implement support for simplification of constant sub-expressions for inverses ofCOMMENT
LOWtest/generated-code-tests/entry/mainNumber.test.js140 // TODO: implement support for subset in number implementationCOMMENT
LOWbin/cli.js413 // TODO: implement configuration via command line argumentsCOMMENT
LOWsrc/utils/bignumber/formatter.js158 // TODO: implement support for upper and lower to be BigNumbers themselvesCOMMENT
LOWsrc/function/statistics/prod.js41 // TODO: implement prod(A, dim)COMMENT
LOWsrc/function/statistics/median.js96 // TODO: implement median(A, dim)COMMENT
LOWsrc/function/probability/permutations.js69 // TODO: implement support for collection in permutationsCOMMENT
LOWsrc/function/probability/combinations.js61 // TODO: implement support for collection in combinationsCOMMENT
LOWsrc/function/complex/arg.js48 // TODO: implement BigNumber support for function argCOMMENT
LOWsrc/function/arithmetic/divide.js55 // TODO: implement matrix right division using pseudo inverseCOMMENT
LOWsrc/function/arithmetic/xgcd.js40 // TODO: implement support for FractionCOMMENT
LOWsrc/function/bitwise/rightLogShift.js61 // 'BigNumber, BigNumber': ..., // TODO: implement BigNumber support for rightLogShiftCOMMENT
LOWsrc/type/matrix/Range.js267 // TODO: implement a caching mechanism for range.valueOf()COMMENT
LOWsrc/type/matrix/MatrixIndex.js75 // TODO: implement support for wildcard '*'COMMENT
LOWsrc/expression/node/IndexNode.js62 // TODO: implement support for bignumber (currently bignumbers are silentlyCOMMENT
Over-Commented Block13 hits · 12 pts
SeverityFileLineSnippetContext
LOWtools/whitelistgenerator.js101 // 'cbrt': true,COMMENT
LOW…t/unit-tests/function/algebra/simplifyConstant.test.js61 // collapsing of constants with a 'falsy' value (e.g. '0')COMMENT
LOWexamples/expressions.js61//COMMENT
LOWexamples/advanced/function_transform.js41// result: 6COMMENT
LOWexamples/advanced/custom_loading.js21// Use the created functionsCOMMENT
LOWexamples/advanced/convert_fraction_to_bignumber.js1// Convert from Fraction to BigNumberCOMMENT
LOWexamples/advanced/more_secure_eval.js1// Expression parser securityCOMMENT
LOWsrc/utils/is.js1// type checks for all known typesCOMMENT
LOWsrc/function/matrix/eigs/complexEigs.js21 // R is the row transformation matrixCOMMENT
LOWsrc/function/algebra/simplify.js201 phi: true,COMMENT
LOWsrc/function/algebra/rationalize.js401 }COMMENT
LOWsrc/function/algebra/sparse/csAmd.js81 // select node of minimum approximate degree. amd() is now ready to start eliminating the graph. It firstCOMMENT
LOWsrc/expression/operators.js1// list of identifiers of nodes in order of their precedenceCOMMENT