Commit 472d4a91 authored by Ruben ten Hove's avatar Ruben ten Hove
Browse files

feat: kube-bench

parent aeb851b4
Loading
Loading
Loading
Loading

k8s/kube-bench.yml

0 → 100644
+19 −0
Original line number Diff line number Diff line
---
k8s:kube-bench:
  stage: test
  image:
    name: bitnami/kubectl:latest
    entrypoint: [""]
  variables:
    KUBE_BENCH_MANIFEST: https://raw.githubusercontent.com/aquasecurity/kube-bench/main/job.yaml
    KUBE_BENCH_JOB_NAME: kube-bench
  script:
    - wget -O job.yaml ${KUBE_BENCH_MANIFEST}
    - kubectl delete -f job.yaml --ignore-not-found=true
    - kubectl apply -f job.yaml
    - kubectl wait -f job.yaml --for=condition=complete=true
    - kubectl logs -f jobs/${KUBE_BENCH_JOB_NAME} | tee kube-bench.xml
    - kubectl delete -f job.yaml --ignore-not-found=true
  artifacts:
    reports:
      junit: kube-bench.xml