mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Update readme.md
This commit is contained in:
parent
2d87e1b817
commit
c4a33ca151
1 changed files with 60 additions and 36 deletions
96
README.md
96
README.md
|
|
@ -24,29 +24,43 @@ Aikido Safe Chain works on Node.js version 16 and above and supports the followi
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Installing the Aikido Safe Chain is easy. You just need 3 simple steps:
|
Installing the Aikido Safe Chain is easy with our one-line installer:
|
||||||
|
|
||||||
1. **Install the Aikido Safe Chain package globally** using npm:
|
### Unix/Linux/macOS
|
||||||
```shell
|
|
||||||
npm install -g @aikidosec/safe-chain
|
|
||||||
```
|
|
||||||
2. **Setup the shell integration** by running:
|
|
||||||
|
|
||||||
```shell
|
**Default installation (JavaScript packages only):**
|
||||||
safe-chain setup
|
|
||||||
```
|
|
||||||
|
|
||||||
To enable Python (pip/pip3/uv) support (beta), use the `--include-python` flag:
|
```shell
|
||||||
|
curl -fsSL https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh
|
||||||
|
```
|
||||||
|
|
||||||
```shell
|
**Include Python support (pip/pip3/uv):**
|
||||||
safe-chain setup --include-python
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **❗Restart your terminal** to start using the Aikido Safe Chain.
|
```shell
|
||||||
|
curl -fsSL https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh -s -- --include-python
|
||||||
|
```
|
||||||
|
|
||||||
|
### Windows (PowerShell)
|
||||||
|
|
||||||
|
**Default installation (JavaScript packages only):**
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
iex (iwr "https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.ps1" -UseBasicParsing)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Include Python support (pip/pip3/uv):**
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
iex "& { $(iwr 'https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.ps1' -UseBasicParsing) } -includepython"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Verify the installation
|
||||||
|
|
||||||
|
1. **❗Restart your terminal** to start using the Aikido Safe Chain.
|
||||||
|
|
||||||
- This step is crucial as it ensures that the shell aliases for npm, npx, yarn, pnpm, pnpx, bun, bunx, and pip/pip3 are loaded correctly. If you do not restart your terminal, the aliases will not be available.
|
- This step is crucial as it ensures that the shell aliases for npm, npx, yarn, pnpm, pnpx, bun, bunx, and pip/pip3 are loaded correctly. If you do not restart your terminal, the aliases will not be available.
|
||||||
|
|
||||||
4. **Verify the installation** by running one of the following commands:
|
2. **Verify the installation** by running one of the following commands:
|
||||||
|
|
||||||
For JavaScript/Node.js:
|
For JavaScript/Node.js:
|
||||||
|
|
||||||
|
|
@ -54,7 +68,7 @@ Installing the Aikido Safe Chain is easy. You just need 3 simple steps:
|
||||||
npm install safe-chain-test
|
npm install safe-chain-test
|
||||||
```
|
```
|
||||||
|
|
||||||
For Python (beta):
|
For Python (if you enabled Python support):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pip3 install safe-chain-pi-test
|
pip3 install safe-chain-pi-test
|
||||||
|
|
@ -165,21 +179,33 @@ You can protect your CI/CD pipelines from malicious packages by integrating Aiki
|
||||||
|
|
||||||
For optimal protection in CI/CD environments, we recommend using **npm >= 10.4.0** as it provides full dependency tree scanning. Other package managers currently offer limited scanning of install command arguments only.
|
For optimal protection in CI/CD environments, we recommend using **npm >= 10.4.0** as it provides full dependency tree scanning. Other package managers currently offer limited scanning of install command arguments only.
|
||||||
|
|
||||||
## Setup
|
## Installation for CI/CD
|
||||||
|
|
||||||
To use Aikido Safe Chain in CI/CD environments, run the following command after installing the package:
|
Use the `--ci` flag to automatically configure Aikido Safe Chain for CI/CD environments. This sets up executable shims in the PATH instead of shell aliases.
|
||||||
|
|
||||||
|
### Unix/Linux/macOS (GitHub Actions, Azure Pipelines, etc.)
|
||||||
|
|
||||||
|
**JavaScript only:**
|
||||||
```shell
|
```shell
|
||||||
safe-chain setup-ci
|
curl -fsSL https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh -s -- --ci
|
||||||
```
|
```
|
||||||
|
|
||||||
To enable Python (pip/pip3/uv) support (beta) in CI/CD, use the `--include-python` flag:
|
**With Python support:**
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
safe-chain setup-ci --include-python
|
curl -fsSL https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh -s -- --ci --include-python
|
||||||
```
|
```
|
||||||
|
|
||||||
This automatically configures your CI environment to use Aikido Safe Chain for all package manager commands.
|
### Windows (Azure Pipelines, etc.)
|
||||||
|
|
||||||
|
**JavaScript only:**
|
||||||
|
```powershell
|
||||||
|
iex "& { $(iwr 'https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.ps1' -UseBasicParsing) } -ci"
|
||||||
|
```
|
||||||
|
|
||||||
|
**With Python support:**
|
||||||
|
```powershell
|
||||||
|
iex "& { $(iwr 'https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.ps1' -UseBasicParsing) } -ci -includepython"
|
||||||
|
```
|
||||||
|
|
||||||
## Supported Platforms
|
## Supported Platforms
|
||||||
|
|
||||||
|
|
@ -195,16 +221,15 @@ This automatically configures your CI environment to use Aikido Safe Chain for a
|
||||||
node-version: "22"
|
node-version: "22"
|
||||||
cache: "npm"
|
cache: "npm"
|
||||||
|
|
||||||
- name: Setup safe-chain
|
- name: Install safe-chain
|
||||||
run: |
|
run: curl -fsSL https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh -s -- --ci --include-python
|
||||||
npm i -g @aikidosec/safe-chain
|
|
||||||
safe-chain setup-ci
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: npm ci
|
||||||
npm ci
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> **Note:** Remove `--include-python` if you don't need Python (pip/pip3/uv) support.
|
||||||
|
|
||||||
## Azure DevOps Example
|
## Azure DevOps Example
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|
@ -213,14 +238,13 @@ This automatically configures your CI environment to use Aikido Safe Chain for a
|
||||||
versionSpec: "22.x"
|
versionSpec: "22.x"
|
||||||
displayName: "Install Node.js"
|
displayName: "Install Node.js"
|
||||||
|
|
||||||
- script: |
|
- script: curl -fsSL https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh -s -- --ci --include-python
|
||||||
npm i -g @aikidosec/safe-chain
|
displayName: "Install safe-chain"
|
||||||
safe-chain setup-ci
|
|
||||||
displayName: "Install safe chain"
|
|
||||||
|
|
||||||
- script: |
|
- script: npm ci
|
||||||
npm ci
|
displayName: "Install dependencies"
|
||||||
displayName: "npm install and build"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> **Note:** Remove `--include-python` if you don't need Python (pip/pip3/uv) support.
|
||||||
|
|
||||||
After setup, all subsequent package manager commands in your CI pipeline will automatically be protected by Aikido Safe Chain's malware detection.
|
After setup, all subsequent package manager commands in your CI pipeline will automatically be protected by Aikido Safe Chain's malware detection.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue