
Research
lightning PyPI Package Compromised in Supply Chain Attack
Socket detected a malicious supply chain attack on PyPI package lightning versions 2.6.2 and 2.6.3, which execute credential-stealing malware on import.
gh.neting.cc/clevergo/captchas
Advanced tools
Base64 Captchas Manager, supports multiple drivers and stores.
Preview: https://captcha.clevergo.tech/.
$ cd example
$ go run main.go
$ go get clevergo.tech/captchas \
clevergo.tech/captchas/drivers \
clevergo.tech/captchas/stores/memstore
package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"text/template"
"clevergo.tech/captchas"
"clevergo.tech/captchas/drivers"
"clevergo.tech/captchas/stores/memstore"
)
var (
store = memstore.New() // memory store.
driver = drivers.NewDigit() // digit driver.
manager = captchas.New(store, driver) // manager
tmpl = template.Must(template.New("captcha").Parse(`
<html>
<body>
<form action="/validate" method="POST">
<input name="captcha">
{{ .captcha.HTMLField "captcha_id" }}
<input type="submit" value="Submit">
</form>
</body>
</html>
`))
)
func main() {
http.HandleFunc("/generate", generate)
http.HandleFunc("/validate", validate)
log.Println(http.ListenAndServe(":8080", http.DefaultServeMux))
}
// generates a new captcha
func generate(w http.ResponseWriter, r *http.Request) {
captcha, err := manager.Generate(r.Context())
if err != nil {
http.Error(w, err.Error(), 500)
return
}
// returns JSON data.
if r.URL.Query().Get("format") == "json" {
v := map[string]string{
"captcha_id": captcha.ID(), // captcha ID.
"captcha_data": captcha.EncodeToString(), // base64 encode string.
}
data, _ := json.Marshal(v)
w.Write(data)
return
}
// render captcha via template.
tmpl.Execute(w, map[string]interface{}{
"captcha": captcha,
})
}
// validates a captcha.
func validate(w http.ResponseWriter, r *http.Request) {
captchaID := r.PostFormValue("captcha_id")
captcha := r.PostFormValue("captcha")
// verify
if err := manager.Verify(r.Context(), captchaID, captcha, true); err != nil {
io.WriteString(w, fmt.Sprintf("captcha is invalid: %s", err.Error()))
return
}
io.WriteString(w, "valid")
}
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
Socket detected a malicious supply chain attack on PyPI package lightning versions 2.6.2 and 2.6.3, which execute credential-stealing malware on import.

Research
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.

Research
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.