scanrepo
v0.2.0
Published
Scan any GitHub or Bitbucket repo for malware, credential stealers, and crypto scams
Maintainers
Readme
scanrepo
Scan any GitHub or Bitbucket repo for malware, credential stealers and crypto scams — before you clone it.
npx scanrepo github.com/owner/repoNo install, no signup, no clone. One command, a verdict in seconds.
Why
A "recruiter" sends a take-home assignment. A trending repo promises a trading
bot. Someone just needs you to run it locally real quick. Then npm install
fires a postinstall that reads your browser profiles, SSH keys and wallet
files — or a .vscode/tasks.json runs the moment you open the folder.
This is the check you run first, in the two seconds before you type git clone.
Usage
npx scanrepo github.com/owner/repo # human-readable report
npx scanrepo bitbucket.org/ws/repo --json # raw JSON on stdout
npx scanrepo <url> --token ghp_... # GitHub PAT — full coverage on big repos
npx scanrepo <url> --no-publish # don't save the result to scanrepo.dev
npx scanrepo <url> --no-color # plain output for logsPrefer it on your PATH: npm i -g scanrepo. Requires Node 18+.
Example
Risk Score: 100/100 MALICIOUS
────────────────────────────────────────────────
⚠ Created 3 days ago
ℹ Zero stars, forks, and issues. Common for throwaway scam repositories.
Code Execution █░░░░░░░░░░░░░░░ 2/25
File System Access ███████████░░░░░ 14/20
Obfuscation ████████████████ 15/15
Supply Chain ██░░░░░░░░░░░░░░ 2/15
Top findings:
clipboard-read src/dev/tauri-mock/clipboard-manager.ts
drainer-secret-collection
long-lines src/dev/tauri-mock/fs.ts
high-entropy-strings src/App.tsx
github owner/repo · 102/173 files scanned · master
❌ DO NOT RUNExit codes
Script-friendly — the exit code fails your step for you, no parsing needed.
| Code | Meaning |
| --- | --- |
| 0 | safe / low — nothing matched |
| 1 | suspicious, an inconclusive scan, or a scan error |
| 2 | dangerous / malicious — do not run it |
An inconclusive result means too few of the repo's files could be read to
stand behind a clean verdict. It prints INCONCLUSIVE with the coverage
percentage and exits 1 rather than handing you a green light the scan never
earned.
In CI:
- name: Scan before running third-party code
run: npx scanrepo github.com/${{ github.repository }}What it detects
A static rules engine scores the repo across six categories:
| Category | Examples |
| --- | --- |
| Code execution | eval, Function(), child_process, vm abuse |
| Network exfiltration | fetch-then-eval, hardcoded IPs, suspicious domains |
| Filesystem access | browser profile theft, wallet files, SSH credential reads |
| Obfuscation | base64 payloads, hex blobs, string-decode chains, entropy |
| Supply chain | postinstall scripts, known-malicious dependencies |
| Web vulnerabilities | XSS sinks, open redirects |
On top of the rules: entropy analysis, an import/reachability graph, repo age
and popularity signals, and a curated IoC list of known-malicious repos and
accounts. Scores roll up to 0–100 and a verdict — safe · low ·
suspicious · dangerous · malicious.
Limitations
Read the score as evidence found, not as a safety guarantee.
- Static analysis only. Heavily obfuscated malware can evade pattern
matching.
safemeans no known pattern matched. - Public repos only. Private repos are not supported.
- Rate limits shape coverage. Anonymous GitHub/Bitbucket API limits can cut
a large scan short — pass
--token(or setGITHUB_TOKEN) for full coverage. - Results are published to scanrepo.dev so others
benefit from the scan. Opt out per run with
--no-publish.
Related
- Web app — scanrepo.dev
- MCP server —
scanrepo-mcp, the same scans for your AI agent, before it clones anything - IoC list — rubenmarcus/malicious-repositories
MIT © Ruben Marcus
