Repository navigation
fix(check) secrets FP de-noise + feat: kit panic + memory path→cluster push-surfacing - #168
Merged
Merged
Conversation
The basic `git grep` fallback (used only when trufflehog is absent) cried `severity: high` and flagged its own two dominant false-positive classes: test/fixture files full of deliberately-fake credentials, and all-caps identifier VALUES that are env-var NAMES (e.g. `SOCKET_SECURITY_API_TOKEN`), not secrets. That produced a permanent "11 potential secrets" warn on a clean repo. Now the fallback mirrors the trufflehog branch's philosophy: it's an UNVERIFIED scan, so it's a `medium` warn (not high), and it skips test/ fixture/mock paths + all-caps identifier values. The AUTHORITATIVE scanners (trufflehog locally + the CI gitleaks job) still scan everything and verify live, so this only de-noises the local stopgap — it does not weaken the gate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
…tion + audit + checklist)
One-command compromise response (3.0 control-plane kill-switch):
1. rotate the local identity (old key archived; its past signatures stay
verifiable, new trust is the new key);
2. emit a SIGNED, append-only revocation of the old key
(~/.kit/revocations.jsonl), signed BY the new key — asymmetric, so it
propagates as public data with no shared secret to leak;
3. record an `identity.panic` event in the tamper-evident audit log (itself
signed by the new identity);
4. print the platform-revocation checklist for the accounts kit does NOT own
(GitHub / Anthropic / Apple / vault) with links.
`kit audit verify` now surfaces entries signed by a now-revoked key (valid as
history; the key is no longer trusted for new signatures — informational, not a
failure). New identity primitives: recordRevocation / loadRevocations /
isRevoked / revocationStatement.
Honest boundary (printed + documented): kit owns its keys + the revocation list
+ verification + the audit record; it only orchestrates platform-account
revocation. Top-level experimental command; public surface regenerated.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
Pull recall can't guarantee you see a settled decision — a bad query misses it. The guardrail must be PUSH: touch files under an area and kit deterministically surfaces that area's ACTIVE decisions. - src/memory/clusters.ts: committed `.kit/shared/clusters.json` maps area→globs; zero-dep globToRegExp (** spans segments, * within one), clustersForPaths, decisionsForPaths (active only — superseded/reversed never resurface), changedPaths (git diff vs HEAD). - `kit memory context [paths…|--changed]`: prints active decisions for the touched areas (--json for tools). - UserPromptSubmit reminder appends a bounded (≤2 areas × ≤2 decisions) notice for the area(s) your working-tree changes fall into — deterministic "touch area X ⇒ see X's decisions", not a query lottery. Fail-open. - Seeded .kit/shared/clusters.json for kit (dogfood: memory/identity/ install-gate/ci-audit/secrets areas). Public surface regenerated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
|
✅ Docker image built successfully
|
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.
Description
Three independent, additive changes (one commit each, reviewable in order):
1.
fix(check)— de-noise the degraded secrets-scan fallbackThe basic
git grepfallback (used only when trufflehog is absent) criedseverity: highand flagged its own false-positive classes: test/fixture files full of deliberately-fake credentials, and all-caps identifier values that are env-var NAMES (SOCKET_SECURITY_API_TOKEN), not secrets — producing a permanent "11 potential secrets" warn on a clean repo. Now it mirrors the trufflehog branch's philosophy (unverified ⇒medium, not high) and skips those two FP classes. The authoritative scanners (trufflehog locally + the CI gitleaks job) are unchanged and still scan everything.2.
feat: kit panic(experimental) — identity kill-switchOne-command compromise response: rotate the local identity (old key archived, its past signatures stay verifiable) → emit a signed, append-only revocation of the old key (
~/.kit/revocations.jsonl, signed by the new key — asymmetric, propagates as public data) → record anidentity.panicevent in the tamper-evident audit log → print the platform-revocation checklist (GitHub / Anthropic / Apple / vault).kit audit verifynow surfaces entries signed by a revoked key (valid as history; key no longer trusted for new signatures). New primitives:recordRevocation/loadRevocations/isRevoked/revocationStatement. Honest boundary: kit owns its keys + revocation list + audit; it only orchestrates platform-account revocation.3.
feat(memory)— path→cluster push-surfacing (design gap #3)Pull recall can't guarantee you see a settled decision; the guardrail is now PUSH. A committed
.kit/shared/clusters.jsonmapsarea → globs(zero-dep glob→regex).kit memory context [paths…|--changed]prints the active decisions for the touched areas, and the UserPromptSubmit reminder appends a bounded notice for the area(s) your working-tree changes fall into — "touch area X ⇒ see X's decisions". Superseded/reversed decisions never resurface.Type of Change
Testing
npm test) — 1900 pass / 0 fail;run-security-check.mjsPASS (19 ok)Verified live:
kit panicrotates + writes a signed revocation + audit line + checklist;kit memory context src/memory/db.ts src/commands/panic.tsmaps to areasmemory/identity.Breaking Changes
None / N/A — all additive and backward-compatible.
🤖 Generated with Claude Code
https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
Generated by Claude Code