fix(sbom): enforce sbom-only version sources across docs surfaces#711
Conversation
Make SBOM attestations the authoritative source for kernel, GNOME, Mesa, and Fedora across driver, images, and changelog surfaces while keeping NVIDIA as the explicit fallback workaround. Refs: #35 #38 #50 #52 #57 Assisted-by: Claude Sonnet 4.6 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request refactors the version fetching logic to prioritize SBOM data over regex-based parsing of release notes. It updates scripts to source Kernel, Mesa, and Fedora versions from SBOMs, improves GHCR token handling with expiry and retry logic, and adds unit tests for script utilities. Frontend components were also updated to import structured data directly. A review comment suggests using an atomic write pattern when saving driver version data to prevent potential file corruption.
| fs.mkdirSync(OUTPUT_DIR, { recursive: true }); | ||
| } | ||
|
|
||
| fs.writeFileSync(OUTPUT_FILE, JSON.stringify(output, null, 2), "utf-8"); |
There was a problem hiding this comment.
The script writes the driver versions data directly to the output file. To prevent data corruption or truncated files if the process is interrupted, it is recommended to use an atomic write pattern (writing to a temporary file and then renaming it), similar to the implementation in fetch-github-sbom.js.
| fs.writeFileSync(OUTPUT_FILE, JSON.stringify(output, null, 2), "utf-8"); | |
| const tmpFile = OUTPUT_FILE + ".tmp"; | |
| fs.writeFileSync(tmpFile, JSON.stringify(output, null, 2), "utf-8"); | |
| fs.renameSync(tmpFile, OUTPUT_FILE); |
Summary
Validation
node --test scripts/fetch-github-sbom.test.js scripts/fetch-github-driver-versions.test.jsnpm run typechecknpm run buildFollow-up
Assisted-by: Claude Sonnet 4.6 via GitHub Copilot
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com