AI Slop Code Risk Monitor

GitbookIO/gitbook

SlopCodeMonitor badge for GitbookIO/gitbook Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

The open source frontend for GitBook doc sites

2.1 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for GitbookIO/gitbook, a TypeScript project with 29,081 GitHub stars. SynthScan examined 130,967 lines of code across 1137 source files, recording 255 pattern matches distributed across 6 syntactic categories. The legacy adjusted pattern signal is 2.1 (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.

2.1
Adjusted Signal
2.1
Raw Pattern Score
100%
Time Factor
2026-10-30
Last Push
29.1K
Stars
TypeScript
Language
131.0K
Lines of Code
1.1K
Files
255
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 9.0/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 1.0/100 · LOW

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

Agent Over-Engineering Ratio 8.7/100 · LOW

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

PR Review Velocity Impact 10.0/100 · LOW

Which changes need focused human review? 255 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 4MEDIUM 1LOW 250

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 255 distinct pattern matches across 6 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 Identifiers238 hits · 238 pts
SeverityFileLineSnippetContext
LOWpackages/react-openapi/src/OpenAPIOperationContext.tsx22export function OpenAPIOperationContextProvider(CODE
LOWpackages/react-openapi/src/OpenAPIOperationContext.tsx43export function useOpenAPIOperationContext() {CODE
LOW…ckages/react-openapi/src/OpenAPIOperationStability.tsx9export function OpenAPIOperationStability(props: {CODE
LOWpackages/react-openapi/src/OpenAPISchema.tsx189export function OpenAPISchemaPropertiesFromServer(props: {CODE
LOWpackages/react-openapi/src/OpenAPISchema.tsx279export function OpenAPIRootSchemaFromServer(props: {CODE
LOWpackages/react-openapi/src/OpenAPISchema.tsx344function OpenAPISchemaAlternatives(props: {CODE
LOWpackages/react-openapi/src/OpenAPISchema.tsx442function OpenAPISchemaAlternativeSeparator(props: {CODE
LOWpackages/react-openapi/src/OpenAPISchema.tsx541export function OpenAPISchemaPresentation(props: {CODE
LOW…ages/react-openapi/src/OpenAPIOperationDescription.tsx10export function OpenAPIOperationDescription(props: {CODE
LOWpackages/react-openapi/src/utils.ts206export function getStatusCodeDefaultLabel(CODE
LOWpackages/react-openapi/src/utils.ts318function normalizeNullableUnionUncached(typed: OpenAPIV3.SchemaObject): OpenAPIV3.SchemaObject {CODE
LOWpackages/react-openapi/src/utils.ts428export function extractOperationSecurityInfo(args: {CODE
LOWpackages/react-openapi/src/utils.ts479function resolveRequiredScopesForScheme(CODE
LOW…ges/react-openapi/src/OpenAPIRequestBodyHeaderType.tsx11export function OpenAPIRequestBodyHeaderType(props: {CODE
LOWpackages/react-openapi/src/generateSchemaExample.ts30export function generateMediaTypeExamples(CODE
LOWpackages/react-openapi/src/resolveOpenAPIWebhook.ts98function getWebhookByNameAndMethod(CODE
LOWpackages/react-openapi/src/resolveOpenAPIOperation.ts171function getOperationByPathAndMethod(CODE
LOW…es/react-openapi/src/OpenAPIPrefillContextProvider.tsx22export function OpenAPIPrefillContextProvider(CODE
LOWpackages/react-openapi/src/OpenAPIMediaType.tsx21function useMediaTypeExamplesState(stateKey: string | undefined, initialKey: Key = 'default') {CODE
LOWpackages/react-openapi/src/dereference.ts26async function baseDereferenceFilesystem(filesystem: Filesystem): Promise<OpenAPIV3xDocument> {CODE
LOWpackages/react-openapi/src/OpenAPICodeSample.tsx262function resolveScalarClientContext(CODE
LOW…es/react-openapi/src/OpenAPIResponseExampleContent.tsx22export function OpenAPIResponseExampleContent(props: {CODE
LOW…es/react-openapi/src/OpenAPIResponseExampleContent.tsx38function OpenAPIResponseExampleHeader(props: {CODE
LOW…es/react-openapi/src/OpenAPIResponseExampleContent.tsx70function OpenAPIResponseExampleItem(props: { item: OpenAPIResponseExampleItem }) {CODE
LOW…es/react-openapi/src/OpenAPIResponseExampleContent.tsx88function OpenAPIResponseExampleBody(props: { items: OpenAPIResponseExampleItem[] }) {CODE
LOW…es/react-openapi/src/OpenAPIResponseExampleContent.tsx105function getResponseExampleStateKey() {CODE
LOW…kages/react-openapi/src/OpenAPIPathMultipleServers.tsx16export function OpenAPIPathMultipleServers(CODE
LOW…ges/react-openapi/src/OpenAPICodeSampleInteractive.tsx6export function OpenAPIMediaTypeExamplesSelector(props: {CODE
LOW…ges/react-openapi/src/OpenAPICodeSampleInteractive.tsx93export function OpenAPIMediaTypeExamplesBody(props: {CODE
LOWpackages/react-openapi/src/util/example.tsx25export function getExamplesFromMediaTypeObject(args: {CODE
LOWpackages/react-openapi/src/util/tryit-prefill.ts23export function resolveTryItPrefillForOperation(args: {CODE
LOWpackages/react-openapi/src/util/tryit-prefill.ts74function resolveTryItPrefillAuthForOperationSecurities(args: {CODE
LOWpackages/react-openapi/src/util/tryit-prefill.ts128function resolveTryItPrefillServersForOperationServers(args: {CODE
LOWpackages/react-openapi/src/util/tryit-prefill.ts180export function resolvePrefillCodePlaceholderFromSecurityScheme(args: {CODE
LOWpackages/react-openapi/src/util/tryit-prefill.ts199function extractPrefillExpressionPartsFromSecurityScheme(CODE
LOWpackages/react-openapi/src/util/tryit-prefill.ts214export function resolveURLWithPrefillCodePlaceholdersFromServer(CODE
LOWpackages/react-openapi/src/util/tryit-prefill.ts261function templatePartsToExpression(parts: ReturnType<typeof parseTemplate>) {CODE
LOW…act-openapi/src/common/OpenAPIOperationDescription.tsx7export function OpenAPIOperationDescription(props: {CODE
LOWpackages/expr/src/autocomplete.ts557function isSupportedMemberProperty(node: Expression | PrivateIdentifier | Super) {CODE
LOWpackages/expr/src/runtime.ts256function createExpressionErrorFromSyntaxError(CODE
LOWpackages/expr/src/runtime.ts279function validateRestrictedExpression(code: string, expression: Expression): void {CODE
LOWpackages/expr/src/runtime.ts322function isParsedExpressionStatement(CODE
LOWpackages/expr/src/runtime.ts328export function filterOutModuleDeclarationStatement(CODE
LOWpackages/expr/src/input-values.ts16export function inferDefaultInputValuesFromObjectJSONSchema(CODE
LOWpackages/expr/src/input-values.ts36function inferDefaultInputValueFromJSONSchema(schema: JSONSchema7): InputValuesType {CODE
LOWpackages/expr/src/input-values.ts62function inferDefaultInputValueFromPrimitive(schema: JSONSchema7): InputValuesType {CODE
LOWpackages/openapi-parser/src/schemas.ts22export function filterSelectedOpenAPISchemas(CODE
LOWpackages/cache-tags/src/index.ts128export function getComputedContentSourceCacheTags(CODE
LOWpackages/react-contentkit/src/context.ts96export function useContentKitClientContext(): ContentKitClientContextType {CODE
LOWpackages/gitbook/tests/mcp-utils.ts183export async function fetchProtectedResourceMetadata(siteURL: string, endpoint: string) {CODE
LOWpackages/gitbook/e2e/style-perf.spec.ts118async function waitForStableElementCount(page: Page): Promise<number> {CODE
LOWpackages/gitbook/src/middleware.ts102async function validateServerActionRequest(request: NextRequest) {CODE
LOWpackages/gitbook/src/middleware.ts140function shouldFilterMaliciousRequests(requestURL: URL): boolean {CODE
LOW…ode]/[siteURL]/[siteData]/~gitbook/site-index/route.ts50function getIndexablePagesWithAncestors(CODE
LOWpackages/gitbook/src/components/Insights/cookies.ts22export function isCookiesTrackingDisabled() {CODE
LOWpackages/gitbook/src/components/Insights/cookies.ts42export function isGlobalPrivacyControlEnabled(): boolean {CODE
LOW…book/src/components/SpaceLayout/SpaceLayoutContext.tsx15export function SpaceLayoutContextProvider(CODE
LOW…book/src/components/SpaceLayout/SpaceLayoutContext.tsx53export function useSiteAdaptiveAuthLoginHref() {CODE
LOW…rc/components/SiteSections/encodeClientSiteSections.ts223function areSiteSpacesSameLanguage(siteSpace1: SiteSpace, siteSpace2: SiteSpace) {CODE
LOW…ents/SiteSections/shouldRenderSiteSectionNavigation.ts4export function shouldRenderSiteSectionNavigation(sections: SiteSections | null): boolean {CODE
178 more matches not shown…
Magic Placeholder Names4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHpackages/react-openapi/src/OpenAPICodeSample.test.ts26 Authorization: 'CustomScheme YOUR_API_KEY',CODE
HIGHpackages/react-openapi/src/OpenAPICodeSample.tsx377 defaultPlaceholderValue: 'YOUR_API_KEY',CODE
HIGH…ok/src/components/DocumentView/CodeBlock/utils.test.ts37 code: 'const config = { API_KEY: "$$__X-GITBOOK-PREFILL[visitor.claims.apiKey ?? "YOUR_API_KEY"]__$$" }',CODE
HIGH…ok/src/components/DocumentView/CodeBlock/utils.test.ts61 data: { expression: 'visitor.claims.apiKey ?? "YOUR_API_KEY"' },CODE
Fake / Example Data6 hits · 6 pts
SeverityFileLineSnippetContext
LOWpackages/gitbook/e2e/internal.spec.ts51 '2. Perform a single search for exactly "Lorem ipsum".',CODE
LOWpackages/gitbook/src/components/Ads/Ad.tsx77 previewParam === 'placeholder' ||CODE
LOWpackages/gitbook/src/components/Ads/Ad.tsx88 ? await renderAd({ source: 'placeholder' })CODE
LOWpackages/gitbook/src/components/Ads/renderAd.tsx36 source: 'placeholder';CODE
LOWpackages/gitbook/src/lib/visitors.test.ts569 const url = new URL('https://docs.example.com/?jwt_token=fake-token');CODE
LOWpackages/gitbook/src/lib/visitors.test.ts582 'https://docs.example.com/?jwt_token=fake-token&visitor.isBetaUser=true&visitor.language=fr'CODE
Over-Commented Block3 hits · 3 pts
SeverityFileLineSnippetContext
LOWpackages/gitbook/types/global.d.ts1// Needed because of https://github.com/oven-sh/bun/issues/358COMMENT
LOWpackages/gitbook/e2e/internal.spec.ts2181 // const invalidToken = jwt.sign(COMMENT
LOW.github/workflows/deploy-preview.yaml281 BASE_URL: ${{needs.deploy-v2-vercel.outputs.deployment-url}}COMMENT
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMpackages/gitbook/src/components/WebMCP/WebMCP.tsx36 // The MCP SDK is imported lazily: only agentic browsers pay for it.COMMENT
Verbosity Indicators3 hits · 3 pts
SeverityFileLineSnippetContext
LOWpackages/gitbook/src/components/AI/references.test.ts56 expect(result).toContain('The user is referring to the following code block');CODE
LOWpackages/gitbook/src/components/AI/references.test.ts75 const codeIndex = result.indexOf('referring to the following code block');CODE
LOWpackages/gitbook/src/components/AI/references.ts77 return `The user is referring to the following code block${plural ? 's' : ''} from the page they are reading. AnswerCODE