
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
launchpad.net/goforms
The goforms library is a proof-of-concept for a data validation, cleaning and error collecting library for golang, in similar style to Django's django.forms library.
While thinking about writing web application in go, I wanted to be able to encapsulate the data validation and cleaning for http request handlers, so that the handler itself could be thin:
{{{ func my_post_handler(w http.ResponseWriter, r *http.Request){ myForm := MyCustomForm() myForm.SetFormData(r.Form)
if myForm.IsValid(){
// Do something with myForm.CleanedData, which is the request's form
// data after being cleaned to the correct types etc.
} else {
// Re-render a template, passing in egForm.Errors which is a map
// of errors for each field on the form.
}
}}}
As there didn't seem to be anything similar available for golang, I created goforms as a proof-of-concept (see http://goo.gl/pFh6I for golang-nuts post).
Try gorun example.go
to see a real example in action.
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
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.