
Security News
/Research
Fake Corepack Site Distributes Infostealer and Proxyware to Developers
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.
PostgreSQL environment configuration utilities for managing database connection settings.
npm install pg-env
import { PgConfig, getPgEnvOptions } from 'pg-env';
// Get PostgreSQL config from environment with defaults
const config = getPgEnvOptions();
console.log(config);
// { host: 'localhost', port: 5432, user: 'postgres', ... }
// Override specific values
const customConfig = getPgEnvOptions({
database: 'myapp',
port: 5433
});
import { getPgEnvVars, toPgEnvVars } from 'pg-env';
// Read current PostgreSQL environment variables
const envVars = getPgEnvVars();
// Returns partial PgConfig from PGHOST, PGPORT, etc.
// Convert config to environment variables
const config: PgConfig = {
host: 'db.example.com',
port: 5432,
user: 'appuser',
password: 'secret',
database: 'myapp'
};
const envVars = toPgEnvVars(config);
// { PGHOST: 'db.example.com', PGPORT: '5432', ... }
import { getSpawnEnvWithPg } from 'pg-env';
import { spawn } from 'child_process';
// Create environment for spawning processes
const env = getSpawnEnvWithPg({
database: 'testdb',
user: 'testuser'
});
// Use with child processes
const child = spawn('psql', [], { env });
PgConfiginterface PgConfig {
host: string;
port: number;
user: string;
password: string;
database: string;
}
getPgEnvOptions(overrides?: Partial<PgConfig>): PgConfig - Get config from environment with overridesgetPgEnvVars(): Partial<PgConfig> - Parse PostgreSQL environment variablestoPgEnvVars(config: Partial<PgConfig>): Record<string, string> - Convert config to env varsgetSpawnEnvWithPg(config: Partial<PgConfig>, baseEnv?: NodeJS.ProcessEnv): NodeJS.ProcessEnv - Create spawn environmentdefaultPgConfig: PgConfig - Default PostgreSQL configurationThe package reads the following environment variables:
PGHOST - Database hostPGPORT - Database port (parsed as number)PGUSER - Database userPGPASSWORD - Database passwordPGDATABASE - Database name🚀 Quickstart: Getting Up and Running Get started with modular databases in minutes. Install prerequisites and deploy your first module.
📦 Modular PostgreSQL Development with Database Packages Learn to organize PostgreSQL projects with pgpm workspaces and reusable database modules.
✏️ Authoring Database Changes Master the workflow for adding, organizing, and managing database changes with pgpm.
🧪 End-to-End PostgreSQL Testing with TypeScript Master end-to-end PostgreSQL testing with ephemeral databases, RLS testing, and CI/CD automation.
⚡ Supabase Testing Use TypeScript-first tools to test Supabase projects with realistic RLS, policies, and auth contexts.
💧 Drizzle ORM Testing Run full-stack tests with Drizzle ORM, including database setup, teardown, and RLS enforcement.
🔧 Troubleshooting Common issues and solutions for pgpm, PostgreSQL, and testing.
SET LOCAL) into queries—ideal for setting role, jwt.claims, and other session settings.libpg_query, converting SQL into parse trees.Install skills for AI coding agents:
# All platform skills (security, blueprints, codegen, billing, etc.)
npx skills add constructive-io/constructive-skills
# Individual repo skills (pgpm, testing, CLI, search, etc.)
npx skills add https://github.com/constructive-io/constructive --skill pgpm
npx skills add https://github.com/constructive-io/constructive --skill constructive-testing
🛠 Built by the Constructive team — creators of modular Postgres tooling for secure, composable backends. If you like our work, contribute on GitHub.
AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.
No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.
FAQs
PostgreSQL environment configuration utilities
The npm package pg-env receives a total of 20,306 weekly downloads. As such, pg-env popularity was classified as popular.
We found that pg-env demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Research
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.

Research
/Security News
A large-scale campaign abused GitHub Actions in compromised repositories to exploit CVE-2026-41940 in cPanel and WHM and steal server credentials.

Security News
Five frontier LLMs generated the same nonexistent package names, leaving 53 available for potential slopsquatting across PyPI and npm.