Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@pnpm/link-bins
Advanced tools
@pnpm/link-bins is a utility package that helps in linking binaries from node_modules/.bin to a specified directory. This is particularly useful in monorepos or when working with multiple packages that need to share executables.
Linking Binaries
This feature allows you to link all binaries from the node_modules/.bin directory to a specified destination directory. This is useful for making executables available in a consistent location.
const { linkBins } = require('@pnpm/link-bins');
const path = require('path');
const sourceDir = path.join(__dirname, 'node_modules/.bin');
const destDir = path.join(__dirname, 'bin');
linkBins(sourceDir, destDir).then(() => {
console.log('Binaries linked successfully');
}).catch(err => {
console.error('Error linking binaries:', err);
});
symlink-dir is a package that creates symbolic links for directories. While it can be used to link binaries, it is more general-purpose and not specifically designed for linking node_modules/.bin executables.
npm-link is a built-in npm command that allows you to symlink a package folder. It is useful for local development but does not specifically focus on linking binaries from node_modules/.bin.
Link bins to node_modules/.bin
<pnpm|yarn|npm> add @pnpm/link-bins
import linkBins, {linkBinsOfPackages} from '@pnpm/link-bins'
function warn (msg) { console.warn(msg) }
await linkBins('node_modules', 'node_modules/.bin', {warn})
const packages = [{manifest: packageJson, location: pathToPackage}]
await linkBinsOfPackages(packages, 'node_modules/.bin', {warn})
FAQs
Link bins to node_modules/.bin
We found that @pnpm/link-bins 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
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.