Repository navigation
release: kit 1.4.0 - #6
Merged
Merged
Conversation
Foundation for the consolidation/citation layer. Adds an optional `rule: RuleRef` to SecurityCheckResult and a local, deterministic rules catalog (src/rules/ catalog.ts) mapping each kit security check to the rule it enforces (CWE / OWASP Top 10). checkSecurity() decorates findings by name; the citation flows into the `kit check` JSON (agent-facing) automatically and renders as a [CWE-xxx] tag in the text table. Deliberately narrow + non-duplicative: this cites kit's OWN deterministic checks (gitignore, secrets, dep-pinning, lockfiles, service exposure), which no SAST covers. It is NOT a SAST engine and does not compete with Semgrep/Snyk; kit orchestrates those. Checks without a defensible anchor (license, semgrep-engine, requirements presence) carry no rule rather than a forced weak mapping. Catalog is co-located with the checks (add a check -> add its mapping); framework IDs are low-churn and pinned, no network lookup. Next: wrap Semgrep ASVS packs + coverage view (plugin), team rule-packs (plugin). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
palAutoVerify no longer runs a stored shell string via execSync. A verify is now a typed check (http-status via fetch, file-exists via fs) executed natively, never through a shell and never by interpolating a stored value into a command. A defensive parser rejects any unknown/injected shape, so a planted or imported verify is inert. Why: kit is agent-native. The old verify_cmd was a persistence/deferred-exec primitive: a prompt-injected low-trust session could store a command that later detonated when a more-trusted session ran `kit memory pal verify`. The typed model removes the sink at the root while staying autonomy-friendly (auto-verify needs no human gate, so autonomous agent jobs do not break). CLI: --verify-http <url> [--expect <code>] / --verify-file <path> replace --verify "<shell>". DB: new pending_actions.verify_check (JSON); legacy verify_cmd kept for kit memory scan but never auto-executed. Tests: declarative pass/fail/regress + two SECURITY regressions (imported and injected shapes never execute). 2219 green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Declare each tool's exact (account, project) pair in .kit.toml [context] (gcloud, vercel, github, git, npm). kit context check reads the live tool state and verifies it matches, and never infers a pairing from whatever happens to be logged in or selected: a right account with the wrong project is a mismatch, not a pass. Read-only; exits non-zero on a mismatch so it can gate a git hook or an agent before an outward/destructive command. Context pointers live in config; the credentials they authenticate with stay in the vault. Catches the contamination class where a CLI is pointed at the wrong account/project, or a repo carries a stale deploy connection from a previous purpose. Table-driven field specs (adding a CLI is one row). Tests cover the exact-pair principle, unknown handling, and remote parsing. No version bump; we bump once after merging all open PRs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
`kit hooks add context-check` installs a pre-push hook that runs `kit context check` and blocks the push on a mismatch. Turns the verifier into an actual gate: a push to the wrong account/project (or a repo carrying a stale deploy connection) is stopped before it leaves the machine. One declarative entry in the built-in hook registry; the existing hook generator handles the rest. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
`kit memory <sub> --help` (e.g. `kit memory install --help`) ran the subcommand instead of printing help, so asking for help on `install` actually installed the hooks. cmdMemory now treats a --help/-h flag anywhere as "show help" before dispatching. Verified by smoke (install/index --help print help, no side effect). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Completes the context-lock story (check + use + visibility): - `kit context use` activates the declared context — gcloud config + repo git identity — so every CLI points at the right account/project. Touches only local config (never an account or a deploy); vercel/npm get guidance. Plan is pure + unit-tested. - `kit context --prompt` prints a fast, read-only active-gcloud indicator (e.g. [gcp:my-project]) read from gcloud's config files (no subprocess) for the shell prompt. - Help text, README (Context lock section + shortlist), and CHANGELOG updated. 9 context tests, full suite 2227 green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
|
✅ Docker image built successfully
|
This was referenced Jun 23, 2026
sandstream
pushed a commit
that referenced
this pull request
Jun 29, 2026
Document the setup-script pattern that makes a fresh/ephemeral environment fuel itself: `kit setup --recommended` (config — tools, vault-backed secrets, agent gates, verify) + `kit memory sync`/`restore` (recall), plus `kit identity init` for a per-env signing identity. Covers: non-interactive `kit setup` (CI/agent-safe, explicit --recommended/ --minimal/--mode), where the script lives (Claude Code on the web / devcontainer / Dockerfile / CI), the memory bridge (encrypted backup→restore; shared tier arrives with the clone; private-remote sync noted as planned), and the guardrails (secrets never plaintext, private memory never committed, idempotent, fail-open, zero-LLM). Linked from the README quick start. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
2 tasks done
sandstream
added a commit
that referenced
this pull request
Jun 29, 2026
#169) Document the setup-script pattern (kit setup --recommended + kit memory sync/restore) that fuels a fresh/ephemeral environment with no manual steps: config, vault-backed secrets, agent gates, identity, recall. New docs/ENV_FUELING.md, linked from the README quick start. Docs-only.
sandstream
pushed a commit
that referenced
this pull request
Jul 5, 2026
…found false green) Adversarial verify found the mandate was a false green: KIT_REQUIRE_HARDWARE_IDENTITY was enforced ONLY in `kit policy sign`, while audit-chain entries, shared-memory notes, and revocations kept signing with the same-UID-readable file key — and `init` still minted a file key that coexists. So a mandate operator got a green light over a key an attacker could still read and use. Fixed so NO file-key signature escapes under the mandate. - Universal backstop: signWithIdentity() (the file-key primitive) now FAILS CLOSED under KIT_REQUIRE_HARDWARE_IDENTITY — every caller that reaches it (revocations, elevation, any un-routed signer) refuses the file key. mandate.js is a zero-import module so identity.ts can guard without an import cycle. - loadOrCreateIdentity refuses to MINT a file key under the mandate (Finding #4: no coexisting same-UID key to steal). - Routed the audit-chain signer (audit.ts) and shared-memory signer (memory/shared.ts) through the keystore: a `command` backend now signs them via hardware, and under a mandate with only a file key they fall back to KEYLESS (chain still protects them) rather than emitting a forbidden file-key signature. Also unifies the signing kid. - Command signer no longer receives kit's env wholesale (Finding #3): minimal allowlist (PATH/HOME/KIT_SIGN_ALGO), so KIT_* secrets/vault tokens aren't exposed to the signer subprocess — the comment now matches the code. - Honesty (Findings #2/#6): the command backend and `kit identity keystore` no longer claim "hardware-rooted" (kit can't attest the operator's command fronts a secure element) — labeled "external key — operator-fronted" with an explicit caveat. Regression tests: comprehensive-mandate suite (signWithIdentity / loadOrCreate / recordRevocation fail closed; audit falls back to keyless) + signer env-isolation. Full suite green (2261 tests). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consolidated release branch — merges the four 1.4.0 PRs into one tidy merge with a single
[1.4.0]CHANGELOG and version bump. Supersedes #2, #3, #4, #5 (merge this instead of those four).1.4.0 contents
kit checkfinding (JSON +[CWE]tags); local deterministic catalog.http-status/file-existschecks replace shellverify_cmd; no arbitrary-command-execution sink; agent-safe + autonomy-friendly.kit context check/use/--prompt+kit hooks add context-checkpre-push gate. Verifies each CLI's exact account+project; never trusts the ambient pairing.--helpfix (fix(memory): --help must not run a side-effectful subcommand #5): a help flag never runs a side-effectful subcommand.CHANGELOG consolidated under
[1.4.0](Added / Changed / Fixed / Security).package.json= 1.4.0.Gates
tsc clean, build clean, full suite 2228 green, no-internal-leaks pre-push passed.
To release
Merge this to
main, then sign + push the tag:git tag -s v1.4.0 -m "..." && git push origin v1.4.0→publish.ymlruns audit + supply-chain + tests + build:prod +npm publish --provenance.🤖 Generated with Claude Code