A toolkit for detecting indicators of compromise from the Shai-Hulud and Mini Shai-Hulud npm and PyPI supply-chain attacks, including the fake-Bun-runtime wave. Scans projects checked out on disk, and audits GitHub repositories over the API without cloning anything.
router_init.js, tanstack_runner.js,
setup_bun.js and bun_environment.js, matched by filename
and by SHA-256 against the known-bad digest set.
shai-hulud-workflow.yml, formatter_<digits>.yml,
and any workflow that exfiltrates repository secrets.
package.json manifests and lockfiles.
preinstall and prepare hooks, plus GitHub orphan-commit
dependency references.
data.json artifacts.
# local: scan projects on disk ./detector.sh /path/to/project ./detector.sh --paranoid /path/to/project # + typosquatting heuristics ./detector.sh --bulk ~/dev ~/work # every project under these dirs # remote: audit GitHub over the API, nothing cloned python scan.py --self # yours, including private python scan.py org:my-company python scan.py --all-orgs --self # everything you can reach
The remote scanners are repository-agnostic. You point them at any organization or user on the command line, and nothing is hard-coded. Findings are written as JSON with a severity, category, detail, and file path per hit.
The remote scan performs only GET requests. No repository, branch, file, or setting is ever created, modified, or deleted. For each repository it enumerates branches, walks the full default-branch git tree, fetches and inspects every manifest, lockfile and Actions workflow, and hashes flagged payload files against the known-malicious digest set.
Authentication uses your own GitHub token, from the GitHub CLI or the
GITHUB_TOKEN environment variable. Locke Werks operates no service in
this path and receives no findings. Output files are written next to the script and
are gitignored, because they may contain target-specific findings.
Authorized use only. Run these tools only against repositories and systems you own or are explicitly authorized to assess. This is defensive tooling for incident response and supply-chain hygiene.
detector.sh and the compromised-package dataset are vendored from
shai-hulud-detect
by Cobenian, under the MIT License. The GitHub API scanners are original work.
Indicator data is drawn from StepSecurity, Wiz.io, Socket.dev, Semgrep, and JFrog
security advisories.