Skip to content

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.

fix(reporting): pin Chart.js and verify script integrity (#162)

Deepak Jain (DJ)5426d8776e6a
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e37c5e88..1db53b69 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,8 @@ All notable changes to SkillEvaluator are documented in this file.
### Fixed
+- Pin the HTML report Chart.js dependency and verify its integrity before browser execution.
+
- Preserve full Codex gateway model IDs in cloud environments, including E2B
and Daytona, while retaining local runtime setup and native provider routing.
- Keep Tier 2 execution diagnostics visible alongside duplicate findings in
diff --git a/src/skillevaluator/reporting/templates/report.html.j2 b/src/skillevaluator/reporting/templates/report.html.j2
index 95cb6e4a..3333f809 100644
--- a/src/skillevaluator/reporting/templates/report.html.j2
+++ b/src/skillevaluator/reporting/templates/report.html.j2
@@ -3469,7 +3469,9 @@
</section>
{# Sub-tab switcher and Chart.js charts #}
- <script src="https://cdn.jsdelivr.net/npm/chart.js@4"></script>
+ <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/chart.umd.min.js"
+ integrity="sha384-jb8JQMbMoBUzgWatfe6COACi2ljcDdZQ2OxczGA3bGNeWe+6DChMTBJemed7ZnvJ"
+ crossorigin="anonymous"></script>
<script>
function showTier3SubTab(id, btn) {
document.querySelectorAll('.t3-page').forEach(function(p){ p.classList.remove('active'); });
diff --git a/tests/reporting/test_chart_dependency.py b/tests/reporting/test_chart_dependency.py
new file mode 100644
index 00000000..87a12c4d
--- /dev/null
+++ b/tests/reporting/test_chart_dependency.py
@@ -0,0 +1,46 @@
+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+# SPDX-License-Identifier: Apache-2.0
+
+"""Generated reports must not execute a mutable, unchecked CDN dependency."""
+
+from html.parser import HTMLParser
+
+from skillevaluator.evaluation.tier3_report import build_agent_eval_payload
+from skillevaluator.models import ValidationResult
+from skillevaluator.reporting import HTMLReporter
+
+
+class _Scripts(HTMLParser):
+ def __init__(self) -> None:
+ super().__init__()
+ self.external: list[dict[str, str | None]] = []
+
+ def handle_starttag(self, tag: str, attrs: list[tuple[str, str | None]]) -> None:
+ attributes = dict(attrs)
+ if tag == "script" and attributes.get("src"):
+ self.external.append(attributes)
+
+
+def test_generated_tier3_report_pins_and_checks_chart_dependency() -> None:
+ result = ValidationResult(validator_name="AGENT_EVAL")
+ result.metadata["agent_eval"] = build_agent_eval_payload(
+ "example",
+ {
+ "agent": {
+ "execution_status": "succeeded",
+ "expected_attempts": 1,
+ "scored_attempts": 1,
+ "with_skill": {"security": 1.0},
+ "rewards": [{"entry_id": "case-1", "security": 1.0}],
+ }
+ },
+ use_llm_judge=False,
+ )
+ parser = _Scripts()
+ parser.feed(HTMLReporter(include_timestamp=False).render_all([result]))
+ chart_scripts = [script for script in parser.external if "chart.js" in (script["src"] or "")]
+ assert len(chart_scripts) == 1
+ script = chart_scripts[0]
+ assert script["src"] == "https://cdn.jsdelivr.net/npm/[email protected]/dist/chart.umd.min.js"
+ assert script.get("integrity") == ("sha384-jb8JQMbMoBUzgWatfe6COACi2ljcDdZQ2OxczGA3bGNeWe+6DChMTBJemed7ZnvJ")
+ assert script.get("crossorigin") == "anonymous"