Skip to content
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
b0b88e8
fix(harbor): support Claude Code on Vertex AI and harden GKE execution
kweinmeister Sep 13, 2026
fea99b9
fix(harbor): add active 1-token probe for Vertex AI OpenAPI endpoints
kweinmeister Sep 13, 2026
789eecc
fix(harbor): decouple agent provider routing and harden GKE environment
kweinmeister Sep 14, 2026
fb46b86
Merge branch 'main' into fix/harbor-claude-vertex-routing
kweinmeister Sep 16, 2026
70206f7
Merge branch 'main' into fix/harbor-claude-vertex-routing
rng1995 Sep 16, 2026
c06cfb3
fix(harbor): address review comments on GKE execution and credentials…
kweinmeister Sep 16, 2026
18780b0
Merge branch 'main' into fix/harbor-claude-vertex-routing
rng1995 Sep 16, 2026
d83b700
Merge branch 'main' into fix/harbor-claude-vertex-routing
rng1995 Sep 17, 2026
34701fd
Merge branch 'main' into fix/harbor-claude-vertex-routing
rng1995 Sep 17, 2026
d2116a5
Merge branch 'main' into fix/harbor-claude-vertex-routing
kweinmeister Sep 18, 2026
f0e70cf
fix(harbor): harden GKE Workload Identity, MCP secret boundaries, and…
kweinmeister Sep 18, 2026
9e80980
Merge branch 'main' into fix/harbor-claude-vertex-routing
rng1995 Sep 22, 2026
dfa6c4f
fix(harbor): address PR #140 review on ADC token refresh overwrite an…
kweinmeister Sep 24, 2026
79310a1
Merge branch 'main' into fix/harbor-claude-vertex-routing
kweinmeister Sep 24, 2026
f8fadaf
Merge branch 'main' into fix/harbor-claude-vertex-routing
rng1995 Sep 26, 2026
cd2d599
fix(tier3): enforce GKE pod SA isolation, ADC provenance gating, and …
kweinmeister Sep 26, 2026
ad10234
Merge branch 'main' into fix/harbor-claude-vertex-routing
kweinmeister Sep 27, 2026
a1202f0
fix(tier3): harden GKE kubelet exec readiness, retry, redaction, and …
kweinmeister Sep 26, 2026
cd9405b
Merge remote-tracking branch 'origin/main' into fix/harbor-claude-ver…
kweinmeister Sep 28, 2026
b229925
fix(tier3): resolve GKE env kwargs in workflow preflight and harden A…
kweinmeister Sep 28, 2026
2b0df44
Merge remote-tracking branch 'origin/main' into fix/harbor-claude-ver…
kweinmeister Sep 29, 2026
76963c1
fix(harbor): enforce GKE metadata isolation and fix MCP placeholder s…
kweinmeister Sep 29, 2026
8e89753
Merge branch 'main' into fix/harbor-claude-vertex-routing
kweinmeister Sep 30, 2026
41cb00f
Merge branch 'main' into fix/harbor-claude-vertex-routing
kweinmeister Oct 1, 2026
08a5cda
Merge branch 'main' into fix/harbor-claude-vertex-routing
kweinmeister Oct 1, 2026
1a138ba
fix(deps): raise oauthlib floor to clear dependency review
rng1995 Oct 2, 2026
c9ab383
Merge branch 'main' into fix/harbor-claude-vertex-routing
rng1995 Oct 2, 2026
2436c36
Merge branch 'main' into fix/harbor-claude-vertex-routing
rng1995 Oct 4, 2026
02f00bd
fix(harbor): isolate metadata probe in companion container and allow …
kweinmeister Oct 4, 2026
d1dc4ab
Merge branch 'main' into fix/harbor-claude-vertex-routing
kweinmeister Oct 5, 2026
1277658
fix(tier3): harden GKE metadata init probe, BusyBox wget, and Autopil…
kweinmeister Oct 5, 2026
2b46330
Merge upstream/main and align Harbor 0.24 GKE/Vertex routing and MCP …
kweinmeister Oct 7, 2026
4ee1bbb
Merge upstream/main into fix/harbor-claude-vertex-routing
kweinmeister Oct 7, 2026
1cc2f83
Merge main into fix/harbor-claude-vertex-routing
kweinmeister Oct 13, 2026
c3714ae
Merge main into fix/harbor-claude-vertex-routing
rng1995 Oct 14, 2026
006ae73
fix(harbor): build the Claude container wrapper on the installed-agen…
rng1995 Oct 14, 2026
e367522
Merge main into fix/harbor-claude-vertex-routing
rng1995 Oct 16, 2026
1374cd7
fix(gke): do not replay exec commands whose completion status was lost
rng1995 Oct 16, 2026
a178436
fix(gke): match the Autopilot node label prefix exactly
rng1995 Oct 16, 2026
de8e182
Merge main into fix/harbor-claude-vertex-routing
rng1995 Oct 16, 2026
d053b3f
Merge main into fix/harbor-claude-vertex-routing
rng1995 Oct 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ All notable changes to SkillEvaluator are documented in this file.

