-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Protect against go-uefi panics #113
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #113 +/- ##
=======================================
Coverage 53.18% 53.18%
=======================================
Files 16 16
Lines 1115 1115
=======================================
Hits 593 593
Misses 424 424
Partials 98 98 ☔ View full report in Codecov by Sentry. |
no, this is not working because they EXIT directly, crap |
Maybe try to fix it upstream by returning an error instead of panicing: https://github.com/Foxboron/go-uefi/blob/48be911532c2b39532bd26b01f425530b8e33244/efi/signature/signature_list.go#L306 ? That function can already return errors, I wonder why it should ever panic. |
ouch, but I'd say it is safe to add a recover statement nevertheless as it is a very delicate portion of the stack |
just gonna disable it as this its needed NOW, will submit patches after |
seem like go-uefo calls os.exit directly if something fails instead of either panicking (which is recoverable) or returning an error(so the caller can act on that) Disable this for now until we get a proper error handling submitted upstream Signed-off-by: Itxaka <itxaka@kairos.io>
) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/kairos-io/kairos-sdk](https://togithub.com/kairos-io/kairos-sdk) | `v0.1.5` -> `v0.1.6` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fkairos-io%2fkairos-sdk/v0.1.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fkairos-io%2fkairos-sdk/v0.1.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fkairos-io%2fkairos-sdk/v0.1.5/v0.1.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fkairos-io%2fkairos-sdk/v0.1.5/v0.1.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>kairos-io/kairos-sdk (github.com/kairos-io/kairos-sdk)</summary> ### [`v0.1.6`](https://togithub.com/kairos-io/kairos-sdk/releases/tag/v0.1.6) [Compare Source](https://togithub.com/kairos-io/kairos-sdk/compare/v0.1.5...v0.1.6) #### What's Changed - Protect against go-uefi panics by [@​Itxaka](https://togithub.com/Itxaka) in [https://github.com/kairos-io/kairos-sdk/pull/113](https://togithub.com/kairos-io/kairos-sdk/pull/113) **Full Changelog**: kairos-io/kairos-sdk@v0.1.5...v0.1.6 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 11pm every weekday,before 7am every weekday,every weekend" in timezone Europe/Brussels, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/kairos-io/provider-kairos). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjM1MS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This reverts commit c643cb5.
Seems that when things go wrong with go-uefi listing the certs it panics instead of returning an error.
try to catch that and return normally as this data is optional and we dont want to stop the execution of the state due to this