DataDog / KubeHound

Tool for building Kubernetes attack paths
https://kubehound.io
Apache License 2.0
750 stars 41 forks source link

Embed backend docker command #200

Closed jt-dd closed 3 months ago

jt-dd commented 4 months ago

Adding backend docker command to remove kubehound.sh bash script.

./bin/build/kubehound backend --help
Handle the kubehound stack - docker compose based stack for kubehound services (mongodb, graphdb and UI)

Usage:
  kubehound backend [command]

Available Commands:
  down        Tear down the kubehound stack
  reset       Restart the kubehound stack
  up          Spawn the kubehound stack
  wipe        Wipe the persisted backend data

Flags:
  -f, --file strings   Compose configuration files
  -h, --help           help for backend

Global Flags:
      --debug   Enable debug logs

Use "kubehound backend [command] --help" for more information about a command.

Also, the backend gets automatically spawned when using the basic command ./kubehound.

Also, added an hidden command for all the spawning of the backend for the dev env:

./bin/build/kubehound dev --help
[devOnly] Spawn the kubehound dev stack for the system-tests (build from dockerfile)

Usage:
  kubehound dev [flags]
  kubehound dev [command]

Available Commands:
  system-tests [devOnly] Spawn the kubehound testing stack for the system-tests

Flags:
      --down   Tearing down the kubehound dev stack and deleting the data associated with it
  -h, --help   help for dev
      --ui     Tearing down the kubehound dev stack and deleting the data associated with it

Global Flags:
      --debug   Enable debug logs

Use "kubehound dev [command] --help" for more information about a command.

Added also a way to dump the local version : kubehound version