Repository navigation
Conversation
Preserve the documented synchronous GHES API, existing cache and search shape, and repository-level error handling. Bound async generation, polling and download; keep GitHub credentials off download hosts. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
gubraun
requested review from
adrienpessu and
felickz
and
a balanced review from Copilot
November 6, 2026 10:24
…ring sanitization' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
SBOM fetching rejects valid URLs with different repository casing and misclassifies cloud repositories such as api/v3 as GHES, selecting the deprecated synchronous endpoint.
2 open issues
What changed in this PR
Migrates cloud SBOM collection to asynchronous reports ahead of the synchronous endpoint’s removal, while retaining synchronous GHES support and the existing cache format.
Changes:
- Adds report generation, bounded polling, and credential-free downloads.
- Integrates the new fetch flow without changing cache and search interfaces.
- Adds regression coverage and documents hosting compatibility.
| File | Description |
|---|---|
src/types.ts |
Updates comments to describe both SBOM sources. |
src/sbomFetch.ts |
Implements asynchronous cloud fetching and synchronous GHES routing. |
src/sbomFetch.test.ts |
Covers fetching, timeouts, redirects, validation, and cache integration. |
src/sbomCollector.ts |
Delegates fetching to the new helper while preserving result metadata. |
README.md |
Documents hosting support, deadlines, and cloud endpoint removal. |
package.json |
Adds SBOM fetch regression tests to the test command. |
Review effort: Balanced
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Case-sensitive report URL checks reject valid repositories, an unanchored GHES regex can misroute cloud requests, and non-abortable rate-limit waits can keep the CLI running beyond its deadline.
3 open issues
Review effort: Balanced
| throw timeoutError; | ||
| }; | ||
| try { | ||
| return await Promise.race([run(), deadline]); |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Validation
npm run lintnpm run buildnpm testGHES compatibility is based on the published API documentation and mocked coverage; it was not tested against a live GHES instance.