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
feat(report): show the SkillSpector version in the Tier 1 HTML card (#187)
Narendran Raghavanc6ad8e4cdb48
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 7e669fdf..19f1a991 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -4,6 +4,15 @@ All notable changes to SkillEvaluator are documented in this file.## Unreleased+### Added++- The HTML report's Tier 1 card now shows the SkillSpector version that ran+ the security scan (for example `SkillSpector v2.12.0`), and the embedded+ report JSON records it as `skillspector_versions`. Findings depend on the+ scanner release, so reviewers can tell which SkillSpector produced them+ without rerunning the scan. The version is shown even when the report omits+ its timestamp.+### Fixed- Preserved multiline skill descriptions when saving and loading Tier 2diff --git a/src/skillevaluator/reporting/html.py b/src/skillevaluator/reporting/html.pyindex c4af80e3..e2ecdc2c 100644--- a/src/skillevaluator/reporting/html.py+++ b/src/skillevaluator/reporting/html.py@@ -24,6 +24,7 @@ import hashlibimport jsonimport mathimport pkgutil+import refrom dataclasses import dataclassfrom datetime import UTC, datetimefrom importlib import resources@@ -48,6 +49,9 @@ if TYPE_CHECKING:_TIER2_VALIDATOR_MARKERS = ("similarity", "dedup", "context optimization")+# SkillSpector reports ``metadata.skillspector_version`` as a bare semantic+# version. Anything else is dropped rather than echoed into the report.+_SKILLSPECTOR_VERSION_RE = re.compile(r"\d{1,6}\.\d{1,6}\.\d{1,6}(?:[-+][0-9A-Za-z.-]{1,64})?")# Tier 3 already enforces a 2 MiB canonical payload limit. HTML needs a# separate bound because script-safe escaping (``<`` -> ``\u003c``), pretty@@ -147,6 +151,17 @@ def _bounded_tier3_preview(payload: dict[str, Any] | None) -> tuple[dict[str, Anreturn preview, notice+def _skillspector_versions(results: list[ValidationResult]) -> list[str]:+ """Return the distinct SkillSpector versions recorded on ``results``, in first-seen order."""+ versions: dict[str, None] = {}+ for result in results:+ metadata = result.metadata if isinstance(result.metadata, dict) else {}+ raw_version = metadata.get("skillspector_version")+ if isinstance(raw_version, str) and _SKILLSPECTOR_VERSION_RE.fullmatch(raw_version.strip()):+ versions.setdefault(raw_version.strip(), None)+ return list(versions)++def is_tier2_validator_name(validator_name: str | None) -> bool:"""Return whether a validator name belongs to Tier 2 reporting."""normalized_name = " ".join((validator_name or "").casefold().replace("_", " ").replace("-", " ").split())@@ -1147,6 +1162,7 @@ class HTMLReporter(ReporterBase):# from the global aggregate counters.tier1_results, tier2_results, tier3_results = self._split_results_by_tier(results)tier1_summary = self._compute_tier_summary(tier1_results)+ tier1_skillspector_versions = _skillspector_versions(tier1_results)tier2_summary = self._compute_tier_summary(tier2_results)tier3_summary = self._compute_tier_summary(tier3_results)tier3_data = self._tier3_report_data(tier3_results)@@ -1314,6 +1330,7 @@ class HTMLReporter(ReporterBase):# copy inside ``#report-data``."tier3": {"$ref": "#tier3-full"} if tier3_data else None,"gating": gating,+ "skillspector_versions": tier1_skillspector_versions,}report_json = (json.dumps(report_data, indent=2, allow_nan=False)@@ -1390,6 +1407,7 @@ class HTMLReporter(ReporterBase):tier3_truncation=tier3_truncation,tier3_preview_notice=tier3_preview_notice,tier1_summary=tier1_summary,+ skillspector_versions=tier1_skillspector_versions,tier2_summary=tier2_summary,tier3_summary=tier3_summary,tier1_display_results=tier1_display_results,diff --git a/src/skillevaluator/reporting/templates/report.html.j2 b/src/skillevaluator/reporting/templates/report.html.j2index b1a083af..c7a7aed7 100644--- a/src/skillevaluator/reporting/templates/report.html.j2+++ b/src/skillevaluator/reporting/templates/report.html.j2@@ -1368,6 +1368,7 @@<div class="tier-card-stats"><span><strong>{{ tier1_summary.passed_count }}</strong>/{{ tier1_summary.total }} validators passed</span>{% if tier1_summary.issue_count %}<span><strong>{{ tier1_summary.issue_count }}</strong> issue(s)</span>{% endif %}+ {% if skillspector_versions %}<span title="SkillSpector version that ran the Tier 1 security scan">SkillSpector <strong>v{{ skillspector_versions | join(', v') }}</strong></span>{% endif %}</div>{% if tier1_summary.critical or tier1_summary.high or tier1_summary.medium or tier1_summary.low %}<div class="tier-card-sev">diff --git a/tests/reporting/test_reporters.py b/tests/reporting/test_reporters.pyindex 6dc8cfea..d7dc4d47 100644--- a/tests/reporting/test_reporters.py+++ b/tests/reporting/test_reporters.py@@ -1526,6 +1526,32 @@ class TestValidationResultMethods:assert len(result1.warnings) == 1+class TestSkillSpectorVersionReporting:+ def test_html_tier1_card_records_skillspector_version(self) -> None:+ first = ValidationResult(validator_name="Security Scan")+ first.metadata["skillspector_version"] = "2.12.0"+ second = ValidationResult(validator_name="Security Scan")+ second.metadata["skillspector_version"] = " 2.12.0 "++ # The version must not depend on the timestamped header line.+ html = HTMLReporter(include_timestamp=False, target_path="skills/example").render_all([first, second])+ tier1_card = html.split("Security & Static Validation", 1)[1].split("</section>", 1)[0]++ assert "SkillSpector <strong>v2.12.0</strong>" in tier1_card+ assert _html_report_data(html)["skillspector_versions"] == ["2.12.0"]++ @pytest.mark.parametrize("raw_version", [None, "", "unknown", "v2.12.0", "2.12.0<script>", 212])+ def test_html_omits_missing_or_malformed_skillspector_version(self, raw_version: object) -> None:+ result = ValidationResult(validator_name="Security Scan")+ if raw_version is not None:+ result.metadata["skillspector_version"] = raw_version++ html = HTMLReporter(include_timestamp=False).render_all([result])++ assert "SkillSpector <strong>v" not in html+ assert _html_report_data(html)["skillspector_versions"] == []++class TestHTMLReporterHeroHelpers:"""Hero-card helpers introduced for the combined Tier 1+2+3 report.