Repository navigation
fix(sbom): don't tie the copyright start bound to SOURCE_DATE_EPOCH - #61
Merged
Merged
Conversation
gen-sbom required 1000 <= --copyright-start <= build year, and the
build year comes from SOURCE_DATE_EPOCH. Reproducible-build setups pin
that to a placeholder before 2006 (Nix stdenv's 315532800 is 1980, some
use 0), so every SBOM run failed there, even with the default start of
2006. Before --copyright-start existed those builds wrote an SBOM.
The upper bound is now the latest of the build year, the current year
and the default start. It still catches a mistyped future year, any
real start year works whatever the epoch, and the default passes even
on a host whose clock is also before 2006. Checking against the clock
does not affect the output, which still depends only on
SOURCE_DATE_EPOCH.
When the build year is earlier than the start, the copyright line
carries the start year alone ("Copyright (C) 2006 wolfSSL Inc.")
rather than a reversed range or a start clamped to the placeholder
year. The help text and share/README.md describe that form.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the SBOM copyright-year handling changes.
No open issues 🎉
What changed in this PR
Fixes SBOM generation when SOURCE_DATE_EPOCH predates the copyright start year, while leaving creation timestamps unchanged.
Changes:
- Allows copyright start years up to the later of the build year and current year.
- Emits only the start year when the build year is not later.
- Documents the behavior and adds regression tests for old epochs and validation boundaries.
| File | Description |
|---|---|
| tests/test_gen_sbom.py | Tests copyright output with old epochs and current/future year bounds. |
| share/README.md | Documents copyright formatting and the revised upper bound. |
| share/gen-sbom | Updates copyright validation, rendering, and CLI help. |
Review effort: Balanced
Member
Author
|
@claude review |
sameehj
approved these changes
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gen-sbom exits with an error when
SOURCE_DATE_EPOCHis before the copyright start year (Nix's 1980 default, or a pinned 0), even with the default start of 2006, so products vendoring the toolkit failmake sbom/ the CMake sbom target there.Changes
--copyright-startby the later of the build year and the current year, not the build year alone--copyright-starthelp andshare/README.mdTesting
TestCopyrightStart: copyright line for a build year before the start; with a 1980SOURCE_DATE_EPOCH, no flag, 2006 and 2025 produce an SBOM; the bound is checked at the current year and at a future build year