Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
github.com/lwiles/termite
Termite is a collection of utilities for building CLI tools in Go.
A few things to note:
go get github.com/twelvelabs/termite
package main
import (
"github.com/twelvelabs/termite/api"
"github.com/twelvelabs/termite/conf"
"github.com/twelvelabs/termite/ui"
)
func main() {
type Config struct {
BaseURL string `default:"https://0.0.0.0/api/v1" validate:"required,url"`
Debug bool `default:"true"`
}
// Loads and validates config values from ~/.config/my-app/config.yaml
config, _ := conf.NewLoader(&Config{}, ConfigFile("my-app")).Load()
client := api.NewRESTClient(&api.ClientOptions{
BaseURL: config.BaseURL,
})
type APIResponse struct {
Status string `json:"statusMessage"`
}
u := ui.NewUserInterface(ui.NewIOStreams())
ok, _ := u.Confirm("Proceed?", true, "Some help text...")
if ok {
u.ProgressIndicator.Start("Requesting")
resp := &APIResponse{}
err := client.Get("/some/endpoint", resp)
if err != nil {
u.Out(u.FailureIcon() + " API failure: %v\n", err)
} else {
u.Out(u.InfoIcon() + " API success: %v\n", resp.Status)
}
u.ProgressIndicator.Stop()
}
u.Out(u.SuccessIcon() + " Done\n")
}
Output:
? Proceed? Yes
• API success: some status message
✓ Done
git clone git@github.com:twelvelabs/termite.git
cd termite
make setup
make build
make test
# Show full usage
make
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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.