Scan your whole stack
Are you using eslint-plugin-postgresql-security?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v3.0.10
eslint-plugin-postgresql-security was last scanned on 29 Nov 2026 at version 3.0.10. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 3.0.10 LATEST | 29 Nov 2026 | No rules fired |
| 3.0.9 | 29 Nov 2026 | No rules fired |
| 3.0.8 | 29 Nov 2026 | No rules fired |
| 3.0.7 | 26 Nov 2026 | Not shown |
| 3.0.6 | 20 Nov 2026 | Not shown |
Findings for v3.0.10. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 3.0.10; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
npm install --save-dev eslint eslint-plugin-postgresql-security
// eslint.config.mjs
import { configs } from 'eslint-plugin-postgresql-security';
export default [configs.recommended];
recommended is the preset to start with. The others are listed under Configuration Presets below.
Using oxlint or Vite+? Install oxlint-plugin-postgresql-security: the same rules under the same postgresql-security/<rule> IDs, without ESLint. Its page has the setup.
This plugin provides Security rules for PostgreSQL interaction in Node.js (SQL injection prevention).
A generic SQL injection linter can flag string concatenation wherever it appears, but it cannot know the parameterization convention for each database client. The pg (node-postgres) driver uses $1, $2, … positional placeholders with a second-argument array — a pattern no generic rule encodes. eslint-plugin-postgresql-security knows this contract: it only fires on .query() calls, it stays silent when a second argument (the values array) is present, and it tracks variable taint across assignment statements so that a split-line pattern like const sql = "SELECT..." + id; client.query(sql) is flagged even though the concatenation and the query call are on separate lines. The result is a rule with near-zero false positives on legitimate parameterized queries and reliable detection on the patterns that actually lead to SQL injection.
That trade costs recall, and we measure it: methodology · results · a false positive is a bug.
| Preset | Description |
|---|---|
recommended |
Recommended preset - balanced security for most projects |
strict |
Strict preset - all rules as errors |
| Library | npm | Downloads | Detection |
|---|---|---|---|
pg (node-postgres) |
SQL Injection, Connection Leaks |
import pg from 'eslint-plugin-postgresql-security';
export default [
{
plugins: { pg },
rules: {
'pg/no-unsafe-query': 'error',
'pg/no-select-all': 'off', // Disable if needed
},
},
];
Every rule produces a structured error message:
src/db.ts
42:15 error 🔒 CWE-89 OWASP:A03-Injection CVSS:9.8 | Unsafe query detected | CRITICAL
Fix: Use parameterized query: client.query('SELECT * FROM users WHERE id = $1', [userId])
| Package | Version |
|---|---|
| ESLint | ^8.40.0 \|\| ^9.0.0 \|\| ^10.0.0 |
| Node.js | >=22.13.0 |
See the ESLint Version Support Policy — current ecosystem share data, the 20% gate, and the forward-looking exception that covers v10.
The library ranges the rules were written against, as previously declared in peerDependencies. They are documentation only: this package installs and requires none of these libraries, and npm no longer warns on a mismatch.
pg: ^6.0.0 || ^7.0.0 || ^8.0.0Legend
| Icon | Description |
|---|---|
| 💼 | Recommended: Included in the recommended preset. |
| ⚠️ | Warns: Set to warn in recommended preset. |
| 🔧 | Auto-fixable: Automatically fixable by the --fix CLI option. |
| 💡 | Suggestions: Providing code suggestions in IDE. |
| 🚫 | Deprecated: This rule is deprecated. |
| 🟢 | Type-unaware: AST-only, runs in oxlint JS-plugin tier. |
| 🟡 | Type-aware (refining): pure-AST primary path; types refine precision. |
| 🟠 | Type-aware (graceful): requires TS program; silent without it. |
| Rule | CWE | OWASP | CVSS | Description | 🧠 | 💼 | ⚠️ | 🔧 | 💡 | 🚫 |
|---|---|---|---|---|---|---|---|---|---|---|
| check-query-params | CWE-89 | Ensures the number of placeholders in SQL queries matches the provided parameters. | 🟢 | ⚠️ | ||||||
| no-batch-insert-loop | CWE-400 | Prevents INSERT/UPDATE/DELETE queries inside loops (N+1 query anti-pattern). | 🟢 | ⚠️ | ||||||
| no-floating-query | CWE-252 | Ensures query promises are awaited or handled. | 🟢 | ⚠️ | ||||||
| no-hardcoded-credentials | CWE-798 | Prevents hardcoded passwords and connection strings in PostgreSQL client initialization. | 🟢 | 💼 | ||||||
| no-insecure-ssl | CWE-295 | Prevents disabling SSL certificate validation in PostgreSQL connections. | 🟢 | 💼 | ||||||
| no-missing-client-release | CWE-772 | Ensures acquired pool clients are released back to the pool. | 🟢 | 💼 | ||||||
| no-select-all | CWE-1049 | Discourages SELECT in favor of explicit column lists. | 🟢 | ⚠️ | ||||||
| no-transaction-on-pool | CWE-362 | Prevents running transaction commands directly on pool (must use dedicated client). | 🟢 | 💼 | ||||||
| no-unsafe-copy-from | CWE-73 | A03:2021 | Prevents COPY FROM with file paths (should use STDIN for safe client-side data loading). | 🟢 | 💼 | |||||
| no-unsafe-query | CWE-89 | SQL injection is one of the most critical security vulnerabilities | 🟢 | 💼 | ||||||
| no-unsafe-search-path | CWE-426 | Prevents dynamic SET searchpath queries that could enable schema hijacking. | 🟢 | 💼 | ||||||
| prefer-pool-query | CWE-400 | Suggests using pool.query() for single-shot queries instead of manual connect/release. | 🟢 | ⚠️ | ||||||
| prevent-double-release | CWE-415 | Prevents calling client.release() multiple times on the same client. | 🟢 | ⚠️ |
Part of the Interlace ESLint ecosystem — AI-native rules with LLM-optimized error messages:
Security
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.