You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# For more information, see [docs](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-syntax)
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
4
+
5
+
Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE).
6
+
7
+
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
8
+
9
+
## Submitting a pull request
10
+
11
+
1. Fork and clone the repository
12
+
1. Configure and install the dependencies: `pip3 install -r requirements.txt`
13
+
1. Create a new branch: `git checkout -b my-branch-name`
14
+
1. Push to your fork and submit a pull request
15
+
1. Pat your self on the back and wait for your pull request to be reviewed! :tada:
16
+
17
+
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
18
+
19
+
- Follow the [style guide](https://black.readthedocs.io/en/stable/) - it'll automatically run via the [super-linter](https://github.com/github/super-linter).
20
+
- Write tests.
21
+
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
22
+
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
23
+
24
+
## Resources
25
+
26
+
-[How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
Copy file name to clipboardExpand all lines: README.md
+65-47Lines changed: 65 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,10 @@ Enumerate Dependency Graph SBOMs from all repositories in a GitHub Enterprise (a
4
4
5
5
Search collected SBOMs by PURL, cache them for offline analysis, sync malware security advisories, and match SBOM packages against those advisories. Supports human-readable and JSON output with file output for JSON.
6
6
7
-
## Features
7
+
> [!NOTE]
8
+
> This is an _unofficial_ tool created by Field Security Specialists, and is not officially supported by GitHub.
9
+
10
+
## 🚀 Features
8
11
9
12
- Enumerate orgs in an Enterprise and repos in each org
10
13
- Fetch SBOM per repo with concurrency + optional delay and retry/throttle handling
@@ -13,21 +16,17 @@ Search collected SBOMs by PURL, cache them for offline analysis, sync malware se
13
16
- SBOMs are written incrementally to allow for stopping and resuming
14
17
- Sync malware security advisories from the GitHub Advisory Database
15
18
- Version-aware matching of SBOM packages vs. malware advisories
19
+
- Optional suppression of "unbounded" malware advisories that claim all versions are affected (e.g. vulnerable range '*', '>=0')
16
20
- Optional SARIF 2.1.0 output per repository for malware matches with optional Code Scanning upload
17
21
- YAML ignore file support to suppress specific advisory IDs or PURLs globally or scoped to an org / repo
18
-
- Optional suppression of "unbounded" malware advisories that claim all versions are affected (e.g. vulnerable range '*', '>=0')
19
22
- Works with GitHub.com, GitHub Enterprise Server, GitHub Enterprise Managed Users and GitHub Enterprise Cloud with Data Residency (custom base URL)
20
23
- Reason tracing: every search match shows which query matched; every malware match shows which advisory triggered it
- Option to suppress secondary rate limit warnings, and full quiet mode to suppress informative messages
24
26
- Intelligent skip logic: if the repository was pushed to, but the default branch head commit date isn't newer than the prior SBOM retrieval, the existing cached SBOM is reused
27
+
- Option to suppress secondary rate limit warnings, and full quiet mode to suppress informative messages
25
28
- Adaptive backoff: each secondary rate limit hit increases the SBOM fetch delay by 10% to reduce future throttling
26
29
27
-
## Auth Requirements
28
-
29
-
Token needs scopes: `repo`, `read:org`, and `security_events` (for dependency graph SBOM API). For public-only scanning you may omit `repo`.
30
-
31
30
## Usage
32
31
33
32
### Quick Start
@@ -53,35 +52,15 @@ Using GitHub Enterprise Server:
53
52
npm run start -- --sync-sboms --enterprise ent --base-url https://github.internal/api/v3 --sbom-cache sboms --token $GHES_TOKEN
54
53
```
55
54
56
-
### Argument Reference
55
+
### 🔑 Authentication
57
56
58
-
| Arg | Purpose |
59
-
|------|---------|
60
-
|`--sbom-cache <dir>`| Directory holding per-repo SBOM JSON files (required for offline mode; used as write target when syncing) |
61
-
|`--sync-sboms`| Perform API calls to (re)collect SBOMs; without it the CLI runs offline loading cached SBOMs. Requires a GitHub token |
|`--match-malware`| Match current SBOM set against cached advisories |
71
-
|`--malware-cache <dir>`| Advisory cache directory (required with malware operations) |
72
-
|`--malware-cutoff <ISO-date>`| Ignore advisories whose publishedAt AND updatedAt are both before this date/time (e.g. `2025-09-29` or full timestamp) |
73
-
|`--ignore-file <path>`| YAML ignore file (advisories / purls / scoped blocks) to filter malware matches before output |
74
-
|`--ignore-unbounded-malware`| Ignore matches whose advisory vulnerable version range covers all versions (e.g. `*`, `>=0`, `0.0.0`) |
|`--quiet`| Suppress all non-error and non-result output (progress bar, JSON and human readable output still show) |
84
-
|`--ca-bundle <path>`| Path to a PEM file containing one or more additional CA certificates (self‑signed / internal PKI) |
57
+
A GitHub token with appropriate scope is required when performing network operations such as `--sync-sboms`, `--sync-malware` and `--upload-sarif`.
58
+
59
+
A fine-grained PAT needs scope `Read-only` on `Contents`. To upload SARIF you need `Read and write` on `Code scanning alerts`. If necessary you can use a Classic PAT, or a token from a GitHub App with `repo`, `read:org`, and `security_events` (write) scopes. You may find generating a token with the [`gh` CLI](https://cli.github.com/) is convenient.
60
+
61
+
It can be provided in the `GITHUB_TOKEN` environment variable, or with the `--token` argument.
62
+
63
+
Offline operations (pure searches, matches using pre-cached data) need no token.
| `--malware-cutoff <ISO-date>` | Ignore advisories whose publishedAt AND updatedAt are both before this date/time (e.g. `2025-09-29` or full timestamp) |
310
+
| `--ignore-file <path>` | YAML ignore file (advisories / purls / scoped blocks) to filter malware matches before output |
311
+
| `--ignore-unbounded-malware` | Ignore matches whose advisory vulnerable version range covers all versions (e.g. `*`, `>=0`, `0.0.0`) |
| `--quiet` | Suppress all non-error and non-result output (progress bar, JSON and human readable output still show) |
321
+
| `--ca-bundle <path>` | Path to a PEM file containing one or more additional CA certificates (self‑signed / internal PKI) |
322
+
314
323
## Build & test
315
324
316
-
## Build
325
+
## 🏗️ Build
317
326
318
327
```bash
319
328
npm install
320
329
npm run build
321
330
```
322
331
323
-
## Test
332
+
## 🧪 Test
324
333
325
334
The repo ships with a minimal test fixture to validate end-to-end malware matching without making network calls.
326
335
@@ -350,24 +359,33 @@ Alternatively, you can exercise the CLI purely offline using the fixtures (no to
350
359
npm run start -- --sbom-cache fixtures/sboms --malware-cache fixtures/malware-cache --match-malware
351
360
```
352
361
353
-
## Authentication and Rate Limiting
362
+
## 🚦 Rate Limiting
354
363
355
-
### Rate Limiting & Retries
356
-
357
-
Standard & secondary rate limits automatically retried (up to 2 times).
364
+
Standard & secondary rate limits trigger an automatic retry (up to 2 times).
358
365
359
366
You can tune concurrency and increase the delay to reduce the chance of hitting rate limits.
360
367
361
368
Each time a secondary rate limit is hit, the delay between fetching SBOMs is increased by 10%, to provide a way to adaptively respond to that rate limit.
362
369
363
-
### Authentication
370
+
## 🤝 Contributing
364
371
365
-
A GitHub token with appropriate scope is required when performing network operations such as `--sync-sboms`, `--sync-malware` and `--upload-sarif`.
372
+
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to this project.
366
373
367
-
It can be provided in the `GITHUB_TOKEN` environment variable, or with the `--token` argument.
374
+
## 📄 License
368
375
369
-
Offline operations (pure searches, matches using pre-cached data) need no token.
376
+
MIT License - see [LICENSE](LICENSE) file for details
377
+
378
+
## 🆘 Support
379
+
380
+
> [!NOTE]
381
+
> This is an _unofficial_ tool created by Field Security Specialists, and is not officially supported by GitHub.
382
+
383
+
See [SUPPORT.md](SUPPORT.md) for support options.
384
+
385
+
## 📜 Code of Conduct
386
+
387
+
See [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) for our Code of Conduct.
370
388
371
-
## License
389
+
## 🛡️ Privacy
372
390
373
-
MIT License
391
+
See [PRIVACY.md](PRIVACY.md) for the privacy notice.
GitHub takes the security of our software products and services seriously, including all of the open source code repositories managed through our GitHub organizations, such as [GitHub](https://github.com/GitHub).
6
+
7
+
Even though [open source repositories are outside of the scope of our bug bounty program](https://bounty.github.com/index.html#scope) and therefore not eligible for bounty rewards, we will ensure that your finding gets passed along to the appropriate maintainers for remediation.
8
+
9
+
## Reporting Security Issues
10
+
11
+
If you believe you have found a security vulnerability in any GitHub-owned repository, please report it to us through coordinated disclosure.
12
+
13
+
**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.**
14
+
15
+
Instead, please send an email to opensource-security[@]github.com.
16
+
17
+
Please include as much of the information listed below as you can to help us better understand and resolve the issue:
18
+
19
+
* The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
20
+
* Full paths of source file(s) related to the manifestation of the issue
21
+
* The location of the affected source code (tag/branch/commit or direct URL)
22
+
* Any special configuration required to reproduce the issue
23
+
* Step-by-step instructions to reproduce the issue
24
+
* Proof-of-concept or exploit code (if possible)
25
+
* Impact of the issue, including how an attacker might exploit the issue
26
+
27
+
This information will help us triage your report more quickly.
28
+
29
+
## Policy
30
+
31
+
See [GitHub's Safe Harbor Policy](https://docs.github.com/en/github/site-policy/github-bug-bounty-program-legal-safe-harbor#1-safe-harbor-terms)
This project uses GitHub issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new issue.
6
+
7
+
For help or questions about using this project, please search the existing discussions and issues, then open a new discussion. Thanks!
8
+
9
+
This project is actively developed and is maintained by GitHub staff **AND THE COMMUNITY** on a best-effort basis. We will do our best to respond to support and community questions in a timely manner.
10
+
11
+
## GitHub Support Policy
12
+
13
+
Support for this project is limited to the resources listed above.
0 commit comments