diff --git a/agentic_security/probe_data/__init__.py b/agentic_security/probe_data/__init__.py index 4d336d7..5659725 100644 --- a/agentic_security/probe_data/__init__.py +++ b/agentic_security/probe_data/__init__.py @@ -197,7 +197,7 @@ REGISTRY_V0 = [ "dataset_name": "dayone3nder/jailbreak_prompt_JBB_sft_trainset", "num_prompts": 4785, "tokens": None, # Add actual token count if available - "is_active": True, + "is_active": False, # 401 on HF Hub since 2026-10 "approx_cost": 0.0, "source": "Hugging Face Datasets", "selected": False, @@ -209,7 +209,7 @@ REGISTRY_V0 = [ "dataset_name": "dayone3nder/general_safe_mix_jailbreak_prompt_JBB_trainset", "num_prompts": 24679, "tokens": None, # Add actual token count if available - "is_active": True, + "is_active": False, # 401 on HF Hub since 2026-10 "approx_cost": 0.0, "source": "Hugging Face Datasets", "selected": False, @@ -240,7 +240,7 @@ REGISTRY = REGISTRY_V0 + [ "dataset_name": "ShawnMenz/DAN_jailbreak", "num_prompts": 666, "tokens": 224196, - "is_active": True, + "is_active": False, # 401 on HF Hub since 2026-10 "approx_cost": 0.0, "source": "Hugging Face Datasets", "selected": False, diff --git a/tests/system/test_registry.py b/tests/system/test_registry.py index 6338e2b..6858504 100644 --- a/tests/system/test_registry.py +++ b/tests/system/test_registry.py @@ -1,26 +1,20 @@ import pytest +from huggingface_hub import HfApi from agentic_security.probe_data import REGISTRY -from datasets import load_dataset + +HF_DATASETS = [ + d + for d in REGISTRY + if "hugging" in d.get("source", "").lower() and d.get("is_active") +] +# Datasets get deleted or gated upstream; a dead REGISTRY entry silently drops +# probes from every scan. Metadata lookup only, so this stays fast (#72). @pytest.mark.slow -@pytest.mark.parametrize("dataset", REGISTRY) -def test_registry_accessibility(dataset): - source = dataset.get("source", "") - if "hugging" not in source.lower(): - return pytest.skip("skipped dataset") - if not dataset.get("is_active"): - return pytest.skip("skipped dataset") - - dataset_name = dataset.get("dataset_name") - if not dataset_name: - pytest.fail(f"No dataset_name found in {dataset}") - - # Load only metadata (no data download) - try: - ds = load_dataset(dataset_name, split=None) - # Check if metadata is accessible without loading full data - assert ds is not None, f"Failed to load metadata for {dataset_name}" - except Exception as e: - pytest.fail(f"Error loading metadata for {dataset_name}: {str(e)}") +@pytest.mark.parametrize("dataset", HF_DATASETS, ids=lambda d: d["dataset_name"]) +def test_registry_dataset_reachable(dataset): + info = HfApi().dataset_info(dataset["dataset_name"]) + assert info.id == dataset["dataset_name"] + assert not info.disabled