-
Notifications
You must be signed in to change notification settings - Fork 23
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
🐛 Prevent k8s scan panic #1773
🐛 Prevent k8s scan panic #1773
Conversation
When scanning k8s with container image discovery, it paniced. That happened because asset data was missing. Fixes #1749 Signed-off-by: Christian Zunker <[email protected]>
Signed-off-by: Christian Zunker <[email protected]>
b6c5985
to
cb535f1
Compare
Working now:
|
defaultConnection uint32 = 1 | ||
DefaultConnectionType = "aws" | ||
SshConnectionType = "ssh" | ||
RegistryImageConnectionType = "registry-image" |
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.
This removal is also part of #1707. But I removed even more here.
I had to fix this here otherwise, the AWS provider would take over the provider for some images.
assetCandidates = append(assetCandidates, inventorySpec.Inventory.Spec.Assets...) | ||
} else { | ||
assetCandidates = append(assetCandidates, runtime.Provider.Connection.Asset) | ||
processedAssets, err := providers.ProcessAssetCandidates(runtime, runtime.Provider.Connection, upstream, "") |
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.
That's the actual fix to prevent the panic.
Signed-off-by: Christian Zunker <[email protected]>
this all seems correct, i just wanna spin it up locally before merging - doing that now |
When scanning k8s with container image discovery, it paniced. That happened because asset data was missing.
Fixes #1749