Socket-based TS/JavaScript API for WhatsApp Web
This report summarizes scanner evidence for WhiskeySockets/Baileys, a JavaScript project with 11,502 GitHub stars. SynthScan examined 71,519 lines of code across 175 source files, recording 39 pattern matches distributed across 7 syntactic categories. The legacy adjusted pattern signal is 0.9 (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? 29 finding(s).
Are imports declared and package/API names verified? 10 finding(s).
Are wrappers, guards, and repeated structures necessary? 8 finding(s).
Which changes need focused human review? 39 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 39 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⚡ | src/__tests__/Utils/tc-token.test.ts | 830 | // Step 1: Token missing → isTcTokenExpired(undefined) triggers fetch | COMMENT |
| LOW⚡ | src/__tests__/Utils/tc-token.test.ts | 834 | // Step 2: After fetch — token is fresh, no need to re-issue in same bucket | COMMENT |
| LOW⚡ | src/__tests__/Utils/tc-token.test.ts | 839 | // Step 3: Still in same bucket — token valid, no fire-and-forget | COMMENT |
| LOW⚡ | src/__tests__/Utils/tc-token.test.ts | 843 | // Step 4: Next bucket boundary crossed — shouldSendNewTcToken triggers | COMMENT |
| LOW⚡ | src/__tests__/Utils/tc-token.test.ts | 850 | // Step 5: Token received long ago → expired | COMMENT |
| LOW⚡ | src/__tests__/Utils/tc-token.test.ts | 854 | // Step 6: Identity change — check senderTimestamp | COMMENT |
| LOW⚡ | src/__tests__/Utils/tc-token.test.ts | 863 | // Step 7: Prune — only old tokens cleaned | COMMENT |
| LOW | src/Signal/libsignal.ts | 300 | // Step 3: Convert existing sessions to JIDs (only migrate sessions that exist) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | src/__tests__/Utils/tc-token.test.ts | 830 | // Step 1: Token missing → isTcTokenExpired(undefined) triggers fetch | COMMENT |
| LOW⚡ | src/__tests__/Utils/tc-token.test.ts | 834 | // Step 2: After fetch — token is fresh, no need to re-issue in same bucket | COMMENT |
| LOW⚡ | src/__tests__/Utils/tc-token.test.ts | 839 | // Step 3: Still in same bucket — token valid, no fire-and-forget | COMMENT |
| LOW⚡ | src/__tests__/Utils/tc-token.test.ts | 843 | // Step 4: Next bucket boundary crossed — shouldSendNewTcToken triggers | COMMENT |
| LOW⚡ | src/__tests__/Utils/tc-token.test.ts | 850 | // Step 5: Token received long ago → expired | COMMENT |
| LOW⚡ | src/__tests__/Utils/tc-token.test.ts | 854 | // Step 6: Identity change — check senderTimestamp | COMMENT |
| LOW⚡ | src/__tests__/Utils/tc-token.test.ts | 863 | // Step 7: Prune — only old tokens cleaned | COMMENT |
| LOW | src/Signal/libsignal.ts | 300 | // Step 3: Convert existing sessions to JIDs (only migrate sessions that exist) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | src/__tests__/Utils/sync-action-utils.test.ts | 22 | const action = { fullName: 'John Doe', lidJid: '123456789@lid', pnJid: null } | CODE |
| LOW⚡ | src/__tests__/Utils/sync-action-utils.test.ts | 32 | name: 'John Doe', | CODE |
| LOW⚡ | src/__tests__/Utils/sync-action-utils.test.ts | 41 | const action = { fullName: 'John Doe', lidJid: null, pnJid: '5511888888888@s.whatsapp.net' } | CODE |
| LOW⚡ | src/__tests__/Utils/sync-action-utils.test.ts | 51 | name: 'John Doe', | CODE |
| LOW | src/__tests__/Utils/sync-action-utils.test.ts | 72 | const action = { fullName: 'John Doe', lidJid: '123456789@lid', pnJid: null } | CODE |
| LOW⚡ | src/__tests__/Utils/sync-action-utils.test.ts | 96 | const action = { fullName: 'John Doe', lidJid: null, pnJid: null } | CODE |
| LOW⚡ | src/__tests__/Utils/sync-action-utils.test.ts | 105 | const action = { fullName: 'John Doe', lidJid: '123456789@lid', pnJid: null } | CODE |
| LOW⚡ | src/__tests__/Utils/sync-action-utils.test.ts | 114 | const action = { fullName: 'John Doe', lidJid: 'invalid-lid-format', pnJid: null } | CODE |
| LOW | src/__tests__/Utils/sync-action-utils.test.ts | 134 | const action = { fullName: 'John Doe', lidJid: '123456789@lid', pnJid: null } | CODE |
| LOW | src/__tests__/Utils/sync-action-utils.test.ts | 146 | const action = { fullName: 'John Doe', lidJid: '123456789@lid', pnJid: null } | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/Utils/auth-utils.ts | 37 | export function makeCacheableSignalKeyStore( | CODE |
| LOW | src/Utils/tc-token-utils.ts | 54 | export async function buildMergedTcTokenIndexWrite( | CODE |
| LOW | src/Utils/tc-token-utils.ts | 178 | export async function storeTcTokensFromIqResult({ | CODE |
| LOW | src/Utils/messages.ts | 936 | export function getAggregateVotesInPollMessage( | CODE |
| LOW | src/Utils/messages.ts | 992 | export function getAggregateResponsesInEventMessage( | CODE |
| LOW | src/Utils/event-buffer.ts | 625 | function decrementChatReadCounterIfMsgDidUnread(message: WAMessage) { | CODE |
| LOW | src/Utils/chat-utils.ts | 1032 | function isValidPatchBasedOnMessageRange( | CODE |
| LOW | src/Utils/process-message.ts | 60 | async function storeTcTokensFromHistorySync( | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/WAUSync/USyncQuery.ts | 61 | // TODO: implement errors etc. | COMMENT |
| LOW | src/WAUSync/USyncQuery.ts | 68 | //TODO: implement error backoff, refresh etc. | COMMENT |
| LOW | src/WAUSync/USyncQuery.ts | 100 | //TODO: implement side list | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/workflows/update-version.yml | 67 | # Check if branch exists and delete it | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/Utils/process-message.ts | 341 | // - PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE (response from our phone to our PDO request) | COMMENT |