
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
github.com/casbin/redis-adapter/v2
Advanced tools
Redis Adapter is the Redis adapter for Casbin. With this library, Casbin can load policy from Redis or save policy to it.
go get github.com/casbin/redis-adapter/v2
package main
import (
"github.com/casbin/casbin/v2"
"github.com/casbin/redis-adapter/v2"
)
func main() {
// Initialize a Redis adapter and use it in a Casbin enforcer:
a := redisadapter.NewAdapter("tcp", "127.0.0.1:6379") // Your Redis network and address.
// Use the following if Redis has password like "123"
//a := redisadapter.NewAdapterWithPassword("tcp", "127.0.0.1:6379", "123")
// Use the following if you use Redis with a specific user
// a := NewAdapterWithUser("tcp", "127.0.0.1:6379", "testaccount", "userpass")
e := casbin.NewEnforcer("examples/rbac_model.conf", a)
// Load the policy from DB.
e.LoadPolicy()
// Check the permission.
e.Enforce("alice", "data1", "read")
// Modify the policy.
// e.AddPolicy(...)
// e.RemovePolicy(...)
// Save the policy back to DB.
e.SavePolicy()
}
This project is under Apache 2.0 License. See the LICENSE file 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
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.