
Trivy pour Kubernetes
Un analyseur de vulnérabilités simple et complet pour Kubernetes
KubeTrivy est une extension de Trivy pour Kubernetes.
KubeTrivy est un analyseur de vulnérabilités simple et complet pour Kubernetes.
KubeTrivy détecte les vulnérabilités des paquets système (Alpine, RHEL, CentOS, etc.) et des dépendances applicatives (Bundler, Composer, npm, yarn, etc.).
KubeTrivy est facile à utiliser. Il suffit d'installer le binaire et vous êtes prêt à analyser. Tout ce que vous avez à faire pour analyser est de spécifier un nom d'image de conteneur sur Kubernetes.
Consultez la documentation sur Trivy
kubectl get vulnerability ou kubetrivy get ${resourceName}$ brew tap masahiro331/kube-tirvy
$ brew install kube-trivy
$ kubetrivy -h
$ go get -u github.com/masahiro331/kube-trivy
$ kubetrivy -h
$ cat << EOS > crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: vulnerabilities.kubetrivy.io
spec:
group: kubetrivy.io
version: v1
names:
kind: Vulnerability
plural: vulnerabilities
scope: Namespaced
additionalPrinterColumns:
- name: UNKNOWN
type: integer
description: The total of vulnerabilities launched by the kubetrivy
JSONPath: .spec.statistics.UNKNOWN
- name: LOW
type: integer
description: The total of vulnerabilities launched by the kubetrivy
JSONPath: .spec.statistics.LOW
- name: MEDIUM
type: integer
description: The total of vulnerabilities launched by the kubetrivy
JSONPath: .spec.statistics.MEDIUM
- name: HIGH
type: integer
description: The total of vulnerabilities launched by the kubetrivy
JSONPath: .spec.statistics.HIGH
- name: CRITICAL
type: integer
description: The total of vulnerabilities launched by the kubetrivy
JSONPath: .spec.statistics.CRITICAL
EOS
$ kubectl apply -f crd.yaml
$ kubectl get vulnerability
$ kubetrivy -n default scan
$ kubetrivy -n default scan
$ kubectl get vulnerability -n default
$ kubetrivy -n default get ${resourceName}