
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@lanetix/as-user-transaction
Advanced tools
Creates a transaction in the scope of a user.
import { transaction } from '@lanetix/as-user-transaction'
const aUT = transaction({
schema: `records,public` // which schema(s) to query
dbConfig: 'something' // how to get to a DB; defaults to null in most cases
timeout: '42s' // optional parameter to set the statement timeout
shouldRetry: (err) => false // optional function which takes an error and indicates if the transaction should be retried
})
const asUserTransaction = (user, fn) => aUT({ user, writable: false }, fn) // makes it a read only transaction
asUserTransaction.writable = (user, fn) => aUT({ user, writable: true }, fn) // this is a write friendly transaction
export default asUserTransaction
import asUserTransaction from './curried-as-user-transaction'
const user = {} // JWT in JSON form
const myResult = await asUserTransaction(user, (query, settings) => query('SELECT 1'))
console.log(myResult) // { rows: [] } # the PG JSON object
npm i -S @lanetix/as-user-transaction
This package uses debug
, so you can
log debugging things by setting DEBUG=lx-sql
or DEBUG=lx-pg-pool
to enable
logs for the sql being executed and logs for the connection pool, respectively.
FAQs
Creates a transaction in the scope of a user.
The npm package @lanetix/as-user-transaction receives a total of 0 weekly downloads. As such, @lanetix/as-user-transaction popularity was classified as not popular.
We found that @lanetix/as-user-transaction demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 27 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.