This repository builds a security tool. The same discipline applies to agents that develop it.
- Never read
key.txtorsecrets.encdirectly (test fixtures excepted, and even then only via the store package API). - Never print, log, or commit a secret value — including in test output.
- When debugging the store, use the store's own
List()(masked) or assert on masked forms, not rawGet(). e2e_test.pyintentionally asserts plaintext does NOT appear in MCP output. Keep it that way.- If you must inspect an on-disk blob, read it as bytes and check only for the armor markers / absence of plaintext — never dump the decrypted data.
secrets.encmust never contain plaintext key material (age-encrypted).key.txtmust be0600, store dir0700.- Every MCP tool result and resource must be masked — no plaintext in tool results, ever.
putmust accept avalue_filepath, read it, and delete it after.- Masking rules live in
internal/mask— keep the entropy/prefix/URL segmentation tests green.
- Run
go test ./...before committing — all packages must pass. - Run
go vet ./...— no warnings. - Run
python3 e2e_test.pyafter any change tointernal/mcporinternal/store— the protocol round-trip must stay green. - Keep the Go SDK (github.com/modelcontextprotocol/go-sdk) on a version with no open OSV advisories; bump deliberately.