https://blue-build.org/ logo
MOK.priv key Github Secret issues?
# questions
b
G'day, I've only just gotten started using BlueBuild so this seems like a silly question, and I can't seem to find any proper (at least, up to date) tutorial/documentation that goes over this step specifically, but For the longest time now, for my repo I've had to upload both my MOK.der and MOK.priv keys publicly to get successful builds. Naturally, I shouldn't do this, and I should make the MOK.priv key a repo secret so it builds without needing to upload the private key file. However, I'm unsure what to name the secret, or how to edit any scripts so that the build action reads the secret. Making secrets named MOK_PRIV and SECURE_BOOT_PRIV_KEY, with the MOK.priv key inside, doesn't do anything. Again, this may be completely trivial and not appropriate for this channel, and I apologise if that's the case, I'm just looking for help with the one step I haven't completely wrapped my head around yet.
a
message has been deleted
g
Yeah, you'll want to store that private key in a secret for the repo (and also somewhere else secure). You can follow how we [do it with our base images](https://github.com/blue-build/base-images/blob/9f6d041980917b1576dd234c7fa5492704b6f99a/.github/workflows/build.yml#L63-L67)
We
skip_checkout
on the bluebuild action and do it manually and extract the key into a secret. Then in our recipe, [we pull the secret in during signing](https://github.com/blue-build/base-images/blob/9f6d041980917b1576dd234c7fa5492704b6f99a/recipes/base/post-build.yml#L4-L14)
Also be sure to create a new keypair since you pushed it to your repo. That key is leaked and inscure
b
That's strange, my build.yml didn't include that key extraction section. I copy-pasted it and tried running it and got a base64: invalid input error My image is based on the base-images repo & fedora-base-nvidia image from a couple weeks ago, if that helps with anything
After fixing the base64 error I got ERROR: failed to build: failed to stat ./MOK.priv: stat ./MOK.priv: no such file or directory As if it can't find the key, despite everything being the same as the files you sent
g
Check our workflow again. You have to do a manual checkout of your code and disable checkout on our action.
b
Thank you so much for your help! I'm terribly sorry for the bother
Fixed the workflow and figured out key base64 encryption for the action secret
a
message has been deleted
g
No bother at all
2 Views