Skip to content

feat: respect env var $SOURCE_DATE_EPOCH when generating SBOM #1036

Closed

Description

@wolfv

Is your feature request related to a problem? Please describe.

The timestamp should be set to $SOURCE_DATE_EPOCH env var, so that builds are deterministic and can be reproduced at some point in the future.

Describe the solution you'd like

More explanation here: https://reproducible-builds.org/docs/source-date-epoch/

Activity

  1. jkowalleck commented on Mar 31, 2026

    @jkowalleck
    Member

    feel free to champion the feature

    relevant parts are here:

    if self._output_reproducible:
    bom.metadata.properties.add(Property(name=PropertyName.Reproducible.value,
    value=PropertyValue.BooleanTrue.value))
    # dirty hacks to remove these mandatory properties
    bom.serial_number = None # type:ignore[assignment]
    bom.metadata.timestamp = None # type:ignore[assignment]

  2. jkowalleck commented on Mar 31, 2026

    @jkowalleck
    Member

    lets discuss the expectations:

    I would expect that only if the CLI flag --output-reproducible is given, an env var SOURCE_DATE_EPOCH MAY be used.
    Otherwise, the existing behavior MUST be used.
    If the --output-reproducible and no valid env var SOURCE_DATE_EPOCH is present, the current behaviour MUST be used.

  3. wolfv commented on Mar 31, 2026

    @wolfv
    Author
  4. changed the title [-]respect $SOURCE_DATE_EPOCH when generating SBOM[/-] [+]feat: respect env var `$SOURCE_DATE_EPOCH` when generating SBOM[/+] on Apr 13, 2026
  5. jkowalleck commented on Sep 15, 2026

    @jkowalleck
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions