Skip to content

Calling SbomValidator.ValidateSbomAsync With Directory As OutputPath Returns False Positive #1093

Open
@rdgillespie

Description

@rdgillespie

Current Behaviour

While validating a buildDropPath where one of the files has been intentionally tampered with, passing a directory to the outputPath parameter of the SbomValidator.ValidateSbomAsync method, the returned SBOMValidationResult has the IsSuccessful property set to true.

Expected Behaviour

While validating a buildDropPath where one of the files has been intentionally tampered with, passing a directory to the outputPath parameter of the SbomValidator.ValidateSbomAsync method, the returned SBOMValidationResult has the IsSuccessful property set to false.

Alternatively, an exception should be thrown if the output file cannot be written to.

Steps to Reproduce

  1. Created an artifact and generate an SBOM
  2. Tamper with one of the files so that hash changes
  3. Call ISBOMValidator.ValidateSbomAsync with the outputPath parameter as an existing directory path
  4. Inspect returned result

Additonal Context

Library version used: 3.1.0

Metadata

Metadata

Assignees

Labels

needs investigationOur team will investigate and determine next actions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions