
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@carforyou/header-footer
Advanced tools
npm install @carforyou/header-footer
In your postcss config, add the components paths to the purgecss paths, so this packages classnames don't get stripped:
const { getComponentPaths } = require("@carforyou/header-footer").default
Make sure to import global styles:
@import '@carforyou/components/assets/index.css';
Then, use components as follows
import { Header } from "@carforyou/header-footer"
<Header
language="de"
dealerhubRootUrl="https://dealerhub.carforyou.ch"
listingsRootUrl="https://www.carforyou.ch"
/>
Header-Footer package supports enabling/disabling features via an optional features
prop. To enable specific feature pass { <featureName>: true }
e.g to disable the list for free CTA:
<Header
language="de"
dealerhubRootUrl="https://dealerhub.carforyou.ch"
listingsRootUrl="https://www.carforyou.ch"
features={{
disabledCTA: true
}}
/>
Existing features
Name | Affected component | Effect |
---|---|---|
disabledCTA | Header | disables List for free header CTA |
showLeasingDisclaimer | Footer | shows a disclaimer with leasing information |
showLoanDisclaimer | Footer | shows a disclaimer with loan information |
In some cases there is an additional menu/navigation component (like a sidebar) that needs to be merged with the mobile menu. To achieve that we support mobileMenuElements
prop, which can be used to inject some extra navigation. Usage example:
<Header
language="de"
mobileMenuElements={[
{
tag: "title",
title: "Section Title",
},
{
tag: "item",
title: "Menu Item",
IconComponent: Icon,
onClick: trackingFunction,
url: "http://menu-item.com",
},
]}
/>
npm run build
Whenever you change the json translation files, run
npm run build:translations
You can link your local npm package to integrate it with any local project:
cd carforyou-header-footer-pkg
npm run build
cd carforyou-listings-web
npm link ../carforyou-header-footer-pkg/pkg
If this throws an Invalid hook call
error when integrating with a next.js project, add the following to the webpack config:
config.resolve.alias["react"] = path.resolve(__dirname, "node_modules", "react")
config.resolve.alias["react-dom"] = path.resolve(__dirname, "node_modules", "react-dom")
New versions are released on the ci using semantic-release as soon as you merge into master. Please make sure your merge commit message adheres to the corresponding conventions.
You will need to enable the repository in circle CI ui to be able to build it.
For slack notifications to work you will need to provide the token in circle 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.