From b7fba8ab5eb9993f76cbd09bd0ff0ec7748701bf Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 17 Mar 2026 20:22:52 -0400 Subject: [PATCH] fix: validate required url/path fields in get_sources --- fablednetmon/ansible/sources.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fablednetmon/ansible/sources.py b/fablednetmon/ansible/sources.py index cb68490..75c948f 100644 --- a/fablednetmon/ansible/sources.py +++ b/fablednetmon/ansible/sources.py @@ -34,8 +34,12 @@ def get_sources(ansible_cfg: dict) -> list[dict]: for src in sources: src_type = src.get("type", "local") if src_type == "git": + if not src.get("url"): + raise ValueError(f"Ansible git source {src['name']!r} is missing required 'url' field") path = str(Path(cache_dir) / src["name"]) else: + if not src.get("path"): + raise ValueError(f"Ansible local source {src['name']!r} is missing required 'path' field") path = src.get("path", "") result.append({ "name": src["name"],