Repository navigation
fix(redact): catch URL-embedded credentials and sk-svcacct/admin keys - #77
Closed
sandstream wants to merge 1 commit into
Closed
sandstream wants to merge 1 commit into
sandstream wants to merge 1 commit into
Conversation
|
✅ Docker image built successfully
|
Two redaction false-negatives found during a security review:
- Connection-string passwords (`postgres://user:pw@host`, `redis://:pw@host`,
`mongodb+srv://…`) passed through unredacted: the `kv-secret` class stops at
the `:`/`@`. Added a `url-credentials` pattern that redacts ONLY the password
and keeps scheme/user/host as diagnostic context (via a per-pattern
`replacement` — new optional field on RedactPattern).
- Modern OpenAI `sk-svcacct-…` / `sk-admin-…` keys missed: their internal hyphen
breaks the bare `sk-[alnum]{40,}` run. Broadened the `ai-api-key` prefix list.
Tests cover the DB-URL redaction (password gone, host kept), a userless redis
URL, a plain ported URL staying untouched (no false positive), and the
service-account key. ReDoS-safe (no nested quantifiers).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
sandstream
force-pushed
the
fix/redaction-false-negatives
branch
from
June 23, 2026 19:46
a66f1be to
da228e2
Compare
|
✅ Docker image built successfully
|
Merged
2 tasks done
sandstream
added a commit
that referenced
this pull request
Jul 6, 2026
…rification (R4/#77) (#245) * feat(check): gate on memory-hooks liveness (self-playing loop, R5) The self-playing loop (memory capture + statusline) depends on hooks in ~/.claude/settings.json. If they were installed here (durable marker present) but have since vanished, capture is silently OFF — the store looks installed but records nothing (a false green). `kit doctor` already flagged this and `kit memory uninstall` already emits an audit event; this folds the same liveness into the `kit check` security gate. New checkMemoryHooksLiveness(): skips when never installed (CI / fresh machine) and after a clean uninstall (which clears the marker), so it FAILS only on genuine silent degradation (marker present + a hook gone). Env-injected tests cover skip/pass/fail. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2 * feat(memory): verify shared-tier signatures on the recall inject path (#77) recentDecisions (SessionStart recovery / touched-decisions notice) replayed curated shared entries into every session as trusted "Curated team decisions" without checking their Ed25519 signature — so a tampered or forged team entry rode in as trusted (holistic-review #77). The sign/verify machinery existed (shareEntry signs, kit memory verify verifies) but nothing verified on the inject path. New recallSafeShared(root, entries): drops a bad-sig entry ALWAYS (tamper must never be replayed), and under a committed .kit-policy.signers anchor injects ONLY org-trusted entries; with no anchor everything but tamper is kept so the common team-without-anchor case isn't broken. Wired into recentDecisions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2 --------- Co-authored-by: Claude <noreply@anthropic.com>
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.
Two redaction false-negatives (security audit):
postgres://user:pw@host,redis://:pw@host) passed through —kv-secretstops at:/@. Added aurl-credentialspattern that redacts only the password and keeps scheme/user/host (via a new optional per-patternreplacement).sk-svcacct-…/sk-admin-…keys missed (internal hyphen breaks the baresk-[alnum]{40,}run). Broadened the prefix list.Tests: DB-URL redaction (host kept), userless redis URL, plain ported URL untouched (no false positive), service-account key. ReDoS-safe.