ci: enforce built-vs-rootfs NVRC hash match#158
Conversation
Record the built NVRC sha256 and fail the workflow if the binary copied into rootfs (and still present after image build) does not match. Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
There was a problem hiding this comment.
Pull request overview
Adds CI safeguards to ensure the NVRC binary copied into the rootfs and present after image build matches the freshly-built artifact via sha256 comparison.
Changes:
- Record sha256/size of built NVRC and write expected hash to a temp file.
- Verify the rootfs copy matches immediately after
cp. - Add a new post-image-build step to re-verify the packaged NVRC hash.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
What is the concern here that |
To be honest, I just wanted to make sure that we won't deal with a stale binary and assume the tests are always passing. |
|
I have another idea what about something like this During build we createh the sha256 sum, run the container capture what NVRC reported and bail out if it is not he same? This prints the NVRC version plus hash over the binary |
|
Let me also think about not using a non-crypto fingerprint. Please also take a look at the CLAUDE.md especially the section on hardened_std moving forwared with your PRs. I have a branch to roll this out. |
|
Now, when NVRC executes, we can see We have one run that enables |
|
I like the idea of #161, let me close this one in favour of it. |
Record the built NVRC sha256 and fail the workflow if the binary copied into rootfs (and still present after image build) does not match.