Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Pure Node.js implementation of PostgreSQL's createdb and dropdb tools.
Only supports connection options and database name at the moment.
npm install --save -g pgtools
createdbjs my_awesome_db --user=admin --password=admin
const { createdb, dropdb } = require("pgtools");
// This can also be a connection string
// (in which case the database part is ignored and replaced with postgres)
const config = {
user: "postgres",
password: "some pass",
port: 5432,
host: "localhost",
};
await createdb(config, "test-db");
await dropdb(config, "test-db");
createdb(config: string | pg.ConnectionConfig, dbname: string): Promise<pg.QueryResult<any>>;
dropdb(config: string | pg.ConnectionConfig, dbname: string): Promise<pg.QueryResult<any>>;
See ./src/index.d.ts for types.
See pg documentation for ConnectionConfig
format.
More usage examples in ./src/test.js.
pgtools
installs two useful binaries:
createdbjs
: which emulates pgtools' createdb
functionality.dropdbjs
: which emulates pgtools' dropdb
functionality.We support all LTS versions from 10 and up. We try to keep up with the latest Node.js version.
FAQs
Pure Node.js implementation of PostgreSQL's createdb and dropdb tools
The npm package pgtools receives a total of 12,269 weekly downloads. As such, pgtools popularity was classified as popular.
We found that pgtools demonstrated a not healthy version release cadence and project activity because the last version was released 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
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.