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.
Description
This change ensures that license IDs in SBOM reports are reported with the key
id
, rather thanlicense_id
. Theid
key was in the original spec (and is the format that Artemis' UI expects); however, this was unintentionally changed tolicense_id
by #48.Motivation and Context
#48 changed the way Artemis stores SBOM-generated dependency trees on the backend (from database to S3 bucket storage). It also unintentionally introduced a change to the format of SBOM results.
When SBOM reports were generated on-the-fly from the database, the textual representation of license objects was generated by this to_dict() function, which represented the
license_id
field with theid
key.However, when reports were written as JSON files directly to an S3 bucket, this
to_dict()
representation was not used, and this field was instead stored with thelicense_id
key. A field name change constitutes a breaking change, and created validation issues when downloading SBOM reports via the UI.This change also introduces a unit test which validates that the code which parses Veracode SBOM output returns JSON in the expected schema for submission to the S3 bucket.
How Has This Been Tested?
Types of changes
Checklist
Pic