Skip to main content

A CLI tool to detect potential Shai Hulud npm-worm compromises in GitHub users and organizations.

Project description

Shai Hulud Detector

License Python PyPI

A CLI tool to detect potential Shai Hulud npm-worm compromises in GitHub users and organizations.

What is Shai Hulud?

Shai Hulud is a self-replicating npm worm that spreads through compromised developer systems, infecting GitHub repositories and injecting malicious code.
It has already been linked to multiple global supply-chain attacks targeting major npm libraries.

This tool scans for known indicators of compromise (IOCs), including:

  • Suspicious repository descriptions containing
    "Sha1-Hulud: The Second Coming."
  • Presence of suspicious JSON files containing secrets, credentials or environment configuration

Features

  • Scan individual GitHub users
  • Scan all members of a GitHub organization
  • Dual detection methods: repository description patterns and suspicious file detection
  • Concurrent scanning with configurable workers
  • Color-coded output for easy identification (FLAG/OKAY/ERROR status)
  • Detailed verbose mode

Requirements

Installation

Install directly from PyPI:

pip install shai-hulud-detector

Authentication

Set your GitHub token as an environment variable (recommended):

export GITHUB_TOKEN=<GITHUB_TOKEN_HERE>

Or pass it via command-line flag (see Usage section below). If omitted, the tool exits with a clear warning.

Usage

Scan one or more users

shai-hulud-detector scan <USERNAME_HERE>
shai-hulud-detector scan <USERNAME_HERE1> <USERNAME_HERE2> <USERNAME_HERE3>

Scan all members of an organization

shai-hulud-detector scan --org <ORGANIZATION_NAME_HERE>

Authentication via command-line

shai-hulud-detector scan <USERNAME_HERE> --token <GITHUB_TOKEN_HERE>

Help

shai-hulud-detector scan --help 

Parallelism

Set concurrency (default 5):

shai-hulud-detector scan --org <ORGANIZATION_NAME_HERE> --workers 10

Verbose Output

shai-hulud-detector scan <USERNAME_HERE> --verbose

Recommended Actions

If you detect a compromise (FLAG status):

  • Rotate all GitHub, npm, cloud, and CI/CD secrets
  • Enforce MFA on GitHub & npm accounts
  • Check GitHub for repositories with the description "Sha1-Hulud: The Second Coming."
  • Review and remove any suspicious files found (e.g., secrets.json, credentials.json, etc.)
  • Disable npm postinstall scripts in CI where possible
  • Audit all npm dependencies and versions

References

For more detailed information about Shai Hulud attacks, see:

License

MIT License - see LICENSE file for details.

Author

Y. Siva Sai Krishna

Development

For development setup, building, and contributing, see DEVELOPMENT.md.

Changelog

See CHANGELOG.md for a detailed list of changes and version history.

Releases

For information on the release process and how to create new releases, see RELEASE.md.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Issues

If you encounter any issues or have feature requests, please open an issue on GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shai_hulud_detector-1.0.2.tar.gz (34.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shai_hulud_detector-1.0.2-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file shai_hulud_detector-1.0.2.tar.gz.

File metadata

  • Download URL: shai_hulud_detector-1.0.2.tar.gz
  • Upload date:
  • Size: 34.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.12 {"installer":{"name":"uv","version":"0.9.12"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for shai_hulud_detector-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f402ba4b1bda4162d12f8f70e5cb44ad3bd07c21a2076492b9e61ed1aa9a09e4
MD5 b1c6d5ef8e5d4ab0fe574f99319d7617
BLAKE2b-256 b96d24f4925291f51f694a4da4ebd7575e315d9d8291e89b38203e9f0f4873b1

See more details on using hashes here.

File details

Details for the file shai_hulud_detector-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: shai_hulud_detector-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.12 {"installer":{"name":"uv","version":"0.9.12"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for shai_hulud_detector-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 158241687b6de039df9ad7068d1b240324f7a24565c41a7c91f349dbf5c243ae
MD5 2c14eba65dc9067041331f375874c878
BLAKE2b-256 6cc2a177f326d988bd74377a0775220903753ae2b8b55b674e17b4e949803d92

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page