feat: surface specific SBOM validation errors from api#611
Open
v3nant wants to merge 1 commit into
Open
Conversation
v3nant
force-pushed
the
feat/scan-sbom-valitation-errors
branch
from
July 24, 2026 03:41
3f3c589 to
18b3ce9
Compare
v3nant
marked this pull request as ready for review
July 24, 2026 03:54
facundo-herodevs
approved these changes
Jul 24, 2026
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
hd scan eolsubmits an SBOM that eol-api rejects, show a specific, actionable message instead of the generic "Failed to submit scan to NES. Failed to create EOL report".Changes
src/api/errors.ts(SbomErrorCode,isSbomErrorCode,SbomErrorwith optionaldetails), kept separate from the authApiErrorCode/AUTH_ERROR_MESSAGESpath.src/api/nes.client.ts:extractSbomError()throws aSbomErrorcarrying the API code, message, and details (purl,totalComponents); unrecognized codes still fall back to the generic error.src/commands/scan/eol.ts(SBOM_ERROR_MESSAGES+getSbomErrorMessage) covering EMPTY_SBOM, INVALID_SBOM_JSON, SBOM_MISSING_COMPONENTS, SBOM_NO_IDENTIFIABLE_COMPONENTS, and INVALID_PURL, with tool suggestions (Syft, cdxgen, Trivy) and--filevs generated-SBOM wording.scan_failure_reasontelemetry for SbomError failures.Testing
npm run typechecknpm run lintnpm run test(24 files, 257 tests passing)Screenshots
n/a
Risks & Rollback
extensions.codevalues; any unlisted code (including the current prodBAD_USER_INPUT) keeps the existing generic fallback, so there is no regression.BAD_USER_INPUTfor the no-purl case.Checklist