### Added

- Tier 3 support for Harbor GKE execution mode (`--env-mode gke`) and `--ek`
argument forwarding. API keys, bearer tokens, and passwords passed in `--ek`
keys or values are rejected to keep credentials out of process listings, while
configuration such as rate limits and token counts is preserved. Cluster
infrastructure settings in skill configs are rejected to enforce security
boundaries in favor of host environment variables and CLI flags.
- Claude Code live agent routing for Google Cloud Vertex AI
(`CLAUDE_CODE_USE_VERTEX=1`, `ANTHROPIC_VERTEX_PROJECT_ID`, `CLOUD_ML_REGION`),
with redirect-blocking preflight probes, case-insensitive model alias
resolution, and explicit trusted-skill opt-in (`SKILLEVALUATOR_GKE_ALLOW_WORKLOAD_IDENTITY=1`
or `--ek allow_workload_identity=true`) when using single-pod GKE Workload Identity.
- Fail-closed validation for skill-authored MCP server configurations
(`evals/environment/mcp_servers.toml` and `mcp_servers.json`) that blocks
operator/provider credential references and literal secrets, while allowing
operator-approved MCP endpoints and non-LLM secrets via
`SKILLEVALUATOR_ALLOWED_MCP_HOSTS` and `SKILLEVALUATOR_ALLOWED_MCP_SECRETS`.
- 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
Expand Down
2 changes: 1 addition & 1 deletion THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ records the exact resolved dependency set used for this release.
| --- | --- |
| Base | Click (BSD-3-Clause), IDNA (BSD-3-Clause), Jinja2 (BSD-3-Clause), Markdown-It-Py (MIT), Packaging (Apache-2.0 or BSD-2-Clause), Pydantic (MIT), PyYAML (MIT), Rich (MIT) |
| LLM | Anthropic (MIT), Boto3 (Apache-2.0), LiteLLM (MIT), OpenAI (Apache-2.0) |
| Tier 3 | Harbor (Apache-2.0), MCP (MIT), PyJWT (MIT), python-dotenv (BSD-3-Clause) |
| Tier 3 | Harbor (Apache-2.0), MCP (MIT), OAuthLib (BSD-3-Clause), PyJWT (MIT), python-dotenv (BSD-3-Clause) |
| Security | Bandit (Apache-2.0), pip-audit (Apache-2.0) |

## Unicode security data
Expand Down
29 changes: 29 additions & 0 deletions docs/agents-and-sandboxes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,35 @@ later run with another. Put non-secret interpolation values in
`harbor.runtime_env` in `evals/config.yml`; keep operator credentials in the
host environment as described above.

## GKE mode

When running with `--env-mode gke`, SkillEvaluator enforces least-privilege pod
identity by default unless you explicitly opt in for trusted skills via
`SKILLEVALUATOR_GKE_ALLOW_WORKLOAD_IDENTITY=1` or `--ek allow_workload_identity=1`:

