
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@brainfish-ai/web-widget
Advanced tools
This package provides a simple way to integrate a Brainfish in-app widget in your website or web application. It supports the standard style, and slide-in popup.
npm install @branfish-ai/web-widget
<script type="module">
import Brainfish from "https://cdn.jsdelivr.net/npm/@brainfish-ai/web-widget@latest/dist/web.js"
Brainfish.Widgets.init({ widgetKey: "your-key" });
</script>
<button class="brainfish-trigger-button" onClick="Brainfish.HelpWidget.open('brainfish-trigger-button')">Help</button>
<!-- The widget will emit events when it opens and closes. You can listen to these events by adding the following code to your website: -->
<script>
// set up the abort controller
const controller = new AbortController();
// get the signal
const { signal } = controller;
// For close event: (onBrainfishHelpWidgetClosed)
window.addEventListener('onBrainfishHelpWidgetClosed', yourClosedHandlerFunction, { signal });
// For opened event: (onBrainfishHelpWidgetOpened)
window.addEventListener('onBrainfishHelpWidgetOpened', yourOpenedHandlerFunction, { signal });
</script>
<script>
// abort the event listeners when the widget is no longer needed
controller.abort();
</script>
Run the following command to build the widget:
yarn build:web-widget
To test the widget locally, you can use the following command:
cd packages/web-widget
npx serve ./ -p 8000 -C
You can test the widget locally by opening the test page in your browser. You can also pass in the env parameter to test the widget in different environments. (local, staging, prod).
Note that they all point to the same web widget script run from your local server. (not the CDN). This provides a way to test the widget in different environments without having to deploy to the CDN.
open http://localhost:8000/test-pages/index.html?env=local
If you want to test the widget with the React app (react-search-widget), you can start the React app locally: (this will run on port 3006)
cd packages/react-search-widget
yarn dev
FAQs
Brainfish Widgets Manager
The npm package @brainfish-ai/web-widget receives a total of 2,469 weekly downloads. As such, @brainfish-ai/web-widget popularity was classified as popular.
We found that @brainfish-ai/web-widget demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.