Description
The custom generateUUID() implementation in pkg/generator/generator.go creates predictable, non standard IDs based purely on time.Now().UnixNano().
These IDs lack the proper version and variant bits defined in RFC 4122 (v4/v7). Because they are just padded nanosecond timestamps, they fail strict downstream SBOM schema validations that expect standard compliant UUIDs.
Expected Behavior
The SBOM generator should create valid RFC 4122 compliant UUIDs for the document ID.
Actual Behavior
The codebase generates pseudo random IDs using custom bit shifting logic that does not correctly conform to urn:uuid: standards.
Environment
- Codebase references:
pkg/generator/generator.go around line 530.
- Standard affected: RFC 4122 (UUIDv4)
Description
The custom
generateUUID()implementation inpkg/generator/generator.gocreates predictable, non standard IDs based purely ontime.Now().UnixNano().These IDs lack the proper version and variant bits defined in RFC 4122 (v4/v7). Because they are just padded nanosecond timestamps, they fail strict downstream SBOM schema validations that expect standard compliant UUIDs.
Expected Behavior
The SBOM generator should create valid RFC 4122 compliant UUIDs for the document ID.
Actual Behavior
The codebase generates pseudo random IDs using custom bit shifting logic that does not correctly conform to
urn:uuid:standards.Environment
pkg/generator/generator.goaround line 530.