-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(doc): fix various inconsistencies.
- Loading branch information
Showing
28 changed files
with
189 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,33 +17,37 @@ _DSL definition code available [here](https://github.com/DataDog/KubeHound/blob/ | |
|
||
### Retrieve cluster data | ||
|
||
| Method | Gremlin equivalent | | ||
| --------------------------- | ----------------------------------------------------- | | ||
| `.cluster([string...])` | `.hasLabel("Cluster")` | | ||
| `.containers([string...])` | `.hasLabel("Container")` | | ||
| `.endpoints([int])` | `.hasLabel("Endpoint")` | | ||
| `.groups([string...])` | `.hasLabel("Group")` | | ||
| `.hostMounts([string...])` | `.hasLabel("Volume").has("type", "HostPath")` | | ||
| `.nodes([string...])` | `.hasLabel("Node")` | | ||
| `.permissions([string...])` | `.hasLabel("PermissionSet")` | | ||
| `.pods([string...])` | `.hasLabel("Pod")` | | ||
| `.run([string...])` | `.has("runID", P.within(ids)` | | ||
| `.sas([string...])` | `.hasLabel("Identity").has("type", "ServiceAccount")` | | ||
| `.services([string...])` | `.hasLabel("Endpoint").has("exposure", EXTERNAL)` | | ||
| `.users([string...])` | `.hasLabel("Identity").has("type", "User")` | | ||
| `.volumes([string...])` | `.hasLabel("Volume")` | | ||
> These methods are defined in the [`KubeHoundTraversalSourceDsl`](https://github.com/DataDog/KubeHound/blob/main/deployments/kubehound/graph/dsl/kubehound/src/main/java/com/datadog/ase/kubehound/KubeHoundTraversalSourceDsl.java) class. | ||
| Method | Gremlin equivalent | Example usage | | ||
| --------------------------- | ----------------------------------------------------- | --------------------------------------------------------------------------- | | ||
| `.cluster([string...])` | `.hasLabel("Cluster")` | `kh.cluster("kind-kubehound.local")` | | ||
| `.containers([string...])` | `.hasLabel("Container")` | `kh.cluster("kind-kubehound.local").containers("nginx")` | | ||
| `.endpoints([int])` | `.hasLabel("Endpoint")` | `kh.cluster("kind-kubehound.local").endpoints(3)` | | ||
| `.hostMounts([string...])` | `.hasLabel("Volume").has("type", "HostPath")` | `kh.cluster("kind-kubehound.local").hostMounts("/proc")` | | ||
| `.nodes([string...])` | `.hasLabel("Node")` | `kh.cluster("kind-kubehound.local").nodes("control-plane")` | | ||
| `.permissions([string...])` | `.hasLabel("PermissionSet")` | `kh.cluster("kind-kubehound.local").permissions("system::kube-controller")` | | ||
| `.pods([string...])` | `.hasLabel("Pod")` | `kh.cluster("kind-kubehound.local").pods("app-pod")` | | ||
| `.run([string...])` | `.has("runID", P.within(ids)` | `kh.run("01he5ebh73tah762qgdd5k4wqp")` | | ||
| `.services([string...])` | `.hasLabel("Endpoint").has("exposure", EXTERNAL)` | `kh.cluster("kind-kubehound.local").services("app-front-proxy")` | | ||
| `.sas([string...])` | `.hasLabel("Identity").has("type", "ServiceAccount")` | `kh.cluster("kind-kubehound.local").sas("postgres-admin")` | | ||
| `.users([string...])` | `.hasLabel("Identity").has("type", "User")` | `kh.cluster("kind-kubehound.local").users("[email protected]")` | | ||
| `.groups([string...])` | `.hasLabel("Identity").has("type", "Group")` | `kh.cluster("kind-kubehound.local").groups("engineering")` | | ||
| `.volumes([string...])` | `.hasLabel("Volume")` | `kh.cluster("kind-kubehound.local").volumes("db-data")` | | ||
|
||
### Retrieving attack oriented data | ||
|
||
> These methods are defined in the [`KubeHoundTraversalDsl`](https://github.com/DataDog/KubeHound/blob/main/deployments/kubehound/graph/dsl/kubehound/src/main/java/com/datadog/ase/kubehound/KubeHoundTraversalDsl.java) class. | ||
| Method | Gremlin equivalent | | ||
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `.attacks()` | `.outE().inV().path()` | | ||
| `.critical()` | `.has("critical", true)` | | ||
| `.criticalPaths(int)` | see [KubeHoundTraversalDsl.java](https://github.com/DataDog/KubeHound/blob/main/deployments/kubehound/kubegraph/dsl/kubehound/src/main/java/com/datadog/ase/kubehound/KubeHoundTraversalDsl.java) | | ||
| `.criticalPathsFilter(int, string...)` | see [KubeHoundTraversalDsl.java](https://github.com/DataDog/KubeHound/blob/main/deployments/kubehound/kubegraph/dsl/kubehound/src/main/java/com/datadog/ase/kubehound/KubeHoundTraversalDsl.java) | | ||
| `.criticalPathsFreq([maxHops])` | see [KubeHoundTraversalDsl.java](https://github.com/DataDog/KubeHound/blob/main/deployments/kubehound/kubegraph/dsl/kubehound/src/main/java/com/datadog/ase/kubehound/KubeHoundTraversalDsl.java) | | ||
| `.criticalPaths(int)` | see [KubeHoundTraversalDsl.java](https://github.com/DataDog/KubeHound/blob/main/deployments/kubehound/graph/dsl/kubehound/src/main/java/com/datadog/ase/kubehound/KubeHoundTraversalDsl.java) | | ||
| `.criticalPathsFilter(int, string...)` | see [KubeHoundTraversalDsl.java](https://github.com/DataDog/KubeHound/blob/main/deployments/kubehound/graph/dsl/kubehound/src/main/java/com/datadog/ase/kubehound/KubeHoundTraversalDsl.java) | | ||
| `.criticalPathsFreq([maxHops])` | see [KubeHoundTraversalDsl.java](https://github.com/DataDog/KubeHound/blob/main/deployments/kubehound/graph/dsl/kubehound/src/main/java/com/datadog/ase/kubehound/KubeHoundTraversalDsl.java) | | ||
| `.hasCriticalPath()` | `.where(__.criticalPaths().limit(1))` | | ||
| `.minHopsToCritical([maxHops])` | see [KubeHoundTraversalDsl.java](https://github.com/DataDog/KubeHound/blob/main/deployments/kubehound/kubegraph/dsl/kubehound/src/main/java/com/datadog/ase/kubehound/KubeHoundTraversalDsl.java) | | ||
| `.minHopsToCritical([maxHops])` | see [KubeHoundTraversalDsl.java](https://github.com/DataDog/KubeHound/blob/main/deployments/kubehound/graph/dsl/kubehound/src/main/java/com/datadog/ase/kubehound/KubeHoundTraversalDsl.java) | | ||
|
||
For more detailed explanation, please see below. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.