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
- Option to suppress secondary rate limit warnings, and full quiet mode to suppress non-error console output while retaining progress bar, human readable results and machine-readable JSON
21
+
- Option to suppress secondary rate limit warnings, and full quiet mode to suppress informative messages
22
22
- 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
23
23
- Adaptive backoff: each secondary rate limit hit increases the SBOM fetch delay by 10% to reduce future throttling
24
24
@@ -51,6 +51,56 @@ Using GitHub Enterprise Server:
51
51
npm run start -- --sync-sboms --enterprise ent --base-url https://github.internal/api/v3 --sbom-cache sboms --token $GHES_TOKEN
52
52
```
53
53
54
+
### Argument Reference
55
+
56
+
| Arg | Purpose |
57
+
|------|---------|
58
+
|`--sbom-cache <dir>`| Directory holding per-repo SBOM JSON files (required for offline mode; used as write target when syncing) |
59
+
|`--sync-sboms`| Perform API calls to (re)collect SBOMs; without it the CLI runs offline loading cached SBOMs. Requires a GitHub token |
If you also perform a search in the same invocation (add `--purl` or `--purl-file`), the JSON file will contain both `malwareMatches` and `search` top-level keys.
95
145
96
-
### SARIF Output & Code Scanning Upload
146
+
### Progress bar & log noise suppression
97
147
98
-
Generate SARIF 2.1.0 files (one per repository with matches) for malware findings:
148
+
When collecting a large number of SBOMs you can enable a lightweight progress bar:
- The bar shows overall completion across all organizations (if using `--enterprise`) once repository counts are enumerated
159
+
- Rendering is throttled (~12 fps) to avoid excessive stdout writes
160
+
- Standard error messages (e.g., hard failures) still appear
161
+
- Suppression only hides the secondary rate-limit informational warnings; primary rate limit retries still log once
114
162
115
-
-`--upload-sarif` requires `--sarif-dir` and `--match-malware`.
116
-
- A token with `security_events` (and appropriate repo/org scope) is required for uploads.
117
-
- The tool attempts to resolve the default branch commit SHA for each repo; if it cannot, that repo's upload is skipped.
118
-
- SARIF upload merges are handled by GitHub; repeated uploads for the same commit replace earlier results for the same tool.
163
+
To reduce general log noise, you can use either `--quiet` to suppress non-error console output while retaining progress bar, human readable results and machine-readable JSON, or just `--suppress-secondary-rate-limit-logs` to suppress warnings of hitting the rate limits.
119
164
120
-
### Progress Bar & Log Noise Suppression
165
+
### Output modes
121
166
122
-
When collecting a large number of SBOMs you can enable a lightweight progress bar:
167
+
JSON only to stdout:
123
168
124
169
```bash
125
-
npm run start -- --sync-sboms --org my-org --sbom-cache sboms --progress
170
+
npm run start -- --sbom-cache sboms --purl pkg:npm/[email protected] --json
126
171
```
127
172
128
-
If you routinely encounter secondary rate limit warnings (which can visually disrupt the bar) you can silence those specific warnings:
173
+
Human + JSON (JSON written to file; stdout remains readable):
You can tune concurrency and increase the delay to reduce the chance of hitting rate limits.
269
269
270
-
This makes it clear which input (user query or specific advisory) caused each result.
270
+
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.
271
271
272
-
### Rate Limiting & Retries
272
+
### Authentication
273
273
274
-
- Standard & secondary rate limits automatically retried (up to 2 times)
275
-
- You can tune concurrency and increase the delay to reduce the chance of hitting rate limits
274
+
A GitHub token with appropriate scope is required when performing network operations such as `--sync-sboms`, `--sync-malware` and `--upload-sarif`.
276
275
277
-
### Authentication Notes
276
+
It can be provided in the `GITHUB_TOKEN` environment variable, or with the `--token` argument.
278
277
279
-
- A GitHub token is required when performing network operations such as `--sync-sboms`, `--sync-malware` and `--upload-sarif`
280
-
- Offline operations (pure searches, matches using pre-cached data) need no token
278
+
Offline operations (pure searches, matches using pre-cached data) need no token.
0 commit comments