
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
github-ioc-scanner
Advanced tools
Scan GitHub repositories for Indicators of Compromise (IOCs) in package dependencies across multiple languages
A powerful command-line tool for scanning GitHub repositories to detect Indicators of Compromise (IOCs) in package dependencies across multiple programming languages and package managers.
| Language | Package Managers | Files Scanned |
|---|---|---|
| JavaScript/Node.js | npm, yarn, pnpm, bun | package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb |
| Python | pip, pipenv, poetry | requirements.txt, Pipfile.lock, poetry.lock, pyproject.toml |
| Ruby | bundler | Gemfile.lock |
| PHP | composer | composer.lock |
| Go | go modules | go.mod, go.sum |
| Rust | cargo | Cargo.lock |
| Java | Maven | pom.xml |
| Format | File Extensions | Description |
|---|---|---|
| SPDX | .json, .xml | Industry standard SBOM format |
| CycloneDX | .json, .xml | OWASP SBOM standard |
| Generic | .json, .xml | Custom SBOM formats |
Supported SBOM Files: sbom.json, bom.json, cyclonedx.json, spdx.json, software-bill-of-materials.json, and XML variants
pip install github-ioc-scanner
git clone https://github.com/christianherweg0807/github_package_scanner.git
cd github_package_scanner
pip install -e .
git clone https://github.com/christianherweg0807/github_package_scanner.git
cd github_package_scanner
docker build -t github-ioc-scanner .
docker run -e GITHUB_TOKEN=ghp_xyz -t github-ioc-scanner --org your-org <etc>
git clone https://github.com/christianherweg0807/github_package_scanner.git
cd github_package_scanner
pip install -e ".[dev]"
export GITHUB_TOKEN="your_github_token_here"
For better security and higher rate limits, use GitHub App authentication:
# Create ~/github/apps.yaml with your GitHub App credentials
github-ioc-scan --org your-org --github-app-config ~/github/apps.yaml
Benefits of GitHub Apps:
See GitHub App Authentication Guide for setup instructions.
# Scan all repositories in an organization
github-ioc-scan --org your-org
# Scan a specific repository
github-ioc-scan --org your-org --repo your-repo
# Fast scan (root-level files only)
github-ioc-scan --org your-org --fast
Scan all repositories in an organization:
github-ioc-scan --org your-org
Scan repositories belonging to a specific team:
github-ioc-scan --org your-org --team security-team
Scan all repositories in an organization, organized by teams for better visibility:
github-ioc-scan --org your-org --team-first-org
This approach:
Benefits:
Example Output:
🚨 TEAM 'security-team' - THREATS DETECTED
============================================================
Found 2 indicators of compromise:
📦 Repository: your-org/security-app
Threats found: 2
⚠️ package.json | malicious-package | 1.0.0
⚠️ requirements.txt | compromised-lib | 2.1.0
✅ TEAM 'frontend-team' - NO THREATS DETECTED
Repositories scanned: 5
Files analyzed: 127
🚨 TEAM 'backend-team' - THREATS DETECTED
============================================================
Found 1 indicators of compromise:
📦 Repository: your-org/api-service
Threats found: 1
⚠️ Cargo.lock | unsafe-crate | 0.3.2
Scan a specific repository:
github-ioc-scan --org your-org --repo your-repo
For quick assessments, use fast mode to scan only root-level files:
github-ioc-scan --org your-org --fast
By default, archived repositories are skipped. Include them with:
github-ioc-scan --org your-org --include-archived
Scan Software Bill of Materials files alongside traditional lockfiles:
# Default: Scan both lockfiles and SBOM files
github-ioc-scan --org your-org
# Scan only SBOM files (skip traditional lockfiles)
github-ioc-scan --org your-org --sbom-only
# Disable SBOM scanning (traditional lockfiles only)
github-ioc-scan --org your-org --disable-sbom
Supported SBOM Formats:
spdx.json, spdx.xmlcyclonedx.json, bom.xmlsbom.json, software-bill-of-materials.jsonEnable advanced security scanning features:
# Enable GitHub Actions workflow security scanning
github-ioc-scan --org your-org --scan-workflows
# Enable secrets detection (AWS keys, GitHub tokens, API keys)
github-ioc-scan --org your-org --scan-secrets
# Enable both workflow and secrets scanning
github-ioc-scan --org your-org --scan-workflows --scan-secrets
# Comprehensive security scan with all features
github-ioc-scan --org your-org --scan-workflows --scan-secrets --enable-maven
For large organizations, use batch processing for optimal performance:
# Aggressive batching strategy
github-ioc-scan --org your-org --batch-strategy aggressive
# Custom concurrency limits
github-ioc-scan --org your-org --max-concurrent 10
# Enable cross-repository batching
github-ioc-scan --org your-org --enable-cross-repo-batching
Get detailed information during scanning:
github-ioc-scan --org your-org --verbose
The scanner includes comprehensive IOC definitions for:
Heise Security Report: Neuer NPM-Großangriff: Selbst-vermehrende Malware infiziert Dutzende Pakete
✅ Fully Covered: All packages from this attack are included in our built-in IOC database
🔍 Scanning organization: your-org
📁 Found 45 repositories to scan
[████████████████████████████████] 100% | 45/45 repositories | ETA: 0s
⚠️ THREATS DETECTED:
Repository: your-org/frontend-app
├── package.json
│ └── 🚨 CRITICAL: malicious-package@1.0.0
│ └── IOC Source: s1ngularity_nx_attack_2024.py
│ └── Description: Compromised package from S1ngularity NX attack
📈 Scan Summary:
├── Repositories scanned: 45
├── Files analyzed: 127
├── Threats found: 1
└── Scan duration: 23.4s
github-ioc-scan --org your-org --output json
| Variable | Description | Default |
|---|---|---|
GITHUB_TOKEN | GitHub personal access token | Required (if not using GitHub App) |
GITHUB_IOC_CACHE_DIR | Cache directory location | ~/.cache/github-ioc-scanner |
GITHUB_IOC_LOG_LEVEL | Logging level | INFO |
Note: When using GitHub App authentication, GITHUB_TOKEN is not required.
Create a config.yaml file:
github:
token: "your_token_here"
scanning:
fast_mode: false
include_archived: false
max_concurrent: 5
batch:
strategy: "adaptive"
enable_cross_repo_batching: true
cache:
enabled: true
ttl_hours: 24
The new security scanning features (Maven, Workflow, Secrets) add minimal overhead:
| Feature | Typical Time | Impact |
|---|---|---|
| Maven Parser | ~0.1-0.5ms per file | Negligible |
| Workflow Scanner | ~0.3-1ms per file | Negligible |
| Secrets Scanner | ~2-5ms per 1000 lines | Low |
| Combined Overhead | ~20-30% | Minimal vs network latency |
All features scale linearly and are optimized for large repositories. See Performance Documentation for detailed benchmarks.
Workflow and secrets scanning now runs in parallel for significantly faster scans:
| Repositories | Workers | Speed Improvement |
|---|---|---|
| 16 repos | 5 workers | ~3x faster |
| 50 repos | 10 workers | ~5x faster |
| 100+ repos | 10 workers | ~5-8x faster |
Repository lists are now cached and incrementally updated:
| Scenario | API Calls | Time Saved |
|---|---|---|
| First scan (1000 repos) | 10 calls | Baseline |
| Repeat scan (5 new repos) | 1 call | ~90% |
| Repeat scan (no changes) | 1 call | ~95% |
Use --refresh-repos to force a full refresh when needed.
Detect dangerous workflow configurations that could be exploited in supply chain attacks:
pull_request_target with unsafe checkout configurationsworkflow_run triggers that could enable privilege escalationdiscussion.yaml, formatter_123456789.yml)# Enable workflow scanning
github-ioc-scan --org your-org --scan-workflows
# Disable workflow scanning (default)
github-ioc-scan --org your-org --no-scan-workflows
See Workflow Scanning Documentation for details.
Identify exfiltrated credentials and sensitive data in repositories:
# Enable secrets scanning
github-ioc-scan --org your-org --scan-secrets
# Disable secrets scanning (default)
github-ioc-scan --org your-org --no-scan-secrets
See Secrets Detection Documentation for details.
Scan Maven pom.xml files for compromised Java dependencies:
# Maven scanning is enabled by default
github-ioc-scan --org your-org
# Disable Maven scanning
github-ioc-scan --org your-org --disable-maven
# Explicitly enable Maven scanning
github-ioc-scan --org your-org --enable-maven
See Maven Support Documentation for details.
Comprehensive documentation is available in the docs/ directory:
Run the test suite:
# Run all tests
pytest
# Run with coverage
pytest --cov=src/github_ioc_scanner
# Run specific test categories
pytest tests/test_parsers.py # Parser tests
pytest tests/test_batch_*.py # Batch processing tests
We welcome contributions! Please see our Contributing Guidelines for details.
python -m venv venvsource venv/bin/activate (Linux/Mac) or venv\Scripts\activate (Windows)pip install -e ".[dev]"pytestTo add new IOC definitions:
issues/ directoryIOC_PACKAGES = {"package-name": ["version1", "version2"]}This project is licensed under the MIT License - see the LICENSE file for details.
This tool is provided for security research and defensive purposes only. The IOC definitions are based on publicly available threat intelligence and research. Always verify findings independently and follow responsible disclosure practices.
Made with ❤️ for the security community
FAQs
Scan GitHub repositories for Indicators of Compromise (IOCs) in package dependencies across multiple languages
We found that github-ioc-scanner demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.