sbom.go - refactoring, fixed 'range out of bounds' bug