- **ServiceAccount and metadata isolation**: Pods run with
`automountServiceAccountToken: false`, `hostNetwork: false`,
`GCE_METADATA_HOST=127.0.0.1:1`, and a pod-scoped egress `NetworkPolicy`
(`skillevaluator-block-gce-metadata`) that blocks HTTP egress to
`169.254.169.254/32` and `169.254.169.252/32` while preserving UDP/TCP port 53 DNS.
Kubernetes ServiceAccounts annotated with `iam.gke.io/gcp-service-account` or
`iam.gke.io/return-principal-id-as-email=true` are rejected.
- **Trusted init and companion metadata probes**: Single-container evaluation
pods include a trusted init container (`skillevaluator-metadata-probe-init`)
that verifies metadata endpoints are unreachable *before* the `main` task
container starts, plus a companion container (`skillevaluator-metadata-probe`)
that re-verifies isolation before task upload. Set
`SKILLEVALUATOR_GKE_METADATA_PROBE_IMAGE` when your cluster requires pulling
the probe image (`python:3.12-slim` by default) from a private Artifact Registry mirror.
- **GKE Autopilot ephemeral storage**: On GKE Autopilot (auto-detected via node
inspection or `gcloud`, or set explicitly with `SKILLEVALUATOR_GKE_AUTOPILOT`
/ `--ek autopilot=<bool>`), general-purpose pods have a `10Gi` (`10240Mi`)
cumulative ephemeral-storage ceiling. When a non-GPU/TPU `main` container
requests `10Gi`, SkillEvaluator caps `main` to `10176Mi` so `main` (`10176Mi`) +
`skillevaluator-metadata-probe` (`64Mi`) equals `10240Mi`. Standard GKE
clusters, GPU/TPU pods, and explicit storage requests above `10Gi` are not
lowered.

## Kata mode

