Skip to content

Non-Compliant Custom UUID Generation in generator.go #35

@Jaydeep869

Description

@Jaydeep869

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions