A query builder for PostgreSQL, MySQL, CockroachDB, SQL Server, SQLite3 and Oracle, designed to be flexible, portable, and fun to use.
This report summarizes scanner evidence for knex/knex, a JavaScript project with 20,343 GitHub stars. SynthScan examined 122,779 lines of code across 477 source files, recording 412 pattern matches distributed across 7 syntactic categories. The legacy adjusted pattern signal is 3.8 (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? 34 finding(s).
Are imports declared and package/API names verified? 367 finding(s).
Are wrappers, guards, and repeated structures necessary? 26 finding(s).
Which changes need focused human review? 412 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 412 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 | test/integration2/schema/misc.spec.js | 882 | table.text('paragraph').defaultTo('Lorem ipsum Qui quis qui in.'); | CODE |
| LOW⚡ | test/integration2/schema/misc.spec.js | 895 | 'create table "test_table_three" ("main" integer not null, "paragraph" text default \'Lorem ipsum Qui | CODE |
| LOW⚡ | test/integration2/schema/misc.spec.js | 899 | 'create table "test_table_three" ("main" integer not null, "paragraph" varchar(max) default \'Lorem ipsu | CODE |
| LOW⚡ | test/integration2/schema/misc.spec.js | 903 | "create table `test_table_three` (`main` integer not null, `paragraph` text default 'Lorem ipsum Qui qui | CODE |
| LOW⚡ | test/integration2/schema/misc.spec.js | 906 | 'create table "test_table_three" ("main" integer not null, "paragraph" clob default \'Lorem ipsum Qui qu | CODE |
| LOW⚡ | test/integration2/schema/misc.spec.js | 910 | "CREATE TABLE [test_table_three] ([main] int not null, [paragraph] nvarchar(max) CONSTRAINT [test_table_ | CODE |
| LOW | test/integration2/schema/misc.spec.js | 925 | expect(result.paragraph).to.eql('Lorem ipsum Qui quis qui in.'); | CODE |
| LOW | test/integration2/query/misc/additional.spec.js | 363 | .insert({ balance_foo: 123, email_foo: 'foo@bar.com' }) | CODE |
| LOW | test/integration2/query/misc/additional.spec.js | 366 | expect(res).to.eql([{ balance_foo: 123, email_foo: 'foo@bar.com' }]); | CODE |
| LOW⚡ | test/integration2/query/insert/inserts.spec.js | 1044 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum sunt | CODE |
| LOW⚡ | test/integration2/query/insert/inserts.spec.js | 1054 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum sunt | CODE |
| LOW⚡ | test/integration2/query/insert/inserts.spec.js | 1061 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum | CODE |
| LOW⚡ | test/integration2/query/insert/inserts.spec.js | 1070 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum sunt | CODE |
| LOW⚡ | test/integration2/query/insert/inserts.spec.js | 1080 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum sunt | CODE |
| LOW⚡ | test/integration2/query/insert/inserts.spec.js | 1087 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum | CODE |
| LOW⚡ | test/integration2/query/insert/inserts.spec.js | 1096 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum sunt | CODE |
| LOW⚡ | test/integration2/query/insert/inserts.spec.js | 1109 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum | CODE |
| LOW⚡ | test/integration2/query/insert/inserts.spec.js | 1118 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum sunt | CODE |
| LOW⚡ | test/integration2/query/insert/inserts.spec.js | 1125 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum | CODE |
| LOW⚡ | test/integration2/query/insert/inserts.spec.js | 1162 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum sunt | CODE |
| LOW⚡ | test/integration2/query/insert/inserts.spec.js | 1170 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum | CODE |
| LOW⚡ | test/integration2/query/insert/inserts.spec.js | 1180 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum sunt | CODE |
| LOW⚡ | test/integration2/query/insert/inserts.spec.js | 1191 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum | CODE |
| LOW⚡ | test/integration2/query/insert/inserts.spec.js | 1201 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum sunt | CODE |
| LOW⚡ | test/integration2/query/insert/inserts.spec.js | 1209 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 72 | about: 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 83 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 97 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 111 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 125 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 139 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 156 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 222 | about: 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 230 | about: 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 243 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 250 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 264 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 271 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 285 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 292 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 306 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 313 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 327 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 337 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 354 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 361 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 381 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum su | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 387 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum su | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 404 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum sunt | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 410 | 'Lorem ipsum Minim nostrud Excepteur consectetur enim ut qui sint in veniam in nulla anim do cillum sunt | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 439 | about: 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 446 | about: 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 461 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 468 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 482 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 489 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 503 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 510 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 524 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| LOW | test/integration2/query/insert/inserts.spec.js | 531 | 'Lorem ipsum Dolore labore incididunt enim.', | CODE |
| 297 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | test/integration2/dialects/sqlite.spec.js | 50 | ).to.eventually.be.fulfilled.and.deep.equal([{ 1: 1 }]); | CODE |
| CRITICAL | test/integration2/dialects/sqlite.spec.js | 65 | ).to.eventually.be.fulfilled.and.deep.equal([ | CODE |
| CRITICAL | test/integration2/dialects/sqlite.spec.js | 259 | ).to.eventually.be.fulfilled.and.deep.equal([{ 1: 1 }]); | CODE |
| CRITICAL | test/integration2/query/misc/additional.spec.js | 1240 | await expect(promise).to.eventually.be.rejected.and.to.deep.include( | CODE |
| CRITICAL | test/integration2/query/misc/additional.spec.js | 1329 | ).to.be.eventually.rejected.and.deep.include({ | CODE |
| CRITICAL | test/integration2/query/misc/additional.spec.js | 1351 | ).to.be.eventually.rejected.and.deep.include({ | CODE |
| CRITICAL | test/integration2/query/select/selects.spec.js | 268 | ).to.eventually.be.fulfilled.and.to.have.lengthOf(2); | CODE |
| CRITICAL | test/integration2/query/select/selects.spec.js | 271 | ).to.eventually.be.rejected.and.to.deep.include( | CODE |
| CRITICAL | test/cli/migrate-disable-transactions.spec.js | 57 | ).to.eventually.be.fulfilled.and.deep.equal([{ id: 1 }]); | CODE |
| CRITICAL | test/cli/migrate-disable-transactions.spec.js | 106 | ).to.eventually.be.fulfilled.and.deep.equal([{ id: 1 }]); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | test/integration2/pool/connection-pool.spec.js | 18 | // ── PostgreSQL with native pg.Pool ────────────────────────────── | COMMENT |
| MEDIUM | test/integration2/pool/connection-pool.spec.js | 117 | // ── PostgreSQL with shared KnexPool ───────────────────────────── | COMMENT |
| MEDIUM | test/integration2/pool/connection-pool.spec.js | 191 | // ── MySQL with native pool ────────────────────────────────────── | COMMENT |
| MEDIUM | test/integration2/pool/connection-pool.spec.js | 263 | // ── MySQL2 with native pool ───────────────────────────────────── | COMMENT |
| MEDIUM | test/unit/client/connection-pool.js | 26 | // ── Config validation ────────────────────────────────────────────── | COMMENT |
| MEDIUM | test/unit/client/connection-pool.js | 63 | // ── KnexPool class ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | test/unit/client/connection-pool.js | 75 | // ── isTarnPool detection ────────────────────────────────────────── | COMMENT |
| MEDIUM | test/unit/client/connection-pool.js | 121 | // ── Base Client ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM | test/unit/client/connection-pool.js | 170 | // ── Destroy behavior ────────────────────────────────────────────── | COMMENT |
| MEDIUM | test/unit/client/connection-pool.js | 209 | // ── PostgreSQL adapter ──────────────────────────────────────────── | COMMENT |
| MEDIUM | test/unit/client/connection-pool.js | 283 | // ── MySQL adapter ───────────────────────────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | types/result.d.ts | 1 | // This empty interface serves as a placeholder which userland code can augment to | COMMENT |
| LOW | types/result.d.ts | 21 | // But the effective defaults are documented below: | COMMENT |
| LOW | types/tables.d.ts | 1 | // Placeholder interface for Table -> Record mapping | COMMENT |
| LOW | types/index.d.ts | 101 | // The base of selection. In intermediate stages this may be unknown. | COMMENT |
| LOW | types/index.d.ts | 2141 | } | COMMENT |
| LOW | test/integration2/migrate/migration-integration.spec.js | 341 | } | COMMENT |
| LOW | test/tape/pool.js | 141 | Array.from(Array(30)).map(() => { | COMMENT |
| LOW | test-tsd/types.test-d.ts | 41 | const knexInstance = knexDefault(clientConfig); | COMMENT |
| LOW | docs/src/guide/index.md | 741 | // So, this is like specifying | COMMENT |
| LOW | docs/src/guide/index.md | 761 | // when specifying separate update interface, user will be | COMMENT |
| LOW | scripts/build-for-release.sh | 1 | #!/bin/bash -e | COMMENT |
| LOW | scripts/revert-release-to-draft.sh | 1 | #!/bin/bash | COMMENT |
| LOW | .github/workflows/release.yml | 261 | # bytes attested are exactly the bytes uploaded. provenance binds | COMMENT |
| LOW | .github/workflows/release-drafter.yml | 81 | fi | COMMENT |
| LOW | lib/knex-builder/make-knex.js | 241 | // Allow chaining methods from the root object, before | COMMENT |
| LOW | lib/query/querycompiler.js | 81 | // For example, if a "having" clause is defined but we're executing a "delete" query, that | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/unit/knex.js | 411 | before(function skipSuiteIfSqliteConfigAbsent() { | CODE |
| LOW | test/unit/knex.js | 685 | before(function skipSuiteIfSqliteConfigAbsent() { | CODE |
| LOW | test/util/tableCreatorHelper.js | 88 | async function createParentAndChildTables(knex) { | CODE |
| LOW | test/integration/connection-config-provider.js | 87 | async function runTwoConcurrentTransactions(expectedInvocationCount) { | CODE |
| LOW | test/integration/execution/transaction.js | 478 | function expectQueryEventToHaveBeenTriggered() { | CODE |
| LOW | test/integration/execution/transaction.js | 598 | function captureAndRethrowOriginalError(err) { | CODE |
| LOW | bin/utils/cli-config-utils.js | 107 | function checkConfigurationOptions(env, opts) { | CODE |
| LOW | docs/.vitepress/knexDialects.ts | 342 | function renderMissingSnippetGroup( | CODE |
| LOW | docs/scripts/snippet-utils.d.ts | 11 | export function instrumentMarkedStatements( | CODE |
| LOW | lib/builder-interface-augmenter.js | 7 | function augmentWithBuilderInterface(Target) { | CODE |
| LOW | lib/util/helpers.js | 78 | function resolveClientNameWithAliases(clientName) { | CODE |
| LOW | lib/execution/internal/ensure-connection-callback.js | 16 | function ensureConnectionStreamCallback(runner, params) { | CODE |
| LOW | lib/dialects/oracle/schema/internal/incrementUtils.js | 4 | function createAutoIncrementTriggerAndSequence(columnCompiler) { | CODE |
| LOW | lib/dialects/sqlite3/schema/internal/compiler.js | 120 | function referencesColumnConstraint(ast, wrap) { | CODE |
| LOW | lib/dialects/sqlite3/schema/internal/parser.js | 244 | function referencesColumnConstraint(ctx) { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/.vitepress/theme/AlgoliaSearchBox.vue | 129 | // behavior to leverage the Router loading feature | COMMENT |
| MEDIUM | lib/knex-builder/make-knex.js | 14 | // into it. In other words: you can't leverage Prototype Inheritance | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/src/guide/migrations.md | 187 | // TODO: implement me | COMMENT |