
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.
@workday/canvas-kit-react-cookie-banner
Advanced tools
Cookie banner component.
yarn add @workday/canvas-kit-react
or
yarn add @workday/canvas-kit-react-cookie-banner
Fixes a cookie banner to the bottom of the web page.
Can be configured with a "Cookie Settings" element and a custom notice.
import CookieBanner from '@workday/canvas-kit-react-cookie-banner'
<CookieBanner
onAccept={this.onAccept}
isClosed={this.state.acceptedCookies}
/>
<CookieBanner
onAccept={this.onAccept}
isClosed={this.state.acceptedCookies}
onClickSettings={this.openSettings}
notice="Custom notice"
/>
<CookieBanner
onAccept={this.onAccept}
isClosed={this.state.acceptedCookies}
onClickSettings={this.openSettings}
notice={`${CookieBanner.DefaultNotice} This is appended.`}
/>
<CookieBanner
onAccept={this.onAccept}
isClosed={this.state.acceptedCookies}
notice={<Component />}
/>
DefaultNotice: stringWe use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we’ll assume that you are willing to receive cookies.
<CookieBanner
onAccept={this.onAccept}
isClosed={this.state.acceptedCookies}
onClickSettings={this.openSettings}
notice={`${CookieBanner.DefaultNotice} This is appended.`}
/>
onAccept: (e: React.MouseEvent<HTMLButtonElement>) => voidCallback executed upon accepting cookies. The function should set
isClosedto true.
isClosed: booleanWhether or not the banner is closed.
Default: false
onClickSettings: (e: React.MouseEvent<HTMLButtonElement>) => voidCallback executed upon clicking the "Cookie Settings" button. Adding this will automatically display the "Cookie Settings" button.
Default: undefined
notice: React.ReactNodeCustom cookie notice text or element to display.
Default: CookieBanner.DefaultNotice
settingsLabel: stringDefault label for cookie settings
Default: 'Cookie Settings'
FAQs
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.