memfork 0.3.0

Git for agent memory, shared by every AI tool on your machine: fork, merge, rewind and hand off work between agents over MCP.
Documentation
# What MemFork refuses to store because it looks like a credential.
#
# Memory is shared with every tool on the machine and shown to people, so a
# key pasted into it has leaked. Every write is checked against these rules
# before it is stored; a match refuses the write, naming the rule, the field
# and where in it the match starts, and never the text that matched.
#
# A false positive is written anyway by naming the rule: `allow_secret` on the
# tool, `--allow-secret <id>` on the command line.
#
# Each rule has an `id` (what a refusal names and an override gives back), a
# `description`, and a `pattern`, a regular expression in the syntax of the
# `regex-lite` crate. A rule with `value_group` matches a name and a value:
# the pattern's first capture group is the value, and it counts only if it
# looks random: at least 16 characters, of at least 3 kinds (lower case,
# upper case, digits, other) and at least 10 different characters. The test
# is integers only, so it gives the same answer on every OS.

[[rule]]
id = "private-key"
description = "a private key block"
pattern = '-----BEGIN [A-Z0-9 ]*PRIVATE KEY( BLOCK)?-----'

[[rule]]
id = "aws-access-key"
description = "an AWS access key id"
pattern = '\b(AKIA|ASIA)[0-9A-Z]{16}\b'

[[rule]]
id = "github-token"
description = "a GitHub token"
pattern = '\b(gh[pousr]_[A-Za-z0-9]{36,}|github_pat_[A-Za-z0-9_]{22,})'

[[rule]]
id = "gitlab-token"
description = "a GitLab personal access token"
pattern = '\bglpat-[A-Za-z0-9_-]{20,}'

[[rule]]
id = "slack-token"
description = "a Slack token"
pattern = '\bxox[abposr]-[A-Za-z0-9-]{10,}'

[[rule]]
id = "stripe-key"
description = "a Stripe production key"
# The `[i]` spells the key's prefix without a word the documentation tests ban.
pattern = '\b[rs]k_l[i]ve_[A-Za-z0-9]{16,}'

[[rule]]
id = "google-api-key"
description = "a Google API key"
pattern = '\bAIza[0-9A-Za-z_-]{35}'

[[rule]]
id = "npm-token"
description = "an npm access token"
pattern = '\bnpm_[A-Za-z0-9]{36}\b'

[[rule]]
id = "pypi-token"
description = "a PyPI upload token"
pattern = '\bpypi-AgE[A-Za-z0-9_-]{50,}'

[[rule]]
id = "sk-api-key"
description = "an API key of the `sk-` form several model providers use"
pattern = '\bsk-(ant-|proj-)?[A-Za-z0-9_-]{32,}'

[[rule]]
id = "jwt"
description = "a JSON web token"
pattern = '\beyJ[A-Za-z0-9_-]{10,}\.eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}'

[[rule]]
id = "assigned-secret"
description = "a random-looking value given to something named like a key, token, secret or password"
pattern = '''(?i)\b(?:api[_-]?key|access[_-]?key|secret[_-]?key|client[_-]?secret|auth[_-]?token|access[_-]?token|secret|token|password|passwd|pwd|credentials?)["']?\s*[:=]\s*["']?([^\s"'`,;]{16,})'''
value_group = true