fix: reject unknown ecosystems instead of silently defaulting to pypi

This commit is contained in:
Marker689
2026-05-11 19:59:47 +03:00
parent a6cd20e41c
commit fb5559b8b7
3 changed files with 25 additions and 5 deletions

View File

@@ -112,8 +112,8 @@ def test_detect_ecosystem_npm():
def test_detect_ecosystem_unknown():
from guarddog_nexus.routes.webhooks import _detect_ecosystem
assert _detect_ecosystem({"format": "maven"}) == "pypi" # unknown → default
assert _detect_ecosystem({}) == "pypi" # default
assert _detect_ecosystem({"format": "maven"}) is None
assert _detect_ecosystem({}) is None
# --- Go/npm webhook integration ---