Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
@layerzerolabs/evm-sdks-build
Advanced tools
The EVM SDKs Build Tools package provides a set of utilities and tools for building and managing EVM-based SDKs. It includes functions for copying files, populating directories, and managing concurrency with semaphores.
To install the EVM SDKs Build Tools package, you can use npm or yarn:
npm install @layerzerolabs/evm-sdks-build
or
yarn add @layerzerolabs/evm-sdks-build
Asynchronously copies files from source packages to a target root directory based on the provided directory structure.
import { copyPackageFiles, PackageFiles } from "@layerzerolabs/evm-sdks-build";
const packageFiles: PackageFiles = {
"@layerzerolabs/package1": ["file1.js", "file2.js"],
"@layerzerolabs/package2": {
dir1: ["file3.js"],
dir2: ["file4.js", "file5.js"],
},
};
const callerRootFile = __filename;
copyPackageFiles(packageFiles, callerRootFile).then(() => {
console.log("Files copied successfully.");
});
Populates the target directory with files from the specified source packages.
import { populate, CopyTargets } from "@layerzerolabs/evm-sdks-build";
const copyTargets: CopyTargets = {
"@layerzerolabs/package1": {
artifacts: ["**/*.json"],
deployments: ["**/*.json"],
},
"@layerzerolabs/package2": {
"artifacts-tron": ["**/*.json"],
"artifacts-zk": ["**/*.json"],
},
};
const callerRootFile = __filename;
populate(copyTargets, callerRootFile).then(() => {
console.log("Directories populated successfully.");
});
Semaphore for controlling access to a resource by multiple processes.
import { Semaphore } from '@layerzerolabs/evm-sdks-build'
const semaphore = new Semaphore(3)
async function task(id: number) {
await semaphore.acquire()
console.log(`Task ${id} acquired semaphore.`)
// Simulate async work
await new Promise((resolve) => setTimeout(resolve, 1000))
console.log(`Task ${id} releasing semaphore.`)
semaphore.release()
}
for (let i = 1 i <= 5 i++) {
task(i)
}
FAQs
Unknown package
The npm package @layerzerolabs/evm-sdks-build receives a total of 555 weekly downloads. As such, @layerzerolabs/evm-sdks-build popularity was classified as not popular.
We found that @layerzerolabs/evm-sdks-build demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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 found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.