
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
react-footgun
Advanced tools
The `useFootGun()` hook is designed for testing purposes to simulate a scenario where an asynchronous task gradually increases in complexity, potentially impacting the performance of a React application. It is important to note that deliberately causing p
useFootGun() Hook DocumentationThe useFootGun() hook is designed for testing purposes to simulate a scenario where an asynchronous task gradually increases in complexity, potentially impacting the performance of a React application. It is important to note that deliberately causing poor performance is not a standard practice and should be used cautiously for testing purposes only.
Import the Hook
import useFootGun from 'react-footgun';
Use the Hook
function App() {
const iterations = useFootGun();
// Use the 'iterations' value as needed
}
The useFootGun() hook performs the following actions:
iterations using the useState hook, starting with an initial value of 1.useEffect hook:
iterations value changes.useEffect hook:
iterations value by 1000 every second.useEffect hook:
running flag to control the while loop.runLoop() that runs a while loop with a delay of 1 second between iterations.heavyTask() function (simulated heavy computation) inside the loop.running flag to false when the component unmounts, stopping the loop.The provided code is an example for testing purposes only. It is not recommended to intentionally degrade performance in a production environment.
FAQs
The `useFootGun()` hook is designed for testing purposes to simulate a scenario where an asynchronous task gradually increases in complexity, potentially impacting the performance of a React application. It is important to note that deliberately causing p
We found that react-footgun 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.