microsoft / sbom-tool

The SBOM tool is a highly scalable and enterprise ready tool to create SPDX 2.2 compatible SBOMs for any variety of artifacts.
MIT License
1.63k stars 133 forks source link

Implement Consistent Path Normalization Across sbom-tool #709

Open JonDouglas opened 2 months ago

JonDouglas commented 2 months ago

There's no centralized/consistent approach across modules for path normalization to my knowledge.

IsValid seems close! https://github.com/microsoft/sbom-tool/blob/ae8c3c308587019f748dbbd15baef294482ecdea/src/Microsoft.Sbom.Api/Filters/DownloadedRootPathFilter.cs#L49

We should implement this to any files/functions handling paths with some path normalization logic to ensure they are managed uniformly and add tests to validate that.