
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.
rex is a minimalistic but robust HTTP router built on Go 1.22’s enhanced http.ServeMux. It offers a range of features for rapid web application development, including:
rex.FormScanner interface.validator package.r.SPA to serve a single-page application.slog package.rex.Handler.r.Static to serve static files from a directory or r.StaticFS to serve files from a http.FileSystem.
Both of these method can serve the minified version of the files if present and rex.ServeMinifiedAssetsIfPresent is set to true. You can also easily convert standard HTTP handlers to
rexhandlers:
rex.WrapHandler to wrap a http.Handler.rex.WrapFunc to wrap a http.HandlerFunc.rex.FormError from r.BodyParser and validator.ValidationErrors if there is a validation error.go get -u github.com/abiiranathan/rex
FormScannerThis example shows how to implement a custom type that satisfies the FormScanner interface.
type Date time.Time // Date in format YYYY-MM-DD
// FormScan implements the FormScanner interface.
func (d *Date) FormScan(value any) error {
v, ok := value.(string)
if !ok {
return fmt.Errorf("date value is not a string")
}
t, err := time.Parse("2006-01-02", v)
if err != nil {
return fmt.Errorf("invalid date format")
}
*d = Date(t)
return nil
}
For a complete example of template rendering and router usage, see the example in cmd/server/main.go.
rex includes a few external libraries, used only in the middleware subpackage. Explore the middleware package for more details and usage examples.
Run all tests with the following command:
go test -v ./...
Run benchmarks with memory profiling enabled:
go test -bench=. ./... -benchmem
Pull requests are welcome! For major changes, please open an issue to discuss your ideas first.
Don’t forget to update tests as needed.
This project is licensed under the MIT License.
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.