Skip to content
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

Prisma Cloud's scan reported Private Key found in keda-metrics-apiserver #4869

Closed
edwardccg opened this issue Aug 8, 2023 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@edwardccg
Copy link

edwardccg commented Aug 8, 2023

Report

Our cluster's integrated with Prisma Defender, it reported that Private Key was found in keda-metrics-apiserver:2.9.2.

Cause
Found: /apiserver.local.config/certificates/apiserver.key

Expected Behavior

There's should be no private key stored inside an image.

Actual Behavior

Private key is stored in image

Steps to Reproduce the Problem

Private key was detected in /apiserver.local.config/certificates/apiserver.key

Logs from KEDA operator

N/A

KEDA Version

2.9.2

Kubernetes Version

None

Platform

Microsoft Azure

Scaler Details

No response

Anything else?

Please advise if this private key is required for the keda-metrics-apiserver to be function. If not required, we should remediate and externalize the keys from image. If required, we need some inputs to document why the key is required. Thank you.

@edwardccg edwardccg added the bug Something isn't working label Aug 8, 2023
@JorTurFer
Copy link
Member

Hi,
That key isn't stored in the image, it's generated on the fly by the metrics server during the startup if you don't provide it.
How to provide your own certificate is explained here: https://keda.sh/docs/2.11/faq/

image

This certificate has been removed in KEDA v2.10 in favor of external certificates (managed by KEDA as minimum, using an external tool like cert-manager as recommended)
You can find how to use your own certificates in KEDA > v2.10 here and also a blog-post with an example for cert-manager here

I close this issue as solved because the file isn't used anymore, but you can reopen it if you think that there is still something that needs to be fixed 😄

@JorTurFer JorTurFer closed this as not planned Won't fix, can't repro, duplicate, stale Aug 13, 2023
@edwardccg
Copy link
Author

Thank you for the information, we do use cert manager, I will have a look on v2.10 and implement that.

@JorTurFer
Copy link
Member

Just upgrading KEDA, the issue should be solved with the certificate managed by KEDA operator through k8s secrets

@edwardccg
Copy link
Author

Thanks! I have upgraded to current latest version of 2.11.2 and Prisma Cloud is all green for the container running in keda namespaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants