Skip to content

Commit

Permalink
Merge pull request #1 from DataDog/jeremy/repo-structure
Browse files Browse the repository at this point in the history
[CORE] Initial repo structure
  • Loading branch information
d0g0x01 authored May 15, 2023
2 parents dbd1a5f + b63f950 commit e918373
Show file tree
Hide file tree
Showing 21 changed files with 34,581 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@

# Go workspace file
go.work

# MacOS
.DS_Store
Empty file added cmd/api-collector/.keep
Empty file.
Empty file added cmd/file-collector/.keep
Empty file.
11 changes: 11 additions & 0 deletions cmd/kubehound/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package main

import (
"github.com/DataDog/KubeHound/pkg/telemetry/log"
)

func main() {
if err := rootCmd.Execute(); err != nil {
log.I.Fatal(err.Error())
}
}
19 changes: 19 additions & 0 deletions cmd/kubehound/root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package main

import (
"context"

"github.com/DataDog/Kubehound/pkg/kubehound/core"
"github.com/spf13/cobra"
)

var (
rootCmd = &cobra.Command{
Use: "kubehound-local",
Short: "A local Kubehound instance",
Long: `A local instance of Kubehound - a Kubernetes attack path generator`,
RunE: func(cmd *cobra.Command, args []string) error {
return core.Launch(context.Background())
},
}
)
25 changes: 25 additions & 0 deletions deployments/kubehound/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: "3.7"

services:
mongodb:
image: mongo
container_name: storedb
ports:
- "27017:27017"
volumes:
- ./data/mongodb:/data/db
networks:
- kubenet

janusgraph:
image: janusgraph/janusgraph:latest
container_name: graphdb-ng
ports:
- "8182:8182"
volumes:
- ./data/janus:/data
networks:
- kubenet

networks:
kubenet:
5 changes: 5 additions & 0 deletions deployments/kubehound/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -e

# Spin up the compose with neo4j, mongodb, etc
docker-compose up --force-recreate
6 changes: 6 additions & 0 deletions deployments/kubehound/wipe-data.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -e

rm -r ./data/mongodb/
rm -r ./data/neo4j/
rm -r ./data/janus/
Loading

0 comments on commit e918373

Please sign in to comment.