Skip to content

Commit

Permalink
report: spdxtagvalue: Added missing mandatory fields
Browse files Browse the repository at this point in the history
Missed these mandatory fields:
- PackageLicenseDeclared
- PackageLicenseConcluded
- PackageCopyrightText

PackageLicenseConcluded is 'NOASSERTION' throughout.
PackageLicenseDeclared, PackageLicenseConcluded and
PackageCopyrightText is 'NOASSERTION' for container images and the
layers within.

Signed-off-by: Nisha K <nishak@vmware.com>
  • Loading branch information
Nisha K committed May 21, 2019
1 parent d1c4ebd commit e1c86eb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tern/report/spdxtagvalue/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ def generate(image_obj_list):
image_obj.to_dict(template),
image_obj.origins.origins,
SPDXID=get_image_spdxref(image_obj),
PackageLicenseDeclared='NOASSERTION',
PackageLicenseConcluded='NOASSERTION',
PackageCopyrightText='NOASSERTION',
FilesAnalyzed='false') + '\n'
# Add image relationships
report = report + get_image_relationships(image_obj) + '\n'
Expand All @@ -205,6 +208,9 @@ def generate(image_obj_list):
layer_obj.origins.origins,
SPDXID=get_layer_spdxref(layer_obj),
PackageDownloadLocation=registry_repotag,
PackageLicenseDeclared='NOASSERTION',
PackageLicenseConcluded='NOASSERTION',
PackageCopyrightText='NOASSERTION',
FilesAnalyzed='false') + '\n'
# Add layer relationships
if index == 0:
Expand All @@ -223,5 +229,6 @@ def generate(image_obj_list):
package_obj.to_dict(template),
package_obj.origins.origins,
SPDXID=get_package_spdxref(package_obj),
PackageLicenseConcluded='NOASSERTION',
FilesAnalyzed='false') + '\n'
return report

0 comments on commit e1c86eb

Please sign in to comment.