Skip to content

feat(triage): kit triage skill --deep — SkillSpector delegate, Stage-1 only (no LLM, no egress) - #327

Merged
sandstream merged 2 commits into
mainfrom
claude/web-kit-status-sync-p6fg9a
Jul 10, 2026
Merged

sandstream merged 2 commits into
mainfrom
claude/web-kit-status-sync-p6fg9a

Conversation

@sandstream

Copy link
Copy Markdown
Owner

Deepens kit triage skill by delegating to NVIDIA's SkillSpector instead of reimplementing its 68-pattern ruleset — the bumblebee model: borrow an authoritative source's detection depth, keep kit's governance layer. Design note: kit-research pillar-triage-skill-delegate-5.0.md.

What

  • src/skillspector-delegate.ts — runSkillspectorStage1(target) runs SkillSpector's static Stage 1 and normalizes its SARIF (via the shared parseSarif) into kit SecurityCheckResults, attributed "SkillSpector (NVIDIA) Stage 1".
  • Zero-LLM / no-egress, enforced + tested — the non-negotiable line:
    • scrubbedEnv strips every SKILLSPECTOR_* and provider API-key var from the child env, so Stage 2 can't silently activate from ambient config;
    • the invocation is a plain scan … --format sarif. kit never runs Stage 2.
  • Fail-closed / no false green — absent binary → unavailable (deep didn't run, surfaced honestly; the base kit triage skill verdict still governs), exit 2 → error (fails), never a silent deep-clean.
  • Wired as kit triage skill <path|name> --deep (+ help text). No hard dependency: kit works without SkillSpector installed; --deep is additive.

Why delegate (not absorb)

kit already earns trust by orchestrating authoritative scanners (bumblebee/trivy/semgrep/OSV). A solo maintainer can't out-research NVIDIA on "what is a malicious skill," and kit's moat is the governance layer (determinism, no-egress, one verdict, audit), not the ruleset. Attribution keeps the borrowed trust visible rather than laundered.

Verification

  • npx tsc --noEmit clean · npx eslint src 0 errors (one extra complexity warning on the already-over-threshold cmdTriage dispatcher; 125 warnings total) · public surface unchanged
  • 6 new tests: env scrub (+ no base mutation), static argv carries no LLM flag, SARIF→verdict attribution + severity, empty/invalid SARIF safe, unavailable-not-silent-pass
  • node scripts/test.mjs — 2794/2794 pass, 0 fail · prettier applied

🤖 Generated with Claude Code


Generated by Claude Code

claude added 2 commits July 10, 2026 22:46
…rves by default (Pillar 3)

Turn runtime mediation ON by default, the safe half of the default-on ladder.

- profile-policy runtimeModeOf: a declared [scope] with NO enforce_runtime now
  defaults to "observe" (was "off"). enforce_runtime = false is the explicit
  opt-out; = true stays explicit enforce; = "observe" unchanged.
- Non-breaking by construction: observe mediates + audits would-be denials but
  NEVER denies, so no existing flow can break on upgrade — it only starts
  recording what enforce WOULD block. enforce-by-default (deny by default) stays
  deferred until observe's field evidence justifies it.
- kit doctor: the "off" (skip) row now means no [scope] declared, or an explicit
  enforce_runtime = false opt-out — honest messaging for the new default.
- Tests: default-on observe for a signed scope w/o the flag (records would-deny,
  still runs); explicit = false → off (no observe audit); profile-policy
  runtimeMode default + opt-out; updated the now-stale "runtime unchanged" broker
  and mcp-server tests to assert observe-by-default. Public surface unchanged.

Full suite 2788/2788.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
…1 only (no LLM, no egress)

Deepen skill triage by delegating to NVIDIA's SkillSpector rather than
reimplementing its ruleset — the bumblebee model: borrow an authoritative
source's detection, keep kit's governance layer.

- src/skillspector-delegate.ts: runSkillspectorStage1 runs SkillSpector's STATIC
  Stage 1 and normalizes its SARIF (via the shared parseSarif) into kit
  SecurityCheckResults, attributed "SkillSpector (NVIDIA) Stage 1".
- ZERO-LLM / NO-EGRESS enforced + tested: scrubbedEnv strips every SKILLSPECTOR_*
  and provider API-key var so Stage 2 can't activate; the invocation is a plain
  `scan … --format sarif`. kit NEVER runs Stage 2.
- Fail-closed / no false green: an absent binary → "unavailable" (deep didn't
  run, surfaced honestly, base verdict still governs); exit 2 → "error" (fails);
  never a silent deep-clean. Wired as `kit triage skill <path> --deep`.
- 6 tests: env scrub (+ no mutation), static argv has no LLM flag, SARIF→verdict
  attribution + severity, empty/invalid SARIF safe, unavailable-not-silent-pass.

Full suite 2794/2794. Public surface unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
@github-actions

Copy link
Copy Markdown

✅ Docker image built successfully

  • CLI image: docker.io/sandstream/kit:test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants