Repository Analysis

GitbookIO/gitbook

The open source frontend for GitBook doc sites

2.0 Likely human-written View on GitHub
2.0
Adjusted Score
2.0
Raw Score
100%
Time Factor
2026-05-29
Last Push
28,873
Stars
TypeScript
Language
100,186
Lines of Code
900
Files
184
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 4MEDIUM 0LOW 180

Pattern Findings

184 matches across 4 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers175 hits · 175 pts
SeverityFileLineSnippet
LOWpackages/react-openapi/src/OpenAPIOperationContext.tsx22export function OpenAPIOperationContextProvider(
LOWpackages/react-openapi/src/OpenAPIOperationContext.tsx43export function useOpenAPIOperationContext() {
LOW…ckages/react-openapi/src/OpenAPIOperationStability.tsx8export function OpenAPIOperationStability(props: {
LOWpackages/react-openapi/src/OpenAPISchema.tsx181export function OpenAPISchemaPropertiesFromServer(props: {
LOWpackages/react-openapi/src/OpenAPISchema.tsx268export function OpenAPIRootSchemaFromServer(props: {
LOWpackages/react-openapi/src/OpenAPISchema.tsx333function OpenAPISchemaAlternatives(props: {
LOWpackages/react-openapi/src/OpenAPISchema.tsx431function OpenAPISchemaAlternativeSeparator(props: {
LOWpackages/react-openapi/src/OpenAPISchema.tsx530export function OpenAPISchemaPresentation(props: {
LOW…ages/react-openapi/src/OpenAPIOperationDescription.tsx9export function OpenAPIOperationDescription(props: {
LOWpackages/react-openapi/src/utils.ts192export function getStatusCodeDefaultLabel(
LOWpackages/react-openapi/src/utils.ts340export function extractOperationSecurityInfo(args: {
LOWpackages/react-openapi/src/utils.ts391function resolveRequiredScopesForScheme(
LOW…ges/react-openapi/src/OpenAPIRequestBodyHeaderType.tsx10export function OpenAPIRequestBodyHeaderType(props: {
LOWpackages/react-openapi/src/generateSchemaExample.ts29export function generateMediaTypeExamples(
LOWpackages/react-openapi/src/resolveOpenAPIWebhook.ts90function getWebhookByNameAndMethod(
LOWpackages/react-openapi/src/resolveOpenAPIOperation.ts154function getOperationByPathAndMethod(
LOW…es/react-openapi/src/OpenAPIPrefillContextProvider.tsx22export function OpenAPIPrefillContextProvider(
LOWpackages/react-openapi/src/OpenAPIMediaType.tsx21function useMediaTypeExamplesState(stateKey: string | undefined, initialKey: Key = 'default') {
LOWpackages/react-openapi/src/dereference.ts21async function baseDereferenceFilesystem(filesystem: Filesystem): Promise<OpenAPIV3xDocument> {
LOWpackages/react-openapi/src/OpenAPICodeSample.tsx267function resolveScalarClientContext(
LOW…es/react-openapi/src/OpenAPIResponseExampleContent.tsx24export function OpenAPIResponseExampleContent(props: {
LOW…es/react-openapi/src/OpenAPIResponseExampleContent.tsx47function OpenAPIResponseExampleHeader(props: {
LOW…es/react-openapi/src/OpenAPIResponseExampleContent.tsx84function OpenAPIResponseExampleItem(props: {
LOW…es/react-openapi/src/OpenAPIResponseExampleContent.tsx104function OpenAPIResponseExampleBody(props: {
LOW…es/react-openapi/src/OpenAPIResponseExampleContent.tsx123function getResponseExampleStateKey(blockKey: string | undefined) {
LOW…kages/react-openapi/src/OpenAPIPathMultipleServers.tsx18export function OpenAPIPathMultipleServers(
LOW…ges/react-openapi/src/OpenAPICodeSampleInteractive.tsx6export function OpenAPIMediaTypeExamplesSelector(props: {
LOW…ges/react-openapi/src/OpenAPICodeSampleInteractive.tsx101export function OpenAPIMediaTypeExamplesBody(props: {
LOWpackages/react-openapi/src/util/example.tsx24export function getExamplesFromMediaTypeObject(args: {
LOWpackages/react-openapi/src/util/tryit-prefill.ts21export function resolveTryItPrefillForOperation(args: {
LOWpackages/react-openapi/src/util/tryit-prefill.ts72function resolveTryItPrefillAuthForOperationSecurities(args: {
LOWpackages/react-openapi/src/util/tryit-prefill.ts126function resolveTryItPrefillServersForOperationServers(args: {
LOWpackages/react-openapi/src/util/tryit-prefill.ts178export function resolvePrefillCodePlaceholderFromSecurityScheme(args: {
LOWpackages/react-openapi/src/util/tryit-prefill.ts197function extractPrefillExpressionPartsFromSecurityScheme(
LOWpackages/react-openapi/src/util/tryit-prefill.ts212export function resolveURLWithPrefillCodePlaceholdersFromServer(
LOWpackages/react-openapi/src/util/tryit-prefill.ts259function templatePartsToExpression(parts: ReturnType<typeof parseTemplate>) {
LOW…act-openapi/src/common/OpenAPIOperationDescription.tsx6export function OpenAPIOperationDescription(props: {
LOWpackages/expr/src/autocomplete.ts558function isSupportedMemberProperty(node: Expression | PrivateIdentifier | Super) {
LOWpackages/expr/src/runtime.ts227function createExpressionErrorFromSyntaxError(
LOWpackages/expr/src/runtime.ts274function isParsedExpressionStatement(
LOWpackages/expr/src/runtime.ts280export function filterOutModuleDeclarationStatement(
LOWpackages/expr/src/input-values.ts15export function inferDefaultInputValuesFromObjectJSONSchema(
LOWpackages/expr/src/input-values.ts35function inferDefaultInputValueFromJSONSchema(schema: JSONSchema7): InputValuesType {
LOWpackages/expr/src/input-values.ts61function inferDefaultInputValueFromPrimitive(schema: JSONSchema7): InputValuesType {
LOWpackages/openapi-parser/src/schemas.ts8export function filterSelectedOpenAPISchemas(
LOWpackages/cache-tags/src/index.ts127export function getComputedContentSourceCacheTags(
LOWpackages/react-contentkit/src/context.ts51export function useContentKitClientContext(): ContentKitClientContextType {
LOWpackages/gitbook/src/middleware.ts87async function validateServerActionRequest(request: NextRequest) {
LOWpackages/gitbook/src/middleware.ts125function shouldFilterMaliciousRequests(requestURL: URL): boolean {
LOW…ode]/[siteURL]/[siteData]/~gitbook/site-index/route.ts48function getIndexablePagesWithAncestors(
LOWpackages/gitbook/src/components/Insights/cookies.ts22export function isCookiesTrackingDisabled() {
LOWpackages/gitbook/src/components/Insights/cookies.ts42export function isGlobalPrivacyControlEnabled(): boolean {
LOW…book/src/components/SpaceLayout/SpaceLayoutContext.tsx13export function SpaceLayoutContextProvider(
LOW…book/src/components/SpaceLayout/SpaceLayoutContext.tsx43export function useSiteAdaptiveAuthLoginHref() {
LOW…rc/components/SiteSections/encodeClientSiteSections.ts193function areSiteSpacesSameLanguage(siteSpace1: SiteSpace, siteSpace2: SiteSpace) {
LOW…c/components/RootLayout/OperatingSystemClassScript.tsx25export function OperatingSystemClassScript() {
LOW…onents/Embeddable/EmbeddableDocsPageControlButtons.tsx6export function EmbeddableDocsPageControlButtons(props: { href: string }) {
LOW…/gitbook/src/components/Embeddable/EmbeddableFrame.tsx64export function EmbeddableFrameHeaderMain(props: {
LOW…/components/Embeddable/EmbeddableAIContextProvider.tsx13export function EmbeddableAIContextProvider(props: EmbeddableAIContextProviderProps) {
LOW…ook/src/components/Embeddable/EmbeddableRootLayout.tsx90export async function generateEmbeddableViewport({ context }: { context: GitBookSiteContext }) {
115 more matches not shown…
Magic Placeholder Names4 hits · 20 pts
SeverityFileLineSnippet
HIGHpackages/react-openapi/src/OpenAPICodeSample.test.ts25 Authorization: 'CustomScheme YOUR_API_KEY',
HIGHpackages/react-openapi/src/OpenAPICodeSample.tsx383 defaultPlaceholderValue: 'YOUR_API_KEY',
HIGH…ok/src/components/DocumentView/CodeBlock/utils.test.ts36 code: 'const config = { API_KEY: "$$__X-GITBOOK-PREFILL[visitor.claims.apiKey ?? "YOUR_API_KEY"]__$$" }',
HIGH…ok/src/components/DocumentView/CodeBlock/utils.test.ts60 data: { expression: 'visitor.claims.apiKey ?? "YOUR_API_KEY"' },
Over-Commented Block4 hits · 4 pts
SeverityFileLineSnippet
LOWpackages/gitbook/types/global.d.ts1// Needed because of https://github.com/oven-sh/bun/issues/358
LOWpackages/gitbook/e2e/internal.spec.ts1741 // screenshot: false,
LOWpackages/gitbook/src/middleware.ts321 }
LOW.github/workflows/deploy-preview.yaml241 # uses: actions/checkout@v4
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippet
LOWpackages/gitbook/e2e/internal.spec.ts39const AI_PROMPT = `You're being invoked by the GitBook CI/CD pipeline. Search for "Lorem ipsum", then return the first s