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/wader/gormstore
For gorm v2 use:
import "github.com/wader/gormstore/v2"
For gorm v1 use:
import "github.com/wader/gormstore"
https://pkg.go.dev/github.com/wader/gormstore?tab=doc
// initialize and setup cleanup
store := gormstore.New(gorm.Open(...), []byte("secret"))
// db cleanup every hour
// close quit channel to stop cleanup
quit := make(chan struct{})
go store.PeriodicCleanup(1*time.Hour, quit)
// in HTTP handler
func handlerFunc(w http.ResponseWriter, r *http.Request) {
session, err := store.Get(r, "session")
session.Values["user_id"] = 123
store.Save(r, w, session)
http.Error(w, "", http.StatusOK)
}
For more details see gormstore documentation.
Just sqlite3 tests:
go test
All databases using docker:
./test
If docker is not local (docker-machine etc):
DOCKER_IP=$(docker-machine ip dev) ./test
gormstore is licensed under the MIT license. See LICENSE for the full license text.
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.