Merge pull request #956 from newtonick/fix-build-yml-versioning
What changed, and why it matters
This is a CI/build pipeline fix, not a security vulnerability fix. The change moves file cleanup from the GitHub Actions workflow into the operating-system build script so that the build script can use files like .git/ and tools/ to write a version.json file. It also adds a verification step to fail the build if version.json is missing or incomplete, preventing broken boot images from being published.
No security action required. Treat as normal CI reliability improvement. Reviewers may optionally verify that the downstream seedsigner-os build.sh delete_unnecessary_files step exists and runs after version.json is written.
Security signals we found
No security-relevant code change in the application itself
Build pipeline hardening: prevents publication of images with missing version metadata
No evidence of vulnerability, exploit, or malicious change
Evidence from the diff
The commit modifies .github/workflows/build.yml. It removes an inline ‘delete unnecessary files’ step that stripped the checkout down to src/ before the build. The overlay trimming is now handled by seedsigner-os build.sh (delete_unnecessary_files) after it has used .git/ and tools/ to generate version.json. A new ‘verify version.json’ step uses jq to ensure required fields (name, fork, short_commit_hash, timestamp) are present, failing the build otherwise. This prevents a runtime splash-screen failure caused by a malformed/missing version.json.
Changed components
.github/workflows/build.ymlInspect captured patch +12 / −9
### .github/workflows/build.yml
@@ -83,15 +83,9 @@ jobs:
echo "img_version=os${os_version}_sw${source_version}"| tee -a $GITHUB_ENV
fi
- - name: delete unnecessary files
- # The seedsigner-os buildroot overlay only needs src/; drop everything
- # else from the seedsigner checkout (tests, docs, tooling, .git, etc.)
- # to keep the overlay minimal.
- run: |
- cd seedsigner-os/opt/rootfs-overlay/opt
- find . -mindepth 1 -maxdepth 1 ! -name src -exec rm -rf {} +
- ls -la .
- ls -la src
+ # NOTE: trimming the overlay down to src/ is deliberately left to seedsigner-os
+ # build.sh (delete_unnecessary_files). It needs the .git/ and tools/ we would
+ # otherwise delete here in order to write version.json first.
- name: restore build cache
uses: actions/cache@v4
@@ -125,6 +119,15 @@ jobs:
--${{ matrix.target }} --skip-repo --no-clean
sudo chown -R $USER:$USER seedsigner-os/images seedsigner-os/buildroot_dl ~/.buildroot-ccache/
+ # version.json is written by seedsigner-os build.sh. If it is missing or has a
+ # null field the app raises at the splash screen, which looks like an
+ # unrecoverable boot hang, so fail the build rather than publish the image.
+ - name: verify version.json
+ working-directory: seedsigner-os/opt/rootfs-overlay/opt
+ run: |
+ cat src/seedsigner/version.json
+ jq -e '.name and .fork and .short_commit_hash and .timestamp' src/seedsigner/version.json
+
- name: list image (before rename)
run: |
ls -la seedsigner-os/imagesWhy this scored 17/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.