New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@lcdp/assert-safe-chain

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lcdp/assert-safe-chain

Assert that safe-chain npm alias is properly configured

latest
Source
npmnpm
Version
1.0.8
Version published
Maintainers
1
Created
Source

assert-safe-chain

Assert that you are using a proxy when installing dependencies At the moment, it works with @aikidosec/safe-chain and sfw proxies

To make sure that the command is run with one of these proxies, add the following to your package.json

{
  "scripts": {
    "preinstall": "pnpm dlx @lcdp/assert-safe-chain@1.0.8"
  }
}

Using pnpm in the example, because it also gives you the minimal release age.

We recommend fixing the version of this package to avoid potential security issues.

How it works

This package exposes a bin that will be called by pnpm dlx, npx, ...

This script builds a tree of the system processes, so when you run pnpm install without a proxy, it will look something like this :

│ Process tree: [ │ 'node ./script/preinstall.mjs', │ 'node ~/.config/nvm/versions/node/v22.18.0/bin/pnpm install', │ '-zsh', │ '/usr/bin/tmux' │ ]

The script then parses each process to figure out if one is using aikido or sfw.

If it does, then the script exits successfully, so does the preinstall, and the installation can continue. If it doesn't, the script exits with an error, and the preinstall fails with a nice message.

Keywords

safe-chain

FAQs

Package last updated on 10 Dec 2025

Did you know?

Socket

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.

Install

Related posts