From 6814550f0f68aafe8b2b4a8582562e1ada503677 Mon Sep 17 00:00:00 2001 From: Danny Burrow Date: Sat, 28 Mar 2026 19:16:15 +0100 Subject: [PATCH 1/2] fix: catch IndexError in _cilium_endpoint_get, add Repository URL --- hubble_audit2policy.py | 2 +- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hubble_audit2policy.py b/hubble_audit2policy.py index 0e35bc2..139d7d1 100755 --- a/hubble_audit2policy.py +++ b/hubble_audit2policy.py @@ -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..1a5979e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] From d594a98ed80cca3ace92bbf12a5a3582ac545e7d Mon Sep 17 00:00:00 2001 From: Danny Burrow Date: Sat, 28 Mar 2026 19:16:15 +0100 Subject: [PATCH 2/2] chore: bump version to 0.7.4 --- hubble_audit2policy.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hubble_audit2policy.py b/hubble_audit2policy.py index 139d7d1..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" diff --git a/pyproject.toml b/pyproject.toml index 1a5979e..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"