Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/jmoiron/modl
Modl is a library which provides database modelling and mapping. It is a fork of James Cooper's wonderful gorp.
Note. Modl's public facing interface is considered unfinished and open to change. The current API will not be broken lightly, but additions are likely. As Gorp's behavior moves on, Modl may adopt some of it or may not.
Modl's goal is to clean up bits of gorp's API, add some additional features like query building helpers and additional control over SQL generation, and to reuse lower level abstractions provided in sqlx. The driving philosophies behind modl are:
database/sql
, do it that waySince modl is a gorp fork, here are some of its major behavioral differences:
sqlx
.sql.Scanner
& driver.Valuer
for custom types.To use the test-all
script, set the following environment variables:
# mysql DSN, note parseTime arg for time scanning support:
MODL_MYSQL_DSN="username:password@/dbname?parseTime=true"
# postgres DSN, like:
MODL_POSTGRES_DSN="user=username password=pw dbname=dbname sslmode=disable"
# sqlite DSN, which is a path
MODL_SQLITE_DSN="/dev/shm/modltest.db"
# optional, will fail the test if any DBs are skipped (for CI, mostly)
MODL_FAIL_ON_SKIP=true
In addition to this, you can create an environ
file in this directory which
will be sourced and ignored by git. You can continue to use the MODL_TEST_DSN
and MODL_TEST_DIALECT
variables if you want to manually run go test
or if
you want to run the benchmarks, as described below.
The original README.md follows:
The API of Modl has been quite stable since its conception. Changes to the API are avoided as much as possible but there is currently no promise of forward or backward compatibility.
Modl relies heavily upon the database/sql
package, and has a
Dialect interface which can be used to smooth over
differences between databases. There is a list of sql drivers
on the Go wiki, most of which Modl should be compatible with. Dialects
are provided for:
The test suite is continuously run against all of these databases.
API Documentation is available on godoc.
Modl performs similar to Gorp. There are benchmarks in modl_test.go
which
will benchmark native querying w/ database/sql
and manual Scanning with what
modl does. Modl should perform between 2-3% slower than hand-done SQL.
The original contributors to gorp are:
FAQs
Unknown package
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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.