-
Notifications
You must be signed in to change notification settings - Fork 17
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
🐛 Fix vuln command panic #979
Conversation
Fixes #977 Signed-off-by: Christian Zunker <[email protected]>
Works again:
|
Features: conf.Features, | ||
Asset: cliRes.Asset, | ||
Upstream: runtime.UpstreamConfig, | ||
}, nil) | ||
}) | ||
if err != nil { | ||
log.Fatal().Err(err).Msg("could not load asset information") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove the fatal here and follow the same pattern as here #900? We want to exit properly instead of panicking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that easy. I gave it a try. The current structs do not support it. We would need to change cnquery, and than preferably also all the other commands associated with the struct: shell
, run
, and scan
.
That would blow up this PR and log.Fatal already exits with os.Exit(1)
and does not panic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright, let's leave that out. Need to fix the tests though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Signed-off-by: Christian Zunker <[email protected]>
Signed-off-by: Christian Zunker <[email protected]>
Signed-off-by: Christian Zunker <[email protected]>
Signed-off-by: Christian Zunker <[email protected]>
Fixes #977