
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@kaliber/safe-url
Advanced tools
Returns a safe url of the given string
Solves potential XSS vulnerabilities when javascript:
is used as a protocol.
yarn add @kaliber/safe-url
This function should be used when you want to navigate a user to a other url especially when you take the value form the url. A use case would be to check a returnUrl.
import { safeUrl } from '@kaliber/safe-url'
const { returnUrl } = req.query // useQueryString()
// Allowed protocols
window.location.href = safeUrl(returnUrl) // returnUrl = 'https://kaliber.net'
// This throws a error
window.location.href = safeUrl(returnUrl) // returnUrl = 'javascript:confirm(document.domain)'
import { safeUrl } from '@kaliber/safe-url'
safeUrl('https://npm.com/', { allowedHostsList: ['kaliber.net'] }) // throws a error
safeUrl('https://kaliber.net/', { allowedHostsList: ['kaliber.net'] }) // returns the given url.
This library is intended for internal use, we provide no support, use at your own risk. It does not import React, but expects it to be provided, which @kaliber/build can handle for you.
This library is not transpiled.
FAQs
Returns a safe url of the given string
The npm package @kaliber/safe-url receives a total of 20 weekly downloads. As such, @kaliber/safe-url popularity was classified as not popular.
We found that @kaliber/safe-url demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
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 uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.