Skip to content

v0.4.1 — Enforced secret redaction

Choose a tag to compare

@2672243194 2672243194 released this 21 Aug 08:58
· 10 commits to main since this release

The secret-redaction release

"Secrets never enter the vault" was a rule; now it's a mechanism.

Now on PyPI

pip install mnemosyne-lite

The distribution name is mnemosyne-liteagentbrain was rejected by PyPI as too
similar to an existing project. The CLI command and the Python import name remain
agentbrain, and the GitHub repo keeps its name. Python >= 3.10.

Enforced on write

memory_ingest now scans lesson content and summaries for credential-shaped content before writing:

  • OpenAI / Anthropic keys (sk-…, sk-ant-…)
  • GitHub tokens (ghp_/gho_/ghu_), AWS keys (AKIA…, 40-char secrets)
  • Slack (xox…), Google (AIza…), PyPI tokens
  • Authorization: Bearer … headers, private-key blocks
  • Generic password= / api_key= / secret= / token= assignments

On a hit the write is refused with a clear message telling the agent to substitute an ${ENV:VAR_NAME} reference — the value stays in env/keyring, the lesson stores only where to find it.

Designed to not fight you

  • ${ENV:VAR} references, sk-xxx stand-ins, YOUR_KEY / <placeholder> teaching examples all ingest normally — zero false positives on real-world prose (verified against a live vault).
  • lint now also reports SECRET findings for pre-existing lessons — read-only as always; lint never modifies files.
  • The boundary stays "block the machine, not the owner": agents get refused, hand-written files are never touched.

Verification

  • 84 tests (10 new: pattern detection, placeholder exemption, ordinary-prose non-matches, ingest refusal + non-write, lint reporting + file untouched)
  • Live vault: 15 real lessons → zero false positives; fake credentials refused; placeholder lesson accepted
  • Published on PyPI: https://pypi.org/project/mnemosyne-lite/0.4.1/ (wheel + sdist, twine check PASSED)