Skip to content

Commit

Permalink
oobtkube should test other fields beyond .spec
Browse files Browse the repository at this point in the history
  • Loading branch information
sfowl committed Nov 6, 2024
1 parent 9307d02 commit a45336a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scanners/generic/tools/oobtkube.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def parse_obj_data(filename: str) -> dict:


def scan_with_k8s_config(cfg_file_path: str, obj_data: dict, ipaddr: str, port: int):
spec_data = obj_data.get("spec", {})
spec_data = {k: v for k, v in obj_data.items() if k not in ("kind", "apiVersion", "metadata", "status")}
total_leaf_keys = count_total_leaf_keys(spec_data)
# Apply Kubernetes config (e.g. CR for Operator, or Pod/resource for webhook)
find_leaf_keys_and_test(spec_data, cfg_file_path, ipaddr, port, total_leaf_keys)
Expand Down

0 comments on commit a45336a

Please sign in to comment.