SamuraiWTF / katana

SamuraiWTF package management tool and interface.
22 stars 8 forks source link

Mutillidae and DVWA containers install is failing with TypeError: iImage' object is not subscriptable #51

Closed JGillam closed 2 years ago

JGillam commented 2 years ago

This is specific to the updates/2022-02-rollup changes to setup reverse proxy for each target.

File "/home/samurai/katana/provisioners/DefaultProvisioner.py", line 71, in _run_task
    result, msg = method_to_call(task.get(task_type))
  File "/home/samurai/katana/plugins/Docker.py", line 29, in install
    image_id = client.images.pull(params.get('image'))[0].id
TypeError: 'Image' object is not subscriptable

It's a bit odd that this is happening now since it has nothing to do with the proxy configuration. This appears to be failing on docker image pull. It is possible the new DockerProvisioner (experimental) may work better for this. Probably worth a go.

JGillam commented 2 years ago

I think this is resolved. Doing some more testing. It seems the docker python sdk can either return a list of image objects or a single image object (i.e. not in a list). Previously I thought it just returned a list even if it only had one item in it... which makes more sense to be, but I guess someone got tired of typing [0] when there is only one image.

Anyhow, this should be resolved shortly.