The minimalistic document archiving platform.
This report summarizes scanner evidence for papra-hq/papra, a TypeScript project with 5,609 GitHub stars. SynthScan examined 181,980 lines of code across 1461 source files, recording 641 pattern matches distributed across 7 syntactic categories. The legacy adjusted pattern signal is 3.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.
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.
Can maintainers explain intent, assumptions, and trade-offs? 453 finding(s).
Are imports declared and package/API names verified? 188 finding(s).
Are wrappers, guards, and repeated structures necessary? 436 finding(s).
Which changes need focused human review? 641 finding(s).
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.
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.
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.
The scanner identified 641 distinct pattern matches across 7 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/lecture/src/utils/archive.ts | 3 | export async function getFileContentFromArchive({ | CODE |
| LOW | packages/lecture/src/tesseract/tesseract.usecases.ts | 30 | export function createTesseractCliExtractor({ | CODE |
| LOW | packages/lecture/src/tesseract/tesseract.usecases.ts | 53 | export function createTesseractJsExtractor({ | CODE |
| LOW | …/cli/src/commands/import/paperless/paperless.wizard.ts | 422 | function isDocumentAlreadyExistsError(error: unknown): boolean { | CODE |
| LOW⚡ | packages/webhooks/src/handler/handler.errors.ts | 1 | export function createInvalidSignatureError() { | CODE |
| LOW⚡ | packages/webhooks/src/handler/handler.errors.ts | 7 | export function createUnsupportedSignatureVersionError() { | CODE |
| LOW⚡ | packages/webhooks/src/handler/handler.errors.ts | 16 | export function createInvalidSignatureFormatError() { | CODE |
| LOW | apps/papra-server/src/scripts/create-migration.ts | 20 | async function getLastMigrationFilePrefixNumber() { | CODE |
| LOW | …/src/modules/organizations/organizations.api.routes.ts | 22 | export function buildOrganizationsApiRoutes(deps: ApiDependencies) { | CODE |
| LOW | …/src/modules/organizations/organizations.api.routes.ts | 33 | function setupGetOrganizationsRoute({ resolveAuthenticationContext, db }: ApiDependencies) { | CODE |
| LOW | …/src/modules/organizations/organizations.api.routes.ts | 53 | function setupGetDeletedOrganizationsRoute({ resolveAuthenticationContext, db }: ApiDependencies) { | CODE |
| LOW | …/src/modules/organizations/organizations.api.routes.ts | 75 | function setupCreateOrganizationRoute({ | CODE |
| LOW | …/src/modules/organizations/organizations.api.routes.ts | 107 | function setupGetOrganizationRoute({ resolveAuthenticationContext, db }: ApiDependencies) { | CODE |
| LOW | …/src/modules/organizations/organizations.api.routes.ts | 131 | function setupUpdateOrganizationRoute({ resolveAuthenticationContext, db }: ApiDependencies) { | CODE |
| LOW | …/src/modules/organizations/organizations.api.routes.ts | 156 | function setupSoftDeleteOrganizationRoute({ | CODE |
| LOW | …rver/src/modules/organizations/organizations.models.ts | 6 | export function canUserRemoveMemberFromOrganization({ | CODE |
| LOW | …rver/src/modules/organizations/organizations.models.ts | 28 | export function getUserMaxOrganizationCount({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 31 | export function createOrganizationsRepository({ db }: { db: Database }) { | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 179 | async function clearUserDeletedByReferences({ userId, db }: { userId: string; db: Database }) { | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 203 | async function getUserOwnedOrganizationCount({ userId, db }: { userId: string; db: Database }) { | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 256 | async function getOrganizationMembersCount({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 310 | async function removeUserFromOrganization({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 329 | async function updateOrganizationMemberRole({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 347 | async function getOrganizationMemberByUserId({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 369 | async function getOrganizationMemberByMemberId({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 391 | async function saveOrganizationInvitation({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 435 | async function getTodayUserInvitationCount({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 467 | async function getPendingOrganizationInvitationsForEmail({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 502 | async function getOrganizationInvitationById({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 521 | async function updateOrganizationInvitation({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 553 | async function getPendingInvitationsCount({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 587 | async function getPendingInvitationForEmailAndOrganization({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 612 | async function getOrganizationMemberByEmail({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 634 | async function getOrganizationInvitations({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 653 | async function updateExpiredPendingInvitationsStatus({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 676 | async function getOrganizationPendingInvitationsCount({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 706 | async function deleteAllMembersFromOrganization({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 718 | async function deleteAllOrganizationInvitations({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 770 | async function getUserDeletedOrganizations({ | CODE |
| LOW | …/src/modules/organizations/organizations.repository.ts | 795 | async function getExpiredSoftDeletedOrganizations({ | CODE |
| LOW | …dules/organizations/organizations.repository.models.ts | 30 | export function createSearchOrganizationWhereClause({ search }: { search?: string }) { | CODE |
| LOW | …er/src/modules/organizations/organizations.usecases.ts | 66 | export async function ensureUserIsInOrganization({ | CODE |
| LOW | …er/src/modules/organizations/organizations.usecases.ts | 85 | export async function checkIfUserCanCreateNewOrganization({ | CODE |
| LOW | …er/src/modules/organizations/organizations.usecases.ts | 108 | export async function getOrCreateOrganizationCustomerId({ | CODE |
| LOW | …er/src/modules/organizations/organizations.usecases.ts | 108 | export async function getOrCreateOrganizationCustomerId({ | CODE |
| LOW | …er/src/modules/organizations/organizations.usecases.ts | 145 | export async function ensureUserIsOwnerOfOrganization({ | CODE |
| LOW | …er/src/modules/organizations/organizations.usecases.ts | 163 | export async function removeMemberFromOrganization({ | CODE |
| LOW | …er/src/modules/organizations/organizations.usecases.ts | 212 | export async function checkIfUserHasReachedOrganizationInvitationLimit({ | CODE |
| LOW | …er/src/modules/organizations/organizations.usecases.ts | 233 | export function buildInviteMemberToOrganization({ | CODE |
| LOW | …er/src/modules/organizations/organizations.usecases.ts | 377 | export async function sendOrganizationInvitationEmail({ | CODE |
| LOW | …er/src/modules/organizations/organizations.usecases.ts | 416 | export async function updateOrganizationMemberRole({ | CODE |
| LOW | …er/src/modules/organizations/organizations.usecases.ts | 463 | export function buildResendOrganizationInvitation({ | CODE |
| LOW | …er/src/modules/organizations/organizations.usecases.ts | 598 | export async function getOrganizationStorageLimits({ | CODE |
| LOW | …er/src/modules/organizations/organizations.usecases.ts | 710 | export async function purgeExpiredSoftDeletedOrganization({ | CODE |
| LOW | …er/src/modules/organizations/organizations.usecases.ts | 765 | export async function purgeExpiredSoftDeletedOrganizations({ | CODE |
| LOW | …rver/src/modules/organizations/organizations.routes.ts | 28 | export function registerOrganizationsRoutes(context: RouteDefinitionContext) { | CODE |
| LOW | …rver/src/modules/organizations/organizations.routes.ts | 38 | function setupGetOrganizationMembersRoute({ app, db }: RouteDefinitionContext) { | CODE |
| LOW | …rver/src/modules/organizations/organizations.routes.ts | 62 | function setupRemoveOrganizationMemberRoute({ app, db }: RouteDefinitionContext) { | CODE |
| LOW | …rver/src/modules/organizations/organizations.routes.ts | 92 | function setupUpdateOrganizationMemberRoute({ app, db }: RouteDefinitionContext) { | CODE |
| LOW | …rver/src/modules/organizations/organizations.routes.ts | 158 | function setupInviteOrganizationMemberRoute({ | CODE |
| 376 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …kages/lecture/src/tesseract/tesseract.usecases.test.ts | 6 | // Lorem ipsum image in base64 | COMMENT |
| LOW | …kages/lecture/src/tesseract/tesseract.usecases.test.ts | 20 | expect(result).to.eql('Lorem ipsum dolor sit amet'); | CODE |
| LOW | …kages/lecture/src/tesseract/tesseract.usecases.test.ts | 20 | expect(result).to.eql('Lorem ipsum dolor sit amet'); | CODE |
| LOW | …c/modules/organizations/organizations.usecases.test.ts | 464 | { id: 'user-2', email: 'admin@example.com' }, | CODE |
| LOW | …c/modules/organizations/organizations.usecases.test.ts | 1550 | { id: 'admin-user', email: 'admin@example.com' }, | CODE |
| LOW | …/papra-server/src/modules/app/auth/auth.models.test.ts | 253 | email: 'user@example.com', | CODE |
| LOW | …/papra-server/src/modules/app/auth/auth.models.test.ts | 260 | email: 'user@example.com', | CODE |
| LOW | …/papra-server/src/modules/app/auth/auth.models.test.ts | 272 | email: 'user@example.com', | CODE |
| LOW | …/papra-server/src/modules/app/auth/auth.models.test.ts | 292 | email: 'user@example.com', | CODE |
| LOW | …/papra-server/src/modules/app/auth/auth.models.test.ts | 317 | email: 'user@example.com', | CODE |
| LOW | …/papra-server/src/modules/app/auth/auth.models.test.ts | 383 | email: 'user@example.com', | CODE |
| LOW | …ra-server/src/modules/app/auth/auth.middleware.test.ts | 30 | users: [{ id: 'user-1', email: 'user@example.com' }], | CODE |
| LOW | …ra-server/src/modules/app/auth/auth.middleware.test.ts | 54 | users: [{ id: 'user-1', email: 'user@example.com' }], | CODE |
| LOW | …ra-server/src/modules/app/auth/auth.middleware.test.ts | 112 | users: [{ id: 'user-1', email: 'user@example.com' }], | CODE |
| LOW | …ra-server/src/modules/app/auth/auth.middleware.test.ts | 143 | users: [{ id: 'user-1', email: 'user@example.com' }], | CODE |
| LOW | …ra-server/src/modules/app/auth/auth.middleware.test.ts | 174 | users: [{ id: 'user-1', email: 'user@example.com' }], | CODE |
| LOW | …les/admin/organizations/organizations.usecases.test.ts | 34 | { id: adminId, email: 'admin@example.com' }, | CODE |
| LOW | …les/admin/organizations/organizations.usecases.test.ts | 87 | { id: adminId, email: 'admin@example.com' }, | CODE |
| LOW | …les/admin/organizations/organizations.usecases.test.ts | 167 | { id: adminId, email: 'admin@example.com' }, | CODE |
| LOW | …les/admin/organizations/organizations.usecases.test.ts | 223 | { id: adminId, email: 'admin@example.com' }, | CODE |
| LOW | …les/admin/organizations/organizations.usecases.test.ts | 277 | { id: adminId, email: 'admin@example.com' }, | CODE |
| LOW | …les/admin/organizations/organizations.usecases.test.ts | 311 | { id: adminId, email: 'admin@example.com' }, | CODE |
| LOW | …les/admin/organizations/organizations.usecases.test.ts | 354 | { id: adminId, email: 'admin@example.com' }, | CODE |
| LOW | …ules/admin/organizations/e2e/organizations.e2e.test.ts | 11 | users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }], | CODE |
| LOW | …ules/admin/organizations/e2e/organizations.e2e.test.ts | 37 | users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }], | CODE |
| LOW | …ules/admin/organizations/e2e/organizations.e2e.test.ts | 66 | users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }], | CODE |
| LOW | …ules/admin/organizations/e2e/organizations.e2e.test.ts | 95 | users: [{ id: 'usr_regular', email: 'user@example.com' }], | CODE |
| LOW | …ules/admin/organizations/e2e/organizations.e2e.test.ts | 139 | users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }], | CODE |
| LOW | …ules/admin/organizations/e2e/organizations.e2e.test.ts | 162 | users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }], | CODE |
| LOW | …ules/admin/organizations/e2e/organizations.e2e.test.ts | 181 | users: [{ id: 'usr_regular', email: 'user@example.com' }], | CODE |
| LOW | …ules/admin/organizations/e2e/organizations.e2e.test.ts | 231 | { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }, | CODE |
| LOW | …ules/admin/organizations/e2e/organizations.e2e.test.ts | 260 | users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }], | CODE |
| LOW | …ules/admin/organizations/e2e/organizations.e2e.test.ts | 279 | users: [{ id: 'usr_regular', email: 'user@example.com' }], | CODE |
| LOW | …ules/admin/organizations/e2e/organizations.e2e.test.ts | 317 | users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }], | CODE |
| LOW | …ules/admin/organizations/e2e/organizations.e2e.test.ts | 349 | users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }], | CODE |
| LOW | …ules/admin/organizations/e2e/organizations.e2e.test.ts | 368 | users: [{ id: 'usr_regular', email: 'user@example.com' }], | CODE |
| LOW | …ules/admin/organizations/e2e/organizations.e2e.test.ts | 406 | users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }], | CODE |
| LOW | …ules/admin/organizations/e2e/organizations.e2e.test.ts | 439 | users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }], | CODE |
| LOW | …ules/admin/organizations/e2e/organizations.e2e.test.ts | 458 | users: [{ id: 'usr_regular', email: 'user@example.com' }], | CODE |
| LOW | …ules/admin/organizations/e2e/organizations.e2e.test.ts | 496 | users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }], | CODE |
| LOW | …ules/admin/organizations/e2e/organizations.e2e.test.ts | 521 | users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }], | CODE |
| LOW | …ules/admin/organizations/e2e/organizations.e2e.test.ts | 540 | users: [{ id: 'usr_regular', email: 'user@example.com' }], | CODE |
| LOW | …/modules/admin/users/e2e/plan-entitlements.e2e.test.ts | 19 | { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }, | CODE |
| LOW | …/modules/admin/users/e2e/plan-entitlements.e2e.test.ts | 62 | { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }, | CODE |
| LOW | …/modules/admin/users/e2e/plan-entitlements.e2e.test.ts | 105 | { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }, | CODE |
| LOW | …/modules/admin/users/e2e/plan-entitlements.e2e.test.ts | 143 | { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }, | CODE |
| LOW | …/modules/admin/users/e2e/plan-entitlements.e2e.test.ts | 189 | { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }, | CODE |
| LOW | …/modules/admin/users/e2e/plan-entitlements.e2e.test.ts | 214 | users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }], | CODE |
| LOW | …/modules/admin/users/e2e/plan-entitlements.e2e.test.ts | 239 | { id: 'usr_regular', email: 'user@example.com' }, | CODE |
| LOW | …/modules/admin/users/e2e/plan-entitlements.e2e.test.ts | 289 | { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }, | CODE |
| LOW | …/modules/admin/users/e2e/plan-entitlements.e2e.test.ts | 326 | { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }, | CODE |
| LOW | …/modules/admin/users/e2e/plan-entitlements.e2e.test.ts | 368 | { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }, | CODE |
| LOW | …/modules/admin/users/e2e/plan-entitlements.e2e.test.ts | 392 | { id: 'usr_regular', email: 'user@example.com' }, | CODE |
| LOW | …/modules/admin/users/e2e/plan-entitlements.e2e.test.ts | 429 | { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }, | CODE |
| LOW | …a-server/src/modules/admin/users/e2e/users.e2e.test.ts | 15 | { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }, | CODE |
| LOW | …a-server/src/modules/admin/users/e2e/users.e2e.test.ts | 16 | { id: 'usr_regular', email: 'user@example.com', name: 'Regular User' }, | CODE |
| LOW | …a-server/src/modules/admin/users/e2e/users.e2e.test.ts | 40 | { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }, | CODE |
| LOW | …a-server/src/modules/admin/users/e2e/users.e2e.test.ts | 41 | { id: 'usr_regular', email: 'user@example.com', name: 'Regular User' }, | CODE |
| LOW⚡ | …a-server/src/modules/admin/users/e2e/users.e2e.test.ts | 59 | expect(body.users[0]?.email).to.eql('admin@example.com'); | CODE |
| LOW⚡ | …a-server/src/modules/admin/users/e2e/users.e2e.test.ts | 65 | { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }, | CODE |
| 127 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …rver/src/modules/subscriptions/subscriptions.routes.ts | 161 | // Step 1: Expire any active checkout sessions before creating a new one | COMMENT |
| LOW⚡ | …rver/src/modules/subscriptions/subscriptions.routes.ts | 165 | // Step 2: Cancel any incomplete subscriptions from previous failed attempts | COMMENT |
| LOW | …erver/src/modules/documents/documents.usecases.test.ts | 430 | // Step 1: Upload a file | COMMENT |
| LOW | …erver/src/modules/documents/documents.usecases.test.ts | 444 | // Step 2: Delete the document (soft delete) | COMMENT |
| LOW | …erver/src/modules/documents/documents.usecases.test.ts | 459 | // Step 3: Upload the same file again - this should restore the original document | COMMENT |
| LOW | …erver/src/modules/documents/documents.usecases.test.ts | 472 | // Step 5: Verify no orphan files remain in storage | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …rver/src/modules/subscriptions/subscriptions.routes.ts | 161 | // Step 1: Expire any active checkout sessions before creating a new one | COMMENT |
| LOW⚡ | …rver/src/modules/subscriptions/subscriptions.routes.ts | 165 | // Step 2: Cancel any incomplete subscriptions from previous failed attempts | COMMENT |
| LOW | …erver/src/modules/documents/documents.usecases.test.ts | 430 | // Step 1: Upload a file | COMMENT |
| LOW | …erver/src/modules/documents/documents.usecases.test.ts | 444 | // Step 2: Delete the document (soft delete) | COMMENT |
| LOW | …erver/src/modules/documents/documents.usecases.test.ts | 459 | // Step 3: Upload the same file again - this should restore the original document | COMMENT |
| LOW | …erver/src/modules/documents/documents.usecases.test.ts | 472 | // Step 5: Verify no orphan files remain in storage | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | packages/cli/src/commands/config/config.command.ts | 154 | valueHint: 'your-api-key', | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/search-parser/README.md | 41 | // expression: { | COMMENT |
| LOW | packages/search-parser/README.md | 101 | // operands: [ | COMMENT |
| LOW | packages/search-parser/README.md | 121 | // }, | COMMENT |
| LOW | …erver/src/modules/ai-credits/rates/ai-credits.rates.ts | 21 | }; | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …pra-server/src/modules/documents/documents.usecases.ts | 143 | // We optimistically save the file to leverage streaming, if the file already exists, we will delete it | COMMENT |