-
Notifications
You must be signed in to change notification settings - Fork 220
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
support k8s version and lastAppliedResource
#1345
Comments
Great @chen-keinan ! Can you please help me how I can run this analyzes in trivy-operator to get the outdated apis? I still don‘t understand it … sorry! |
@jkleinlercher Note: the fix has been merged to upstream but not yet released. |
@jkleinlercher example : apiVersion: aquasecurity.github.io/v1alpha1
kind: ConfigAuditReport
metadata:
annotations:
trivy-operator.aquasecurity.github.io/report-ttl: 24h0m0s
creationTimestamp: "2023-07-10T19:20:44Z"
generation: 1
labels:
plugin-config-hash: 659b7b9c46
resource-spec-hash: 55b58d8898
trivy-operator.resource.kind: CronJob
trivy-operator.resource.name: demo-deprecated-cron-job
trivy-operator.resource.namespace: default
name: cronjob-demo-deprecated-cron-job
namespace: default
ownerReferences:
- apiVersion: batch/v1
blockOwnerDeletion: false
controller: true
kind: CronJob
name: demo-deprecated-cron-job
uid: 27df88e2-48c2-421b-8428-67517df3251e
resourceVersion: "1298"
uid: 0c85d50b-e1ad-43f1-9a91-3708a5d3ad02
report:
checks:
- category: Kubernetes Security Check
checkID: KSV030
description: The RuntimeDefault/Localhost seccomp profile must be required, or
allow specific additional profiles.
messages:
- Either Pod or Container should set 'securityContext.seccompProfile.type' to
'RuntimeDefault'
severity: LOW
success: false
title: Default Seccomp profile not set
- category: Kubernetes Security Check
checkID: KSV107
description: 'apiVersion ''batch/v1beta1'' and kind ''CronJob'' has been deprecated
on: ''v1.21'' and planned for removal on:''v1.25'''
messages:
- |-
apiVersion 'batch/v1beta1' and kind ‘CronJob' should be replaced with the new API 'batch.v1.CronJob'
See https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/api/batch/v1beta1/zz_generated.prerelease-lifecycle.go
severity: LOW
success: false
title: Evaluate k8s deprecated and removed APIs |
@jkleinlercher |
I tried it today. CronJob is working but HorizontalPodAutoscaler is not working. I tested with https://github.com/suxess-it/deprecated-k8s-api-testcase/blob/main/hpa-deprecated.yaml . |
@jkleinlercher |
@chen-keinan I created issue #1384 . thank you! |
it is require to add support for k8s version and
lastAppliedResource
annotation check for outdated-api capabilities to be able to detect converted resourcesThe text was updated successfully, but these errors were encountered: