deprecatedAPI scanning in K8s cluster not working as expected #4778
Closed
jkleinlercher
started this conversation in
Bugs
Replies: 3 comments 3 replies
-
@jkleinlercher have you used the k8s version flag : |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi @jkleinlercher -- thank you for pointing out the inconsistency between the docs and the tutorial -- I will update the tutorial |
Beta Was this translation helpful? Give feedback.
2 replies
-
@jkleinlercher I have created an issue #4784 for investigation |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I applied a cronjob described in https://github.com/suxess-it/deprecated-k8s-api-testcase/blob/main/cronjob-deprecated.yaml and when scanning the yaml with "trivy conf cronjob-deprecated.yaml" it correctly says
apiVersion 'batch/v1beta1' and kind 'CronJob' has been deprecated on: 'v1.21' and planned for removal on:'v1.25'
However, after applying the manifest to the K8s cluster and run "trivy kubernetes --report all -n dep-apis-test all" I don't get any deprecatedAPI misconfiguration.
Desired Behavior
trivy should show "apiVersion 'batch/v1beta1' and kind 'CronJob' has been deprecated on: 'v1.21' and planned for removal on:'v1.25'" alert while scanning the cluster.
Actual Behavior
trivy doesn't recognize the deprecated API.
Reproduction Steps
Target
Kubernetes
Scanner
Misconfiguration
Output Format
None
Mode
Client/Server
Debug Output
Operating System
ubuntu
Version
Checklist
trivy image --reset
Beta Was this translation helpful? Give feedback.
All reactions