AI Slop Code Risk Monitor

mozilla/pdf.js

SlopCodeMonitor badge for mozilla/pdf.js Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

PDF Reader in JavaScript

0.6 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for mozilla/pdf.js, a JavaScript project with 54,067 GitHub stars. SynthScan examined 287,729 lines of code across 608 source files, recording 133 pattern matches distributed across 12 syntactic categories. The legacy adjusted pattern signal is 0.6 (Low 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.

0.6
Adjusted Signal
0.6
Raw Pattern Score
100%
Time Factor
2026-10-30
Last Push
54.1K
Stars
JavaScript
Language
287.7K
Lines of Code
608
Files
133
Pattern Hits
2026-10-31
Scan Date
0.00
HC Hit Rate

Risk Review · Payload v1

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

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 2.1/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 0.5/100 · LOW

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

Agent Over-Engineering Ratio 1.3/100 · LOW

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

PR Review Velocity Impact 2.8/100 · LOW

Which changes need focused human review? 133 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 1HIGH 1MEDIUM 7LOW 124

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 133 distinct pattern matches across 12 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.

Hyper-Verbose Identifiers61 hits · 61 pts
SeverityFileLineSnippetContext
LOWtest/coverage_utils.js43async function fetchAndMergeWorkerCoverage(worker) {CODE
LOWtest/unit/pattern_spec.js27 function createFunctionBasedShading({CODE
LOWtest/unit/function_spec.js48 function createExponentialFunction(c0, c1) {CODE
LOWtest/unit/crypto_spec.js610 function ensureAESEncryptedStringHasCorrectLength(CODE
LOWtest/unit/crypto_spec.js634 function ensureEncryptDecryptIsIdentity(dict, fileId, password, string) {CODE
LOWtest/unit/crypto_spec.js643 function ensureCrossCipherIsIdentity(CODE
LOWtest/unit/api_spec.js130 function buildSharedImageResourcePdf() {CODE
LOWtest/unit/api_spec.js150 function buildGeneratedAppearancePdf(pageContents = null) {CODE
LOWtest/unit/api_spec.js1132 function getDocumentWithGatedRenderer(body, filename = basicApiFileName) {CODE
LOWtest/unit/api_spec.js1204 async function countDiffsWithReadyRenderer(context, filename) {CODE
LOWtest/unit/api_spec.js6721 async function checkImageSmoothingPixelRatio(disableWorkerRendering) {CODE
LOWtest/unit/common_pdfstream_tests.js66function getCrossOriginUrlWithRedirects(testserverUrl, redirectIfRange) {CODE
LOWtest/unit/jasmine-boot.js146function installWorkerCoverageHook(WorkerClass, targetName) {CODE
LOWtest/unit/jasmine-boot.js179async function flushPendingWorkerCoverage() {CODE
LOWtest/benchmarks/stream_utils.js68async function capturePNGPredictorInputs(CODE
LOWtest/pdfs/sig_corpus/generate.py52def _resolve_mozilla_central_dir(cli_value):CODE
LOWweb/ui_utils.js322function backtrackBeforeAllVisibleElements(index, views, top) {CODE
LOWweb/ui_utils.js457 function isElementBottomAfterViewTop(view) {CODE
LOWweb/ui_utils.js463 function isElementNextAfterViewHorizontally(view) {CODE
LOWweb/ui_utils.js582function normalizeWheelEventDirection(evt) {CODE
LOWweb/ui_utils.js741function getActiveOrFocusedElement() {CODE
LOWweb/ui_utils.js760function apiPageLayoutToViewerModes(layout) {CODE
LOWweb/chromecom.js151function isAllowedFileSchemeAccess(callback) {CODE
LOWweb/chromecom.js166function reloadIfRuntimeIsUnavailable() {CODE
LOWweb/pdf_viewer.js83function isValidAnnotationEditorMode(mode) {CODE
LOWweb/app.js2536 function addWindowResolutionChange(evt = null) {CODE
LOWextensions/chromium/pdfHandler.js222async function isHeaderConditionSupported() {CODE
LOWexternal/openjpeg/openjpeg.js2async function OpenJPEG(moduleArg={}){var Module=moduleArg;var ENVIRONMENT_IS_WEB=true;var ENVIRONMENT_IS_WORKER=false;vCODE
LOWexternal/brotli/decode.js67 function calculateDistanceAlphabetSize(npostfix, ndirect, maxndistbits) {CODE
LOWexternal/brotli/decode.js77 function calculateDistanceAlphabetLimit(s, maxDistance, npostfix, ndirect) {CODE
LOWexternal/brotli/decode.js371 function inverseMoveToFrontTransform(v, vLen) {CODE
LOWexternal/brotli/decode.js736 function decodeDistanceBlockSwitch(s) {CODE
LOWexternal/brotli/decode.js744 function maybeReallocateRingBuffer(s) {CODE
LOWexternal/brotli/decode.js882 function readMetablockHuffmanCodesAndContextMaps(s) {CODE
LOWexternal/brotli/decode.js1047 function huffmanTreeGroupAllocSize(alphabetSizeLimit, n) {CODE
LOWexternal/brotli/decode.js1133 function initializeCompoundDictionary(s) {CODE
LOWexternal/brotli/decode.js1157 function initializeCompoundDictionaryCopy(s, address, length) {CODE
LOWexternal/brotli/decode.js1182 function copyFromCompoundDictionary(s, fence) {CODE
LOWexternal/jbig2/jbig2.js2async function JBig2(moduleArg={}){var Module=moduleArg;var ENVIRONMENT_IS_WEB=true;var ENVIRONMENT_IS_WORKER=false;var CODE
LOW…nal/builder/fixtures_babel/instantiatewasm-expected.js33function aliasBeforeInitialization() {CODE
LOWexternal/builder/fixtures_babel/instantiatewasm.js56function aliasBeforeInitialization() {CODE
LOWsrc/core/pattern.js52function getColorConversionBatchSize(count, numComps) {CODE
LOWsrc/core/annotation.js710function writeLineToCurveToAppearance(data, buffer, maybeClose = false) {CODE
LOWsrc/core/fonts.js386function applyStandardFontGlyphMap(map, glyphMap) {CODE
LOWsrc/core/fonts.js1509 function readTrueTypeCollectionHeader(ttc) {CODE
LOWsrc/core/fonts.js1542 function readTrueTypeCollectionData(ttc, fontName) {CODE
LOWsrc/core/evaluator.js1748 function closePendingMarkedContentOPS() {CODE
LOWsrc/core/evaluator.js3203 function closePendingMarkedContentItems(level = 0) {CODE
LOWsrc/core/glyf.js695function pruneCompositeGlyphCycles(glyfTable, locaEntries, numGlyphs) {CODE
LOWsrc/core/crypto.js805 function cipherTransformDecryptStream(data, finalize) {CODE
LOWsrc/core/xfa/data.js25class DataHandler {CODE
LOWsrc/core/postscript/wasm_compiler.js1074function buildPostScriptWasmFunction(source, domain, range) {CODE
LOWsrc/core/postscript/js_evaluator.js822function buildPostScriptJsFunction(CODE
LOWsrc/shared/image_utils.js29function convertBlackAndWhiteToRGBA({CODE
LOWsrc/display/content_disposition.js30function getFilenameFromContentDispositionHeader(contentDisposition) {CODE
LOWsrc/display/display_utils.js98function getCurrentTransformInverse(ctx) {CODE
LOWsrc/display/network_utils.js51function validateRangeRequestCapabilities({CODE
LOWsrc/display/network_utils.js94function extractFilenameFromHeader(responseHeaders) {CODE
LOWsrc/display/editor/drawers/highlight.js24function getHighlightSVGProperties(outline) {CODE
LOWsrc/display/editor/drawers/highlight.js45function getHighlightFocusSVGProperties(outline, rotation) {CODE
1 more matches not shown…
Over-Commented Block44 hits · 44 pts
SeverityFileLineSnippetContext
LOWtest/unit/ui_utils_spec.js201COMMENT
LOWtest/unit/ui_utils_spec.js221 // margins, borders, or padding.COMMENT
LOWtest/unit/api_spec.js10901 });COMMENT
LOWtest/unit/api_spec.js11081 await newLoadingTask.destroy();COMMENT
LOWweb/ui_utils.js321 */COMMENT
LOWweb/ui_utils.js341 // **** = fully hiddenCOMMENT
LOWweb/ui_utils.js361 // case 3, and this assumption is correct.COMMENT
LOWweb/chromecom.js261// to the background page.COMMENT
LOWweb/pdf_history.js561 // more than `POSITION_UPDATED_THRESHOLD` times.COMMENT
LOWweb/pdf_find_controller.js161 // The goal of this function is to normalize the string andCOMMENT
LOWextensions/chromium/telemetry.js21 // determine whether it is safe to drop support for old Chrome versions inCOMMENT
LOWextensions/chromium/contentscript.js141}COMMENT
LOWextensions/chromium/contentscript.js181 // <object> and <embed> elements have a "display:inline" style by default.COMMENT
LOWexamples/learning/helloworld.html21 //COMMENT
LOW.github/workflows/ref_tests_request.yml1name: Request reference testsCOMMENT
LOWsrc/core/cff_parser.js961 privateDict.setByName("BlueShift", DEFAULT_BLUE_SHIFT);COMMENT
LOWsrc/core/cff_parser.js1641COMMENT
LOWsrc/core/annotation.js661 // lies outside the region specified by the rectangle. The rectangleCOMMENT
LOWsrc/core/annotation.js2441 rotation = this.rotation;COMMENT
LOWsrc/core/evaluator.js2481 negativeSpaceMax: -Infinity,COMMENT
LOWsrc/core/evaluator.js2541COMMENT
LOWsrc/core/evaluator.js5421 // - An empty array. This indicates that the caller is providing theCOMMENT
LOWsrc/core/type1_font.js121 warn('Unable to recover "Length1" property in Type1 font -- using as is.');COMMENT
LOWsrc/core/parser.js921 // While lexing, we build up many strings one char at a time. Using += forCOMMENT
LOWsrc/core/xfa/formcalc_parser.js241// operation ('... * - ...' can't be a subtraction).COMMENT
LOWsrc/core/postscript/ast.js1361 // When the condition is a numeric comparison between two expressions A andCOMMENT
LOWsrc/core/editor/pdf_editor.js141 // times. This is used to determine if we can preserve information that can'tCOMMENT
LOWsrc/display/content_disposition.js181 // We are more strict and only recognize RFC 2047-encoding if the valueCOMMENT
LOWsrc/display/canvas_dependency_tracker.js1201 sin < 1e-6 ||COMMENT
LOWsrc/display/canvas_dependency_tracker.js1221 // are helper variables used to compute the effective transform.COMMENT
LOWsrc/display/canvas.js561 static #pathCaches = new WeakMap();COMMENT
LOWsrc/display/canvas.js641 this.smaskPreparedEntry = null;COMMENT
LOWsrc/display/canvas.js1381 // Alpha, or Luminosity with no backdrop: OOB input is transparent,COMMENT
LOWsrc/display/canvas.js1661 }COMMENT
LOWsrc/display/canvas.js3541 // mode and/or a soft mask) can't use the direct path above, so itCOMMENT
LOWsrc/display/canvas.js3561 // case, left untouched to avoid changing its rendering (issue 13520).COMMENT
LOWsrc/display/canvas.js3741 colorCtx.drawImage(groupCtx.canvas, 0, 0);COMMENT
LOWsrc/display/pattern_helper.js761 //COMMENT
LOWsrc/display/dom_filter_factory.js421 newBgRGB,COMMENT
LOWsrc/display/editor/draw.js641 // We've to deal with two rotations: the rotation of the annotation and theCOMMENT
LOWsrc/display/editor/drawers/inkdraw.js61COMMENT
LOWsrc/display/editor/drawers/freedraw.js21COMMENT
LOWsrc/display/editor/drawers/signaturedraw.js661 height,COMMENT
LOWsrc/scripting_api/app.js61 #runtimeHighlightColor = ["T"];COMMENT
Decorative Section Separators6 hits · 14 pts
SeverityFileLineSnippetContext
MEDIUMtest/pdfs/sig_corpus/generate.py98# ---------------------------------------------------------------------COMMENT
MEDIUMtest/pdfs/sig_corpus/generate.py100# ---------------------------------------------------------------------COMMENT
MEDIUMtest/pdfs/sig_corpus/generate.py290# ---------------------------------------------------------------------COMMENT
MEDIUMtest/pdfs/sig_corpus/generate.py292# ---------------------------------------------------------------------COMMENT
MEDIUMtest/pdfs/sig_corpus/generate.py462# ---------------------------------------------------------------------STRING
MEDIUMtest/pdfs/sig_corpus/generate.py464# ---------------------------------------------------------------------STRING
Fake / Example Data10 hits · 12 pts
SeverityFileLineSnippetContext
LOWtest/unit/scripting_spec.js3364 value = await myeval(`eMailValidate("foo@bar.com")`);CODE
LOWtest/unit/annotation_spec.js2184 "(Lorem ipsum dolor sit amet, consectetur adipiscing elit.) Tj\n" +CODE
LOWtest/unit/annotation_spec.js2184 "(Lorem ipsum dolor sit amet, consectetur adipiscing elit.) Tj\n" +CODE
LOWtest/unit/annotation_spec.js2213 "Lorem ipsum dolor sit amet, consectetur adipiscing elit.\r" +CODE
LOWtest/unit/annotation_spec.js2213 "Lorem ipsum dolor sit amet, consectetur adipiscing elit.\r" +CODE
LOW⚡test/unit/bidi_spec.js96 const str = "Lorem ipsum dolor sit amet, consectetur adipisicing elit.";CODE
LOW⚡test/unit/bidi_spec.js96 const str = "Lorem ipsum dolor sit amet, consectetur adipisicing elit.";CODE
LOW⚡test/unit/bidi_spec.js100 "Lorem ipsum dolor sit amet, consectetur adipisicing elit."CODE
LOW⚡test/unit/bidi_spec.js100 "Lorem ipsum dolor sit amet, consectetur adipisicing elit."CODE
LOWweb/pdf_thumbnail_viewer.js800 placeholder.classList.add("thumbnailImageContainer", "placeholder");CODE
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALdocs/contents/js/jquery-3.7.1.min.js2!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):fCODE
Cross-Language Confusion (JS/TS)1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHsrc/scripting_api/doc.js1207 print(CODE
TODO Padding3 hits · 4 pts
SeverityFileLineSnippetContext
LOWsrc/core/xfa/html_utils.js151 // TODO: implement this correctly !COMMENT
LOWsrc/core/xfa/som.js63// TODO: implement that stuff and the remove the noExpr param.COMMENT
LOWsrc/core/xfa/template.js1640 // TODO: implement all the missing properties.COMMENT
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMsrc/core/annotation.js4947 // In order to simplify things, we utilize straight lines for now.COMMENT
Verbosity Indicators2 hits · 3 pts
SeverityFileLineSnippetContext
LOWsrc/display/editor/tools.js907 // like zooming, hence we need to check if the container has theCOMMENT
LOWsrc/display/editor/tools.js920 // like zooming, hence we need to check if the container has theCOMMENT
Slop Phrases2 hits · 2 pts
SeverityFileLineSnippetContext
LOWweb/toggle_button.css23 in such a case don't forget to change the revision in the above link).CODE
LOWsrc/core/parser.js563 // Finally, don't forget to reset the stream position.COMMENT
Structural Annotation Overuse1 hit · 2 pts
SeverityFileLineSnippetContext
LOWweb/firefoxcom.js285 // NOTE: This method is currently not invoked in the Firefox PDF Viewer.COMMENT
Deep Nesting1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtest/pdfs/sig_corpus/generate.py103CODE