
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
github.com/rhodeon/html-link-parser
A Go library for parsing HTML hyperlink elements into native Go objects.
Useful for creating sitemap generators, web crawlers and web scrapers.
go get -u github.com/rhodeon/html-link-parser
A Link struct represents an HTML hyperlink element:
type Link struct {
Url string // href
Text string // content
}
To parse an HTML reader to a list of Link objects:
html := `<html>
<body>
<h1>Hello!</h1>
<a href="github.com">share repository</a>
<a href="/another-page">A link to yet another page</a>
</body>
</html>
`
links, _ := BuildLinks(strings.NewReader(html))
fmt.Printf("%+v", links)
// Output: [{Url:github.com Text:share repository} {Url:/another-page Text:A link to yet another page}]
To map links to a list of URLs:
urls := links.GetUrls()
fmt.Printf("%#v", urls)
// Output: []string{"github.com", "/another-page"}
To map links to a list of Texts:
texts := links.GetTexts()
fmt.Printf("%#v", texts)
// Output: []string{"share repository", "A link to yet another page"}
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
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.