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.
react-svg-injector
Advanced tools
A React component that manipulate SVG and injects it using SVGInjector
import React from "react";
import { ReactSvgInjector, Mutate } from "react-svg-injector";
import logo from "./logo.svg";
const Logo = props => (
<ReactSvgInjector src={logo} className="App-logo">
<Mutate selector="g" fill="#BADA55" />
</ReactSvgInjector>
);
export default Logo;
ReactSvgInjector exports 2 React Components ReactSvgInjector
and Mutate
.
name | type | description |
---|---|---|
callback(svg) | function | callback which passes the svg element once it's been loaded |
evalScripts | string | option to tell ReactSvgInjector to eval scripts inside the svg element options are: always , once , never default: once |
* | any | all other props that are passed will be merged into the svg element |
name | type | description |
---|---|---|
selector | string | the selector of the node to modify |
* | any | all other props that are passed will be merged into the element that matches the selector |
FAQs
A React component that manipulate SVG and injects it using SVGInjector
The npm package react-svg-injector receives a total of 4 weekly downloads. As such, react-svg-injector popularity was classified as not popular.
We found that react-svg-injector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
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.