
Detects GlassWorm supply chain attack payloads by scanning VS Code extensions, npm/PyPI packages, and git repos for invisible Unicode payloads, decoder patterns, C2 markers, and known malicious IOCs.

Detect GlassWorm supply chain attack payloads on your machine. Scans VS Code extensions, npm packages, Python packages, and git repositories.
This scanner detects the attack technique itself - invisible Unicode variation selector payloads, GlassWorm decoder patterns, C2 indicators, and credential harvesting code.
pip install glassworm-hunter
Or with pipx:
pipx install glassworm-hunter
Scan your current directory without scanning VS Code/Cursor extensions:
glassworm-hunter scan --no-extensions
Scan a specific project:
glassworm-hunter scan /path/to/project
| Level | Meaning |
|---|---|
| CRITICAL |
glassworm-hunter scan [OPTIONS] [PATHS...]
A Rich progress bar is shown on stderr during scanning. It is automatically suppressed with --quiet or --verbose. A summary line (files scanned, findings, output path) is always printed to stderr after the scan completes.
# List all detection rule IDs (for use with --disable-rule)
glassworm-hunter rules
# Update local IoC database from GitHub (default source:
# https://raw.githubusercontent.com/afine-com/glassworm-hunter/main/data/ioc.json)
glassworm-hunter update
# Update from a custom source (e.g. internal threat intelligence server)
glassworm-hunter update --source https://internal.corp/ioc.json
# Force overwrite existing local IoC database
glassworm-hunter update --force
# Print version
glassworm-hunter version
| Code | Meaning |
|---|---|
| 0 | No findings |
| 1 | Findings detected |
| 2 | Scanner error |
JSON output for automated processing:
glassworm-hunter scan . --format json --output report.json --no-extensions
SARIF for GitHub Code Scanning:
glassworm-hunter scan . --format sarif --output results.sarif --no-extensions
Upload SARIF to GitHub:
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
Use exit codes in CI:
glassworm-hunter scan . --severity critical --no-extensions || exit 1
Exclude build artifacts and vendor code:
glassworm-hunter scan . --exclude "dist/**" --exclude "*.min.js" --no-extensions
This scanner is fully offline by default. It reads local files only. No telemetry, no phone-home, no automatic update checks. IoC databases are bundled in the package.
The only command that makes a network request is glassworm-hunter update, which fetches the latest IoC database from GitHub (or a custom --source URL). It is never called automatically.
Place a .glassworm.yml in your project root to set defaults:
exclude:
- "*.min.js"
- "vendor/**"
- "dist/**"
disable_rules:
- zero-width-chars
severity: medium
CLI flags override config file values.
Use --ioc-file to load additional indicators from a JSON file. This is useful for team-specific or internal threat intelligence:
glassworm-hunter scan /path --ioc-file /path/to/team_ioc.json
The file must follow the same schema as data/ioc.json:
{
"schema_version": "1.0",
"extensions": [{"id": "publisher.name"}],
"npm_packages": [{"name": "pkg", "malicious_versions": "1.0.0"}],
"c2_ips": [{"ip": "1.2.3.4"}],
"c2_wallets": [{"address": "..."}],
"attacker_artifacts": [{"type": "email", "value": "[email protected]"}]
}
The custom file is merged on top of all other IoC layers (hardcoded → bundled → user ~/.glassworm/ioc.json → --ioc-file).
The scanner uses a 3+1 layer IoC system (each layer merges on top of the previous, never removes):
data/ioc.json shipped with the package~/.glassworm/ioc.json, updated via glassworm-hunter update--ioc-file flag, highest priorityThe scanner works on Windows. 4 tests fail unless you run an elevated (Administrator) command prompt.
MIT
| Active GlassWorm payload detected (invisible Unicode cluster in code, decoder pattern) |
| HIGH | Known malicious IOC matched (C2 IP, wallet, extension dependency on known malware) |
| MEDIUM | Suspicious pattern worth reviewing (eval + dynamic content, credential access, Trojan Source) |
| LOW | Informational (unusual zero-width character density, suspicious install scripts) |
| Option | Default | Description |
|---|
--extensions / --no-extensions | on | Scan VS Code/Cursor/Codium extensions |
--npm-scan / --no-npm-scan | on | Scan node_modules |
--pip-scan / --no-pip-scan | off | Scan Python site-packages |
--git / --no-git | on | Scan git repositories |
--format [console|json|sarif] | console | Output format |
--output FILE | stdout | Write report to file |
--severity [critical|high|medium|low] | low | Minimum severity to report |
--max-file-size SIZE | 10MB | Skip files larger than this |
--include-hidden | off | Scan hidden files/directories |
--quiet | off | Suppress progress output |
--verbose | off | Show every file being scanned |
--exclude PATTERN | — | Glob patterns to exclude (repeatable) |
--disable-rule RULE_ID | — | Suppress specific detection rules (repeatable) |
--ioc-file FILE | — | Load additional IoC indicators from a JSON file |