`--env-mode kata` uses the same hardened Docker Compose backend as Docker mode,
Expand Down
5 changes: 5 additions & 0 deletions docs/environment-variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ execution environments are covered in
| `SKILL_EVAL_JUDGE_MODEL` | falls back to `SKILL_EVAL_LLM_MODEL` | Operator-controlled model override for the Tier 3 dimension judge in standard grading. `LLM_JUDGE_MODEL` is honored as a higher-precedence spelling; when neither is set, the judge uses `SKILL_EVAL_LLM_MODEL`, then the built-in judge default. Both spellings change only the model used with the configured `SKILL_EVAL_LLM_PROVIDER`; they do not select a separate judge provider, so the model must be supported by that provider. Standard grading makes both spellings resolve to the selected override in Harbor's parent process, then forwards them through its verifier-only job layer, which takes precedence over task and step verifier declarations. Neither name is injected into the evaluated agent's initial environment; attempts to set or reference one from skill-authored `runtime_env` or native `[environment.env]` tables are rejected. Native custom-only graders keep ownership of their verifier configuration. Shared agent/verifier containers are a process boundary, not a confidentiality boundary; use a separate verifier environment when the model name itself must be hidden from untrusted agent processes. `run_config.json` records the configured judge provider, model, source, `override_applied`, reasoning effort, and catalog-verification status separately from agent models; an allowed provider fallback may use a different model for an individual judge call. When `override_applied` is false for a native Harbor task, `effective_model_source` is `native_harbor_runtime` and catalog verification is explicitly inconclusive because an authored task or step verifier declaration may supersede the recorded fallback. |
| `LLM_JUDGE_FALLBACK_MODELS` | unset | Comma-separated fallback models for the Tier 3 standard judges in the Harbor verifier. When the provider rejects the judge model as not found, invalid, or not accessible to the key, the verifier tries each fallback in order with the same provider. Fallback applies to the `openai`, `nv_build`, and `openai-compatible` providers. A safety refusal or an empty reply from the judge model also moves to the next fallback, on every provider. The value is forwarded only to standard verifier jobs, never to the agent environment or `custom_only` runs. |
| `SKILLEVALUATOR_HARBOR_DIAGNOSTIC_ARTIFACT_MAX_BYTES` | `5242880` (5 MiB) | Size cap per diagnostic artifact copied from a Harbor trial into the results directory. Values are bounded to 0–67108864 bytes (64 MiB); `0` skips non-empty artifacts. Oversized artifacts are skipped and recorded in the artifact manifest. |
| `SKILLEVALUATOR_GKE_CLUSTER`, `SKILLEVALUATOR_GKE_REGION`, `SKILLEVALUATOR_GKE_NAMESPACE`, `SKILLEVALUATOR_GKE_REGISTRY_LOCATION`, `SKILLEVALUATOR_GKE_REGISTRY_NAME` | — | Target cluster, region, namespace, and Artifact Registry coordinates for `--env-mode gke` when not supplied via `--ek`. |
| `SKILLEVALUATOR_GKE_ALLOW_WORKLOAD_IDENTITY` | `false` | Opt in (`1`, `true`, `yes`) to single-pod GKE Workload Identity (`CLAUDE_CODE_USE_VERTEX=1` or a GCP-bound Kubernetes ServiceAccount). Restricted to trusted skills because the pod ServiceAccount and GCE/GKE metadata server are shared with evaluated skill commands. |
| `SKILLEVALUATOR_GKE_METADATA_PROBE_IMAGE` | `python:3.12-slim` | Trusted container image used by `skillevaluator-metadata-probe-init` and `skillevaluator-metadata-probe` in unprivileged `--env-mode gke` pods to verify that `169.254.169.254` and `169.254.169.252:988` are unreachable. Override when your GKE cluster restricts Docker Hub pulls and requires an internal Artifact Registry mirror. |
| `SKILLEVALUATOR_GKE_AUTOPILOT` | auto-detected | Explicitly set `1`/`true` or `0`/`false` (or pass `--ek autopilot=<bool>`) to control GKE Autopilot ephemeral-storage adjustment (`10Gi` → `10176Mi` on non-accelerator `main` containers so adding the `64Mi` probe container stays within Autopilot's `10Gi` general-purpose pod ceiling) when node listing or `gcloud` inspection is unavailable. |
| `SKILLEVALUATOR_VERTEX_ADC_JOB_TIMEOUT_SEC` | `3300` seconds | Maximum wall-clock timeout per Harbor subprocess invocation when using short-lived Google Application Default Credentials (ADC) with a Vertex AI OpenAPI endpoint, capped to the remaining token lifetime minus a 60-second safety margin. |

### Harbor process environment

Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ tier2 = [
# Tier 3 live agent evaluation through Harbor's native environments.
tier3 = [
"skillevaluator[llm]",
"harbor==0.24.0",
"harbor[gke]==0.24.0",
# CVE-2026-59950, CVE-2026-52870, and CVE-2026-52869 fixed floor.
"mcp>=1.28.1,<2",
# CVE-2026-48522 through CVE-2026-48526 fixed floor.
"pyjwt[crypto]>=2.13.0",
# GHSA-hj66-6f7g-4r5v and GHSA-xpv3-w29h-x7cv fixed floor (via harbor[gke]).
"oauthlib>=4.0.0",
# PYTHON_DOTENV_DISABLED, which keeps Harbor from loading .env files, needs 1.2.0.
"python-dotenv>=1.2.0",
]
Expand Down
46 changes: 46 additions & 0 deletions src/skillevaluator/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2556,6 +2556,20 @@ def dedup_scan(
raise click.ClickException("dedup scan failed")


def _parse_environment_kwargs_cli(
raw_kwargs: tuple[str, ...],
*,
env_mode: str | None = None,
) -> dict[str, Any]:
"""Parse and validate environment kwargs for CLI commands, raising Click BadParameter on errors."""
from skillevaluator.tier3.evals_config import parse_environment_kwarg_overrides

try:
return parse_environment_kwarg_overrides(raw_kwargs, env_mode=env_mode)
except ValueError as exc:
raise click.BadParameter(str(exc), param_hint=["--ek"]) from exc


def _workflow_report_options(func):
func = _report_options(func)
for param in func.__click_params__:
Expand Down Expand Up @@ -2806,6 +2820,8 @@ def evaluate(
if autopilot:
_ensure_autopilot_dataset(skill_path, progress=progress)

parsed_environment_kwargs = _parse_environment_kwargs_cli(environment_kwarg, env_mode=env_mode)

options = EvaluationOptions(
skill_path=skill_path,
agents=agents,
Expand All @@ -2832,6 +2848,7 @@ def evaluate(
override_memory_mb=override_memory_mb,
override_storage_mb=override_storage_mb,
evaluated_source=evaluated_source,
environment_kwargs=parsed_environment_kwargs,
)
try:
if env_mode == "local":
Expand All @@ -2850,6 +2867,31 @@ def evaluate(
padding=(0, 1),
)
)
elif env_mode == "gke":
from skillevaluator.tier3.commands import parse_agents
from skillevaluator.tier3.harbor.runner import (
is_gke_vertex_workload_identity_active,
is_gke_workload_identity_allowed,
)

if is_gke_vertex_workload_identity_active(
env_mode, parse_agents(agents)
) and is_gke_workload_identity_allowed(options.environment_kwargs):
from rich.panel import Panel
from rich.text import Text

console.print(
Panel(
Text(
"Intended for trusted skills and least-privilege service accounts. Harbor 0.24.0 single-pod "
"GKE execution shares the pod service account and metadata server with evaluated skill commands.",
style="yellow",
),
title=Text("GKE Workload Identity · Trusted Skills Only", style="bold cyan"),
border_style="yellow",
padding=(0, 1),
)
)
progress_reporter = create_progress_reporter(progress, stream=click.get_text_stream("stderr"))
engine_result = service.evaluate(options, progress_reporter=progress_reporter)
failure = service.failure_reason(engine_result)
Expand Down Expand Up @@ -3045,13 +3087,15 @@ def doctor(
"""Check live-evaluation runtime readiness."""
from skillevaluator.tier3.commands import doctor as tier3_doctor

parsed_environment_kwargs = _parse_environment_kwargs_cli(environment_kwarg, env_mode=env_mode)
raise SystemExit(
tier3_doctor(
agents=agents,
env_mode=env_mode,
environment_kwarg=environment_kwarg,
verify_models=verify_models,
agent_model=agent_model,
environment_kwargs=parsed_environment_kwargs,
)
)

Expand All @@ -3074,13 +3118,15 @@ def health_check(agents: str | None, env_mode: str, environment_kwarg: tuple[str
"""Quick readiness check for the CLI and selected live-eval backend."""
from skillevaluator.tier3.commands import doctor as tier3_doctor

parsed_environment_kwargs = _parse_environment_kwargs_cli(environment_kwarg, env_mode=env_mode)
raise SystemExit(
tier3_doctor(
agents=agents,
env_mode=env_mode,
environment_kwarg=environment_kwarg,
verify_models=False,
agent_model=(),
environment_kwargs=parsed_environment_kwargs,
)
)

Expand Down
3 changes: 2 additions & 1 deletion src/skillevaluator/evaluation/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from __future__ import annotations

from dataclasses import dataclass, fields
from dataclasses import dataclass, field, fields
from pathlib import Path
from typing import Any

Expand Down Expand Up @@ -51,6 +51,7 @@ class EvaluationOptions:
# Supplied by the orchestration input, never inferred from repository state:
# the tree that runs the evaluator is not the tree being evaluated.
evaluated_source: dict[str, str] | None = None
environment_kwargs: dict[str, str] = field(default_factory=dict)

def engine_kwargs(self) -> dict[str, Any]:
"""Return keyword arguments (excluding ``skill_path``) for the engine."""
Expand Down
38 changes: 32 additions & 6 deletions src/skillevaluator/inference/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,12 +603,38 @@ def _openai_kwargs(include_schema: bool) -> dict[str, Any]:
call_kwargs["response_format"] = _build_openai_response_format(response_schema, schema_name)
return call_kwargs

response = _call_with_schema_fallback(
client.chat.completions.create,
_openai_kwargs,
target_key=target_key,
use_schema=use_schema,
)
def _create_chat_completion() -> Any:
return _call_with_schema_fallback(
client.chat.completions.create,
_openai_kwargs,
target_key=target_key,
use_schema=use_schema,
)

try:
response = _create_chat_completion()
except Exception as exc:
from skillevaluator.provider_config import _get_google_access_token

if config.credential_env == "ADC":
from openai import AuthenticationError

if isinstance(exc, AuthenticationError) or getattr(exc, "status_code", None) == 401:
new_token = _get_google_access_token()
if new_token:
import dataclasses

client.api_key = new_token
self._provider_config = dataclasses.replace(config, api_key=new_token)
if self._api_key is not None:
self._api_key = new_token
response = _create_chat_completion()
else:
raise
else:
raise
else:
raise
return _extract_choice_content(response)

return retry_call_with_backoff(_invoke_provider, config=self._retry_config)
Expand Down
Loading
Loading