Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
shai-scan — Zero-dependency CLI scanner for npm/PyPI supply chain compromises. Detects compromised packages in lockfiles and system-level IOCs from attacks like Mini Shai-Hulud (CVE-2026-45321). | Kitploit
Tools/GitHubGitHub/digi4care/shai-scan
Indicator of Compromise (IOC) ManagementStatic AnalysisVulnerability ScannersCode AnalysisDevSecOpsSecret DetectionThreat IntelligenceSupply Chain SecurityIncident Response
GitHubdigi4care/shai-scan

shai-scan

Zero-dependency CLI scanner for npm/PyPI supply chain compromises. Detects compromised packages in lockfiles and system-level IOCs from attacks like Mini Shai-Hulud (CVE-2026-45321).

305 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
View Repository

shai-scan

Zero-dependency CLI scanner for npm and PyPI supply chain compromises.

npm version License: MIT Node.js

Why?

On May 11, 2026, a self-propagating supply chain worm dubbed Mini Shai-Hulud (CVE-2026-45321, GHSA-g7cv-rxg3-hmpx) compromised the npm ecosystem. Attributed to TeamPCP (aka DeadCatx3, PCPcat, ShellForce, CipherForce), the malware hijacked GitHub Actions OIDC tokens to publish malicious packages with valid SLSA Build Level 3 provenance. It stole credentials from CI/CD pipelines, cloud providers, and cryptocurrency wallets, and installed persistence hooks in Claude Code and VS Code. A built-in dead-man switch threatened to wipe the user's home directory if npm tokens were revoked.

Affected packages included TanStack router and start packages, Mistral AI SDKs, OpenSearch client, UiPath tooling, and dozens of others. Because supply chain attacks move fast, organizations need a lightweight, trustworthy scanner they can run anywhere without adding new dependencies to their own attack surface.

Features

  • Lockfile scanning — Detects compromised npm and PyPI packages in package-lock.json, pnpm-lock.yaml, yarn.lock, bun.lock, bun.lockb, poetry.lock, Pipfile.lock, and requirements.txt
  • System IOC checks — Scans running processes, filesystem artifacts, network connections, and known persistence paths for indicators of compromise
  • Zero runtime dependencies — Uses only Node.js/Bun built-ins (fs, path, child_process, os). The scanner does not increase your supply chain risk
  • Multiple output formats — Human-readable text, machine-readable JSON, and SARIF for GitHub Code Scanning
  • CI/CD native — Exit codes designed for automation (0 = clean, 1 = findings, 2 = error)
  • Path-agnostic — Accept any directory; defaults to the current working directory
  • Campaign-based database — New attack waves are added as discrete campaigns in src/db.ts; update the file and rerun

Install

No installation required. Run directly with your package runner of choice:

# npx
npx @digi4care/shai-scan

# bunx
bunx @digi4care/shai-scan

# pnpm dlx
pnpm dlx @digi4care/shai-scan

Global install (optional):

npm install -g @digi4care/shai-scan
# or
pnpm add -g @digi4care/shai-scan

From source:

git clone https://github.com/digi4care/shai-scan.git
cd shai-scan
pnpm install
bun run src/cli.ts --help   # Bun (recommended for development)
# or build and run with Node.js:
pnpm run build && node dist/cli.js --help

Usage

Scan the current project

npx @digi4care/shai-scan

Scan a specific path

npx @digi4care/shai-scan ~/projects/my-app

JSON output for automation

npx @digi4care/shai-scan --json .

SARIF output for GitHub Code Scanning

npx @digi4care/shai-scan --sarif --sarif-file results.sarif .

CI/CD exit codes

#!/bin/bash
npx @digi4care/shai-scan --severity high . || {
  code=$?
  if [ "$code" -eq 1 ]; then
    echo "Supply chain findings detected"
    exit 1
  elif [ "$code" -eq 2 ]; then
    echo "Scanner error"
    exit 2
  fi
}

CI/CD Integration

GitHub Actions (text output)

name: Supply Chain Scan
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
      - run: pnpm install --frozen-lockfile
      - run: npx @digi4care/shai-scan --severity high .

GitHub Actions (SARIF upload)

name: Supply Chain Scan SARIF
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
  schedule:
    - cron: '0 6 * * 1'

jobs:
  scan:
    runs-on: ubuntu-latest
    permissions:
      security-events: write
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
      - run: pnpm install --frozen-lockfile
      - run: npx @digi4care/shai-scan --sarif --sarif-file results.sarif .
      - uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: results.sarif

Output Formats

FormatFlagDescription
Text(default)Human-readable table of findings with severity, package name, version, and campaign details
JSON--jsonStructured JSON array of findings, suitable for ingestion into SIEMs or custom dashboards
SARIF--sarifOASIS SARIF 2.1.0 format for upload to GitHub Code Scanning, GitLab Secure, or other SARIF consumers

Example JSON excerpt:

[
  {
    "package": "@tanstack/react-router",
    "version": "1.169.5",
    "ecosystem": "npm",
    "severity": "critical",
    "campaign": "mini-shai-hulud-wave4",
    "cve": "CVE-2026-45321",
    "reference": "https://github.com/TanStack/router/security/advisories/GHSA-g7cv-rxg3-hmpx"
  }
]

Exit Codes

CodeMeaning
0No compromised packages or IOCs detected
1One or more findings detected
2Runtime error (invalid path, unreadable lockfile, etc.)

Adding New Campaigns

When a new supply chain attack is discovered, update src/db.ts:

  1. Add a new CompromisedVersion[] array with the affected packages and versions
  2. Append a new Campaign object to the CAMPAIGNS array, including CVE/GHSA identifiers, severity, description, reference URLs, and IOC indicators
  3. The buildLookup() function automatically rebuilds the lookup map on the next run

No rebuild step is required when using Bun. Changes to src/db.ts take effect immediately with bun run src/cli.ts. For the npm package, run pnpm run build after editing.

Security Considerations

  • Zero runtime dependencies: The scanner uses only Node.js/Bun built-in modules. It does not download or execute third-party code at runtime, eliminating the risk that the scanner itself becomes a compromise vector.

  • pnpm as package manager: pnpm uses strict lockfiles, does not execute lifecycle scripts by default, and supports content-addressable storage. These properties reduce the attack surface compared to other package managers.

  • Recommended .npmrc settings: For maximum protection when installing packages, add the following to your project or global .npmrc:

    ignore-scripts=true
    engine-strict=true
    
  • No network calls: shai-scan does not phone home, download signatures, or require an API key. All campaign data is shipped with the package.

Affected Packages (Current Campaign)

The following packages and versions are known to be compromised in CVE-2026-45321 (Mini Shai-Hulud Wave 4). This is a representative subset; the full list is maintained in src/db.ts.

Download Tool