diff --git a/hubble_audit2policy.py b/hubble_audit2policy.py index 0e35bc2..5b09ffd 100755 --- a/hubble_audit2policy.py +++ b/hubble_audit2policy.py @@ -8,7 +8,7 @@ from __future__ import annotations -__version__ = "0.7.3" +__version__ = "0.7.4" __author__ = "noexecstack" __license__ = "Apache-2.0" @@ -224,7 +224,7 @@ def _cilium_endpoint_get(cilium_pod: str, endpoint_id: int) -> dict[str, Any] | data: Any = json.loads(raw) ep: dict[str, Any] = cast(dict[str, Any], data[0] if isinstance(data, list) else data) return ep - except (RuntimeError, json.JSONDecodeError) as exc: + except (RuntimeError, json.JSONDecodeError, IndexError, KeyError) as exc: LOG.warning("cilium endpoint get %d failed on %s: %s", endpoint_id, cilium_pod, exc) return None diff --git a/pyproject.toml b/pyproject.toml index c71bb22..ff431d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "hubble-audit2policy" -version = "0.7.3" +version = "0.7.4" description = "Generate least-privilege CiliumNetworkPolicy YAML from Hubble flow logs." readme = "README.md" license = "Apache-2.0" @@ -33,6 +33,7 @@ hubble-audit2policy = "hubble_audit2policy:main" [project.urls] Homepage = "https://github.com/noexecstack/hubble-audit2policy" +Repository = "https://github.com/noexecstack/hubble-audit2policy" Issues = "https://github.com/noexecstack/hubble-audit2policy/issues" [tool.setuptools.package-data]