Go PostgreSQL driver for database/sql
This report summarizes scanner evidence for lib/pq, a Go project with 9,974 GitHub stars. SynthScan examined 19,446 lines of code across 82 source files, recording 32 pattern matches distributed across 2 syntactic categories. The legacy adjusted pattern signal is 1.7 (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-11-16.
Can maintainers explain intent, assumptions, and trade-offs? 32 finding(s).
Are imports declared and package/API names verified? 0 finding(s).
Are wrappers, guards, and repeated structures necessary? 0 finding(s).
Which changes need focused human review? 32 finding(s).
Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.
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 32 distinct pattern matches across 2 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 | encode.go | 241 | // TODO(v2): it uses UTC, which it shouldn't. But I'm afraid changing it now | COMMENT |
| LOW | encode.go | 261 | // cause error "sql: Scan error on column index 0: unsupported driver -> Scan | COMMENT |
| LOW | error.go | 21 | // | COMMENT |
| LOW | error.go | 41 | // Primary human-readable error message. This should be accurate but terse | COMMENT |
| LOW | error.go | 61 | // one submitted by the client. The InternalQuery field will always appear | COMMENT |
| LOW | error.go | 81 | Table string | COMMENT |
| LOW | notify.go | 461 | lock sync.Mutex | COMMENT |
| LOW | notify.go | 501 | go l.listenerMain() | COMMENT |
| LOW | deprecated.go | 81 | return "" | COMMENT |
| LOW | quote.go | 1 | package pq | COMMENT |
| LOW | quote.go | 41 | // to DDL and other statements that do not accept parameters) to be used as part | COMMENT |
| LOW | notice.go | 41 | } | COMMENT |
| LOW | connector.go | 281 | // is set. An empty item selects the default of localhost. The | COMMENT |
| LOW | connector.go | 301 | // authentication method requires it, in which case it will be used as the | COMMENT |
| LOW | connector.go | 341 | // Used if application_name is not given. Specifying a fallback name is | COMMENT |
| LOW | connector.go | 361 | // Path to secret key for sslcert. The file must contain PEM encoded data. | COMMENT |
| LOW | connector.go | 381 | // Minimum SSL/TLS protocol version to allow for the connection. | COMMENT |
| LOW | connector.go | 441 | // tried. This parameter is typically used in combination with multiple host | COMMENT |
| LOW | connector.go | 461 | // The service file is a INI-like file to configure connection parameters: | COMMENT |
| LOW | connector.go | 481 | // *not* attempt the listed method, and the server is free not to | COMMENT |
| LOW | connector.go | 501 | // The default minimum may be raised to 4096 in a future release, which is | COMMENT |
| LOW | connector.go | 541 | // string. This is different from libpq, which uses the "options" parameter for | COMMENT |
| LOW | connector.go | 561 | // (correctly) reject %2F in the host part. This means that unix-socket URLs: | COMMENT |
| LOW | krb.go | 1 | package pq | COMMENT |
| LOW | conn_test.go | 1441 | t.Fatal(err) | COMMENT |
| LOW | internal/pqtest/ztest.go | 101 | // | COMMENT |
| LOW | .github/workflows/test.yml | 101 | # steps: | COMMENT |
| LOW | .github/workflows/test.yml | 121 | # echo PGPORT=6432 'PQTEST_BINARY_PARAMETERS=yes go test -race ./...' | COMMENT |
| LOW | .github/workflows/test.yml | 141 | # docker compose logs | COMMENT |
| LOW | .github/workflows/test.yml | 161 | # matrix: | COMMENT |
| LOW | .github/workflows/test.yml | 181 | # go-version: ${{ matrix.go }} | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | testdata/cockroach/10-init.sql | 18 | # cockroach doesnt support md5, just use scram-sha-256 for it (PostgreSQL also | COMMENT |