The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
feat: widen Tier 1 advisory scan to license + security checks
Teknium2c2697b52e7c
diff --git a/hermes_cli/skills_hub.py b/hermes_cli/skills_hub.pyindex 64ce41208e8..08e77495fa0 100644--- a/hermes_cli/skills_hub.py+++ b/hermes_cli/skills_hub.py@@ -111,10 +111,10 @@ def _print_tier1_advisory(skill_dir, console) -> None:report = run_tier1_scan(Path(skill_dir))if not report.available:return+ text = format_tier1_report(report)if not report.findings:- console.print("[dim]SkillEvaluator Tier 1: no findings.[/]")+ console.print(f"[dim]{text}[/]")return- text = format_tier1_report(report)style = "red" if report.secrets_findings else "yellow"console.print(Panel(text,diff --git a/hermes_cli/web_routers/skills.py b/hermes_cli/web_routers/skills.pyindex f1fd94025bf..d63540a8dbc 100644--- a/hermes_cli/web_routers/skills.py+++ b/hermes_cli/web_routers/skills.py@@ -356,6 +356,7 @@ async def scan_skill_hub(identifier: str = "", profile: Optional[str] = None):if t1.available:tier1 = {"passed": t1.passed,+ "incomplete_checks": t1.incomplete_checks,"findings": [{"check": f.check,diff --git a/tests/tools/test_skillevaluator_scan.py b/tests/tools/test_skillevaluator_scan.pyindex 4df8c6fccc6..9a3f055898f 100644--- a/tests/tools/test_skillevaluator_scan.py+++ b/tests/tools/test_skillevaluator_scan.py@@ -87,6 +87,36 @@ class TestParseReport:report = _parse_report(raw)assert len(report.findings) == 1+ def test_incomplete_check_excluded_from_verdict(self):+ """A fail-with-zero-findings incomplete validator (e.g. SkillSpector+ consistency-check trip) must not fail the advisory verdict."""+ raw = _report_json([])+ raw["results"].append({+ "validator": "Security Scan",+ "passed": False,+ "status": "incomplete",+ "findings": [],+ })+ report = _parse_report(raw)+ assert report.passed+ assert report.findings == []+ assert report.incomplete_checks == ["Security Scan"]++ def test_incomplete_check_findings_not_collected(self):+ raw = _report_json([])+ raw["results"].append({+ "validator": "Security Scan",+ "passed": False,+ "status": "incomplete",+ "findings": [_finding("hardcoded_secrets", severity="critical")],+ })+ report = _parse_report(raw)+ assert report.findings == []++ def test_complete_failed_check_still_fails(self):+ report = _parse_report(_report_json([_finding("emails")]))+ assert not report.passed+class TestRunTier1Scan:def test_scanner_missing_degrades(self, tmp_path):@@ -153,6 +183,18 @@ class TestFormatReport:assert "SKILL.md:8" in textassert "informational" in text+ def test_incomplete_checks_noted(self):+ raw = _report_json([])+ raw["results"].append({+ "validator": "Security Scan",+ "passed": False,+ "status": "incomplete",+ "findings": [],+ })+ text = format_tier1_report(_parse_report(raw))+ assert "not run: Security Scan" in text+ assert "no findings" in text+def test_limit_truncates(self):findings = [_finding("emails", message=f"m{i}", line=i) for i in range(1, 15)]report = _parse_report(_report_json(findings))diff --git a/tools/skillevaluator_scan.py b/tools/skillevaluator_scan.pyindex 107b4268cd1..32c118daec3 100644--- a/tools/skillevaluator_scan.py+++ b/tools/skillevaluator_scan.py@@ -50,11 +50,18 @@ logger = logging.getLogger(__name__)SCANNER_BIN = "skillevaluator"SCANNER_NAME = "skillevaluator-tier1"-# Keyless, deterministic Tier 1 checks only. Schema/license/quality are-# hygiene signal for the index pipeline (scripts/scan_skills_index.py),-# not install-time signal — a missing author field should never make an-# install noisier.-TIER1_CHECKS = "pii,unicode,lint"+# Keyless, deterministic Tier 1 checks. Schema/quality are excluded on+# purpose: they are hygiene signal for the index pipeline+# (scripts/scan_skills_index.py), not install-time signal — a missing+# author field should never make an install noisier.+#+# `security` invokes NVIDIA SkillSpector (a second optional binary,+# pinned separately: uv tool install+# "git+https://github.com/NVIDIA/SkillSpector.git") in its static-rules+# mode — still keyless, no LLM calls. When SkillSpector is absent or its+# report fails SkillEvaluator's internal consistency checks, the check+# reports status="incomplete" and is treated as "no opinion" here.+TIER1_CHECKS = "pii,unicode,lint,license,security"SCAN_TIMEOUT_SECONDS = 120# check_name values (from SkillEvaluator's pii_patterns.yaml categories)@@ -96,6 +103,7 @@ class Tier1Report:available: bool # scanner ran and produced a reportpassed: bool = Truefindings: List[Tier1Finding] = field(default_factory=list)+ incomplete_checks: List[str] = field(default_factory=list)error: str = "" # why the scan is unavailable (debug only)@property@@ -133,10 +141,25 @@ def tier1_advisory_enabled() -> bool:def _parse_report(report: dict) -> Tier1Report:- """Reduce a SkillEvaluator JSON report to install-relevant findings."""+ """Reduce a SkillEvaluator JSON report to install-relevant findings.++ A validator whose ``status`` is ``"incomplete"`` produced no usable+ evidence (e.g. SkillSpector missing, or its report failed+ SkillEvaluator's internal consistency checks) — its fail verdict+ carries no findings, so it is recorded as an incomplete check and+ excluded from the pass/fail signal rather than rendered as an+ unexplained failure.+ """findings: List[Tier1Finding] = []+ incomplete: List[str] = []+ any_complete_failed = Falsefor res in report.get("results", []) or []:validator = str(res.get("validator", "unknown"))+ if str(res.get("status", "")).lower() == "incomplete":+ incomplete.append(validator)+ continue+ if not res.get("passed", True):+ any_complete_failed = Truefor f in res.get("findings", []) or []:if not isinstance(f, dict):continue@@ -151,8 +174,9 @@ def _parse_report(report: dict) -> Tier1Report:))return Tier1Report(available=True,- passed=bool(report.get("overall_passed", not findings)),+ passed=not any_complete_failed and not findings,findings=findings,+ incomplete_checks=incomplete,)@@ -193,16 +217,21 @@ def format_tier1_report(report: Tier1Report, limit: int = 10) -> str:"""Plain-text advisory summary for console display."""if not report.available:return ""+ lines: List[str] = []if not report.findings:- return "SkillEvaluator Tier 1: no findings."- lines = [- f"SkillEvaluator Tier 1 (advisory): "- f"{len(report.findings)} finding(s) — informational, verify before relying on this skill."- ]- shown = report.secrets_findings + report.advisory_findings- for f in shown[:limit]:- tag = "SECRETS" if f.is_secrets_class else f.severity.upper()- lines.append(f" [{tag}] {f.location()} — {f.message}")- if len(shown) > limit:- lines.append(f" … and {len(shown) - limit} more")+ lines.append("SkillEvaluator Tier 1: no findings.")+ else:+ lines.append(+ f"SkillEvaluator Tier 1 (advisory): "+ f"{len(report.findings)} finding(s) — informational, verify before relying on this skill."+ )+ shown = report.secrets_findings + report.advisory_findings+ for f in shown[:limit]:+ tag = "SECRETS" if f.is_secrets_class else f.severity.upper()+ lines.append(f" [{tag}] {f.location()} — {f.message}")+ if len(shown) > limit:+ lines.append(f" … and {len(shown) - limit} more")+ if report.incomplete_checks:+ names = ", ".join(report.incomplete_checks)+ lines.append(f" (not run: {names} — no opinion from these checks)")return "\n".join(lines)diff --git a/website/docs/user-guide/features/skills.md b/website/docs/user-guide/features/skills.mdindex 175385d07e8..6a2e987784f 100644--- a/website/docs/user-guide/features/skills.md+++ b/website/docs/user-guide/features/skills.md@@ -337,7 +337,9 @@ In addition to the built-in security scanner (which enforces the installpolicy above), Hermes can run [NVIDIA SkillEvaluator](https://github.com/NVIDIA/SkillEvaluator)Tier 1 checks on every hub install as a second opinion. Tier 1 isdeterministic and keyless — PII detection (leaked emails, personal paths,-connection strings), unicode-smuggling detection, and script lint.+connection strings), unicode-smuggling detection, script lint, license+compliance, and a static security scan via+[NVIDIA SkillSpector](https://github.com/NVIDIA/SkillSpector).The scan is **advisory only**: findings are printed with file and linebefore the install confirmation, and the install continues. Findings that@@ -348,11 +350,13 @@ the upstream scanner has known false-positive classes (e.g.`[email protected]` SSH syntax, documentation example emails), so they neverblock anything.-To enable it, install the optional scanner binary:+To enable it, install the optional scanner binaries (the second one powers+the `security` check; without it that check simply reports "not run"):```bashuv tool install --python 3.13 \"skillevaluator @ git+https://github.com/NVIDIA/SkillEvaluator.git"+uv tool install "git+https://github.com/NVIDIA/SkillSpector.git"```Without the binary on PATH the scan is silently skipped. To turn it off