Multi-tier framework for evaluating AI agent skills and plugins with quality gates, security scanning, harness compatibility checks, semantic overlap detection, synthetic evaluation dataset generation, and live agent evaluation that measures how skills affect agent behavior. Ships reusable CI templates that bring every check to any repository.
Python agent-evaluationagent-pluginsagent-securityagent-skillsagentic-aibenchmarkci-templatesclaude-codecodexevaluateevaluationharnesspluginplugin-evaluationsecurity-scannerskill-evalskill-evaluationskill-evaluatorskill-gap-analysisskills
fix(security): accept fully covered documentation scans (#143)
Deepak Jain (DJ)d4bcb3f77111
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 2cc5e0f6..5acfb2cc 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -24,6 +24,9 @@ All notable changes to SkillEvaluator are documented in this file.### Fixed+- Fully covered documentation-only skills no longer fail security validation+ solely because non-applicable SkillSpector analyzers report a partial status+ ([#137](https://github.com/NVIDIA/SkillEvaluator/issues/137)).- Malformed, non-UTF-8, or unreadable bundled and custom policy files nowproduce path-specific CLI errors instead of leaking raw parser or I/O errors([#128](https://github.com/NVIDIA/SkillEvaluator/issues/128)).diff --git a/src/skillevaluator/validators/security.py b/src/skillevaluator/validators/security.pyindex be2bcb30..c18215de 100644--- a/src/skillevaluator/validators/security.py+++ b/src/skillevaluator/validators/security.py@@ -57,6 +57,16 @@ _SKILLSPECTOR_POLICY_EXIT_CODES = frozenset({0, 1})_SKILLSPECTOR_STATUSLESS_COMPLETENESS_VERSIONS = {(2, 9, 5), (2, 9, 6)}_SKILLSPECTOR_FINDING_IDENTITY_VERSION = (2, 11, 1)_SKILLSPECTOR_COMPLETENESS_SCHEMA_VERSION = (2, 10, 0)+_SKILLSPECTOR_DOCS_ONLY_APPLICABILITY_VERSION = (2, 11, 2)+_SKILLSPECTOR_DOCS_ONLY_NOT_APPLICABLE_ANALYZERS = frozenset(+ {+ "behavioral_ast",+ "behavioral_taint_tracking",+ "bundled_execution_surface",+ "mcp_least_privilege",+ "meta_analyzer",+ }+)_SKILLSPECTOR_SEMANTIC_ANALYZERS = frozenset({"semantic_developer_intent",@@ -1078,6 +1088,8 @@ class SecurityValidator(ValidatorBase):expected_limitations: list[str] = []observed_analyzer_ids: set[str] = set()analyzer_evidence: dict[str, list[tuple[str, dict[str, int]]]] = {}+ not_applicable_analyzer_ids: set[str] = set()+ not_applicable_evidence_valid = Truefor index, analyzer_status in enumerate(analyzer_statuses):if not isinstance(analyzer_status, dict):result.add_error(@@ -1188,6 +1200,12 @@ class SecurityValidator(ValidatorBase):if isinstance(message, str) and messageelse f"Analyzer {analyzer_id} status: {analyzer_state}.")+ elif analyzer_state == "not_applicable":+ not_applicable_analyzer_ids.add(analyzer_id)+ not_applicable_evidence_valid &= (+ analyzer_status.get("reason_code") == "no_applicable_files"+ and not any(analyzer_counts.values())+ )elif analyzer_state not in {"completed", "not_applicable"}:result.add_error("skillspector JSON field 'analysis_completeness.analyzer_statuses' reports "@@ -1214,7 +1232,39 @@ class SecurityValidator(ValidatorBase):"missing required analyzer evidence; security scan did not complete")return False- if (is_complete or uses_statusless_completeness_schema) and counts["total_components"]:+ docs_only_analyzer_states_valid = all(+ all(+ state+ == (+ "not_applicable"+ if analyzer_id in _SKILLSPECTOR_DOCS_ONLY_NOT_APPLICABLE_ANALYZERS+ else "completed"+ )+ for state, _accounting in analyzer_evidence[analyzer_id]+ )+ for analyzer_id in required_analyzer_ids+ )+ complete_by_applicability = (+ uses_completeness_schema+ and skillspector_version == _SKILLSPECTOR_DOCS_ONLY_APPLICABILITY_VERSION+ and not is_complete+ and completeness_status == "partial"+ and coverage_percent == 100+ and counts["partially_inspected_files"] == 0+ and counts["entirely_uninspected_files"] == 0+ and not ledger_exceptions+ and not limitations+ and report_metadata.get("has_executable_scripts") is False+ and not_applicable_analyzer_ids+ == _SKILLSPECTOR_DOCS_ONLY_NOT_APPLICABLE_ANALYZERS+ and not_applicable_evidence_valid+ and docs_only_analyzer_states_valid+ )+ if (+ is_complete+ or uses_statusless_completeness_schema+ or complete_by_applicability+ ) and counts["total_components"]:universal_analyzer_ids = _SKILLSPECTOR_COMMON_UNIVERSAL_ANALYZERS | ({"artifact_integrity"} if uses_completeness_schema else set())@@ -1307,7 +1357,7 @@ class SecurityValidator(ValidatorBase):"security scan did not complete")return False- else:+ elif not complete_by_applicability:if not (counts["partially_inspected_files"]or counts["entirely_uninspected_files"]diff --git a/tests/validators/test_security.py b/tests/validators/test_security.pyindex 3458b2a5..91127392 100644--- a/tests/validators/test_security.py+++ b/tests/validators/test_security.py@@ -51,6 +51,13 @@ _SKILLSPECTOR_SEMANTIC_ANALYZERS = ("semantic_quality_policy","semantic_security_discovery",)+_SKILLSPECTOR_2_11_2_DOCS_ONLY_NOT_APPLICABLE_ANALYZERS = {+ "behavioral_ast",+ "behavioral_taint_tracking",+ "bundled_execution_surface",+ "mcp_least_privilege",+ "meta_analyzer",+}_SKILLSPECTOR_UNIVERSAL_ANALYZERS = {analyzer_idfor analyzer_id in _SKILLSPECTOR_2_10_REQUIRED_ANALYZERS@@ -206,6 +213,47 @@ def _set_universal_analyzer_work(payload: dict) -> None:status["partial"] = 0+def _skillspector_documentation_only_report() -> dict:+ """Return the exact SkillSpector 2.11.2 docs-only applicability shape."""+ payload = _skillspector_json_report()+ payload["metadata"]["skillspector_version"] = "2.11.2"+ payload["components"] = [{"path": "SKILL.md", "executable": False}]+ payload["analysis_completeness"].update(+ {+ "total_components": 1,+ "scanned_components": 1,+ "fully_inspected_files": 1,+ "is_complete": False,+ "status": "partial",+ }+ )+ payload["analysis_completeness"]["analyzer_statuses"].append(+ {+ "analyzer_id": "bundled_execution_surface",+ "status": "not_applicable",+ "planned_work": 0,+ "completed": 0,+ "partial": 0,+ "skipped": 0,+ "failed": 0,+ "unaccounted": 0,+ "reason_code": "no_applicable_files",+ }+ )+ for status in payload["analysis_completeness"]["analyzer_statuses"]:+ if status["analyzer_id"] in _SKILLSPECTOR_2_11_2_DOCS_ONLY_NOT_APPLICABLE_ANALYZERS:+ status.update(+ {+ "status": "not_applicable",+ "planned_work": 0,+ "completed": 0,+ "reason_code": "no_applicable_files",+ }+ )+ _set_universal_analyzer_work(payload)+ return payload++def _user_facing_reports(result: ValidationResult) -> list[str]:"""Render every Tier 1 user-facing report surface for redaction checks."""return [@@ -2206,6 +2254,105 @@ Call us at 555-123-4567 or +1-555-987-6543assert not result.errorsassert any(detail.check_name == "skillspector" for detail in result.success_details)+ @patch("skillevaluator.validators.security.Tools")+ def test_skillspector_accepts_fully_covered_documentation_only_report(+ self,+ mock_tools,+ sample_skill_dir: Path,+ ) -> None:+ payload = _skillspector_documentation_only_report()++ result = _validate_skillspector_payload(mock_tools, sample_skill_dir, payload)++ assert result.passed+ assert not result.errors+ assert any(detail.check_name == "skillspector" for detail in result.success_details)++ @pytest.mark.parametrize(+ "invalid_evidence",+ ["unexpected-not-applicable", "wrong-reason", "unsupported-version"],+ )+ @patch("skillevaluator.validators.security.Tools")+ def test_skillspector_documentation_only_exception_requires_exact_applicability_evidence(+ self,+ mock_tools,+ sample_skill_dir: Path,+ invalid_evidence: str,+ ) -> None:+ payload = _skillspector_documentation_only_report()+ statuses = payload["analysis_completeness"]["analyzer_statuses"]+ if invalid_evidence == "unexpected-not-applicable":+ status = next(item for item in statuses if item["analyzer_id"] == "mcp_tool_poisoning")+ status.update(+ {+ "status": "not_applicable",+ "planned_work": 0,+ "completed": 0,+ "reason_code": "no_applicable_files",+ }+ )+ elif invalid_evidence == "wrong-reason":+ status = next(item for item in statuses if item["analyzer_id"] == "behavioral_ast")+ status["reason_code"] = "disabled_by_configuration"+ else:+ payload["metadata"]["skillspector_version"] = "2.11.3"++ result = _validate_skillspector_payload(mock_tools, sample_skill_dir, payload)++ assert result.is_incomplete+ assert not any(detail.check_name == "skillspector" for detail in result.success_details)++ @pytest.mark.parametrize(+ "incomplete_detail",+ [+ pytest.param({"coverage_percent": 0}, id="missing-coverage"),+ pytest.param({"partially_inspected_files": 1}, id="partially-inspected"),+ pytest.param({"limitations": ["Analyzer failed."]}, id="limitation"),+ pytest.param({"ledger_exceptions": [{"fatal": False}]}, id="ledger-exception"),+ ],+ )+ @patch("skillevaluator.validators.security.Tools")+ def test_skillspector_documentation_only_exception_requires_full_coverage(+ self,+ mock_tools,+ sample_skill_dir: Path,+ incomplete_detail: dict,+ ) -> None:+ payload = _skillspector_json_report()+ payload["analysis_completeness"].update(+ {+ "is_complete": False,+ "status": "partial",+ **incomplete_detail,+ }+ )+ payload["analysis_completeness"]["analyzer_statuses"][0].update(+ {"status": "not_applicable", "planned_work": 0, "completed": 0}+ )++ result = _validate_skillspector_payload(mock_tools, sample_skill_dir, payload)++ assert result.is_incomplete+ assert not any(detail.check_name == "skillspector" for detail in result.success_details)++ @patch("skillevaluator.validators.security.Tools")+ def test_skillspector_executable_skill_cannot_use_documentation_only_exception(+ self,+ mock_tools,+ sample_skill_dir: Path,+ ) -> None:+ payload = _skillspector_json_report()+ payload["metadata"]["has_executable_scripts"] = True+ payload["analysis_completeness"].update({"is_complete": False, "status": "partial"})+ payload["analysis_completeness"]["analyzer_statuses"][0].update(+ {"status": "not_applicable", "planned_work": 0, "completed": 0}+ )++ result = _validate_skillspector_payload(mock_tools, sample_skill_dir, payload)++ assert result.is_incomplete+ assert not any(detail.check_name == "skillspector" for detail in result.success_details)+@pytest.mark.parametrize("version", ["2.9.5-safe", "2.9.6", "2.11.1-safe"])@patch("skillevaluator.validators.security.Tools")def test_skillspector_accepts_captured_no_llm_report(