Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
planetscale-node
Advanced tools
This is the pre-release JavaScript client for connecting to PlanetScale.
$ npm install planetscale-node
This code uses the PlanetScale API to provision a TLS certificate, and then connects to the database. It uses Service Tokens for authentication, so you'll need to create one for the app:
~> pscale service-token create
NAME TOKEN
-------------- ------------------------------------------
nyprhd2z6bd3 [REDACTED]
~> pscale service-token add-access nyprhd2z6bd3 connect_production_branch --database [YOUR DB]
DATABASE ACCESSES
---------- ---------------------------
[YOUR DB] connect_production_branch
Set the following environment variables in your application.
export PLANETSCALE_TOKEN='[REDACTED]'
export PLANETSCALE_TOKEN_NAME='nyprhd2z6bd3'
export PLANETSCALE_ORG='[YOUR ORG]'
export PLANETSCALE_DB='[YOUR DB NAME]'
const { PSDB } = require('planetscale-node')
const conn = new PSDB('main')
async function main() {
const [rows, fields] = await conn.query('select * from reminders')
console.log(rows, fields)
}
main()
const { PSDB } = require('planetscale-node')
const conn = new PSDB('main')
async function main() {
const [rows, fields] = await conn.execute('select * from reminders where id > ?', [10])
console.log(rows, fields)
}
main()
FAQs
PlanetScale Database Client
The npm package planetscale-node receives a total of 187 weekly downloads. As such, planetscale-node popularity was classified as not popular.
We found that planetscale-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.