cis-benchmark failing

Bug #1930875 reported by Aymen Frikha
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Kubernetes Control Plane Charm
New
Undecided
Unassigned

Bug Description

After applying the cis-benchmark action to conservative using this command:
juju run-action kubernetes-master/0 cis-benchmark apply=conservative --wait

All checks are passed, but the action failed with this output:

unit-kubernetes-master-0:
  UnitId: kubernetes-master/0
  id: "16"
  message: exit status 1
  results:
    ReturnCode: 1
    Stderr: |
      Traceback (most recent call last):
        File "/var/lib/juju/agents/unit-kubernetes-master-0/charm/actions/cis-benchmark", line 368, in <module>
          apply(remediations)
        File "/var/lib/juju/agents/unit-kubernetes-master-0/charm/actions/cis-benchmark", line 201, in apply
          for test in full_json.get('tests', {}):
      AttributeError: 'list' object has no attribute 'get'
    cmd: /home/ubuntu/kube-bench/kube-bench -D /home/ubuntu/kube-bench/cfg-ck --benchmark
      cis-1.5 --noremediations --noresults run --targets master
    report: juju scp kubernetes-master/0:/home/ubuntu/kube-bench-results/results-json-iiscakal
      .
    summary: |
      == Summary ==
      45 checks PASS
      0 checks FAIL
      10 checks WARN
      10 checks INFO
  status: failed
  timing:
    completed: 2021-06-04 11:11:20 +0000 UTC
    enqueued: 2021-06-04 11:11:10 +0000 UTC
    started: 2021-06-04 11:11:11 +0000 UTC

This is the deployed bundle, its deployed on lxd containers.
https://pastebin.ubuntu.com/p/GBMGk566sd/

description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.