Skip to content

release: kit 4.3.0 — backlog sweep: dogfood fixes + guarddog cache + coverage/memory reach + semgrep zero - #252

Merged
sandstream merged 8 commits into
mainfrom
feat/4.3.0-backlog-sweep
Jul 7, 2026
Merged

sandstream merged 8 commits into
mainfrom
feat/4.3.0-backlog-sweep

Conversation

@sandstream

Copy link
Copy Markdown
Owner

kit 4.3.0 — "stäng allt öppet"

Closes every open backlog issue + the semgrep health item, one commit each.

Verification: full suite 2393 tests green locally (the 2 earlier reds were iCloud " 3"/" 4" conflict-copy junk, purged — untracked + gitignored, absent on CI checkout). New tests: workspaces (7), guarddog-cache (3), coverage binding (2), merge remap (2), firebaserc cross-check (3), public-by-design (3).

Closes #205
Closes #206
Closes #247
Closes #249
Closes #250
Closes #251

After merge: signed tag v4.3.0 on the merge commit → publish.yml → npm with provenance.

🤖 Generated with Claude Code

sandstream and others added 8 commits July 7, 2026 07:30
… inline command evidence

Closes the not-run gap from #206 without opening a category-match false green:
- self-audit results now carry ruleId; coverage binds by name OR ruleId
- CHECK_ID_ALIASES maps concept ids to exact result names (supply-chain →
  bumblebee) — broad category matching deliberately rejected: any passing
  result in a category would 'verify' unrelated controls
- --verify also runs the cheap command-backed evidence inline (runGhaAudit +
  runCiAudit as 'gha-audit', scanTranscripts as 'scan-transcripts')
- kit on kit: 4 not-run → 1 (only vault-backed 'kit secrets validate' stays
  honestly unbound)

Closes #206

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A merged session keyed to another machine's project path (a container's
-home-user) is invisible to project-scoped search — 'merged' must not read
as 'reachable'. mergeDb now reports sessions-per-project-key; the CLI prints
where sessions landed and, when foreign, points to --remap-project / --global.
--remap-project rewrites imported sessions' project key (re-merge rehomes an
already-imported foreign session: upsert lets a non-null project win).
Cross-project search already existed (--global / --project).

Closes #247

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…'rotate'

A Firebase web-config apiKey ships in every client bundle on purpose —
flagging it 'leaked secret, rotate now' is wrong advice that erodes trust in
the scan. classifyTrufflehogFindings now splits out a publicByDesign class:
- Firebase AIza key ONLY when its file co-carries web-config context
  (authDomain/projectId/firebaseConfig); no context or unreadable file ⇒
  stays a normal finding (could be a privileged server key)
- Sentry DSN + PostHog project key: public by shape alone
- a VERIFIED-LIVE credential is never waved through
Findings stay visible in the check detail with the actionable control:
verify API-key restrictions + security rules.

Closes #250

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…firebaserc

Found dogfooding: kit init captured an ACTIVE gcloud project belonging to a
different customer into a repo whose .firebaserc names its own projects. The
repo's declaration is authoritative:
- kit init's context-lock offer warns with both values named and suggests the
  REPO's project in the lock, never the foreign active one
- kit context check flags the mismatch (red, exit 1) even when no [context]
  is declared — the .firebaserc is a declaration
- checkContext appends a gcloud 'project (.firebaserc)' finding when
  [context.gcloud].project is not itself declared

Closes #251

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…a silent green

Found dogfooding on a Turborepo: test-coverage said 'no src/ directory found'
and the a11y scan 'no tsx/jsx files found' in a tree FULL of tsx under apps/*
and packages/* — the design gate returned empty green.

- new src/workspaces.ts: resolve workspace roots from package.json workspaces
  (array/{packages}) + pnpm-workspace.yaml, expand single-star globs, keep only
  dirs with their own package.json
- checkTests: when the root has no src dirs, scan each workspace's
  src/app/components instead
- checkDesign: workspace src dirs join the component-root scan
- both empty-scan skips now say so in monorepo terms ('workspace resolution
  may have missed them') — scanned-zero-files can't read as scanned-clean

Closes #249

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… sweep

guarddog costs ~25s/package (tarball fetch + per-package semgrep). Verifying a
12k-package lockfile can NEVER finish inside the 300s check budget — every run
produced an honest-but-useless UNVERIFIED. Three changes:
- verify package.json (direct deps = guarddog's depth); the full tree keeps
  breadth coverage from bumblebee + osv-scanner
- clean-verdict cache (~/.kit/guarddog-cache.json, KIT_GUARDDOG_CACHE) keyed by
  a hash of the direct-deps map: only COMPLETE clean scans are cached; fails
  and incomplete scans always re-run; cache hits say so (verdict date) instead
  of pretending to have just scanned
- nightly guarddog-nightly job in security.yml: uncached, 45-min budget,
  fail-closed (an unfinished or skipped sweep FAILS — the sweep exists to
  guarantee a completed scan happens continuously)
- KIT_GUARDDOG_TIMEOUT_MS overrides the local 300s default

Closes #205

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Real fixes:
- action.yml + templates/github/kit-security.yml: pin actions/checkout@v4 and
  actions/setup-node@v4 to commit SHAs — kit's own gha-audit rule, applied to
  kit's own shipped templates (13 sites)
- docker-compose: no-new-privileges + read-only root fs on postgres/redis
  (tmpfs for postgres run/tmp; data volumes stay writable)
- cli.ts: escape keyName before regex interpolation (the one regex builder
  that predated the escapeRegex convention)

Suppressed with per-site justification (nosemgrep):
- detect-non-literal-regexp ×7: patterns built from escapeRe()/escapeRegex()ed
  internal identifiers, no user-controlled input
- unsafe-formatstring ×6: template literals interpolating module constants

semgrep scan --config p/default now returns 0 findings.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… + coverage/memory reach + semgrep zero

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

✅ Docker image built successfully

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

@sandstream
sandstream merged commit fbe295e into main Jul 7, 2026
19 checks passed
@sandstream
sandstream deleted the feat/4.3.0-backlog-sweep branch July 7, 2026 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment