ReceiptDB by Counterfoil Labs

Security

Security at ReceiptDB.

ReceiptDB runs in your cloud, on your PostgreSQL. This page is for your security review: where data lives, what can leave your network and when, and how access, erasure and the audit trail are enforced.

Deployment

ReceiptDB is a layer on the PostgreSQL you already operate, not a hosted service. A stateless API runs in your cloud, on Kubernetes with the Helm chart or on Docker, in front of PostgreSQL 16 or 17 with pgvector: self-managed, Amazon RDS, Cloud SQL or Azure Database for PostgreSQL. Records, vectors, the lineage graph and the audit log are ordinary tables, so your existing backups, monitoring and access controls apply.

Counterfoil Labs hosts nothing and receives nothing. There is no telemetry, no update check and no licence server: Enterprise licences are verified offline.

What leaves your network

Nothing, unless a setting names a destination. Each outbound call is an integration you switch on, and receipt config check shows which are set:

  • A model you choose, for answers, grounding checks or the model scanner. Search, explain, lineage, retraction and erasure never call a model, and a local model keeps it in your network.
  • An embedding endpoint, when you configure a hosted embedder.
  • Scanners you enable, such as Lakera Guard or your own HTTP classifier; never a source whose egress labels don't allow that destination.
  • Connectors Enterprise reading the content sources you name.
  • Your KMS Enterprise, to unwrap the master key at start.
  • Your SIEM, webhooks and tracing: Splunk, OpenTelemetry or syslog; signed webhooks; OTLP spans.
  • Your privacy and lineage platforms: OneTrust, Transcend, OpenLineage.
  • Answer spans to Langfuse or Phoenix, when you name one.

Your frameworks' own settings are yours: Haystack sends usage statistics to its makers when a pipeline runs (the first run, then at most once a minute per pipeline), with ReceiptDB's document store in it or not, unless HAYSTACK_TELEMETRY_ENABLED=False is set before Haystack is imported. ReceiptDB doesn't change another library's setting.

Data protection

Labels that fail closed

Every record carries labels: trust, licence, readers, data subjects, personal data, egress and validity. Labels flow down the lineage graph, so a derived record is never more trusted, or less restricted, than its riskiest input. Content without labels is treated as untrusted and restricted, and permissions a connector can't map deny access.

Access that follows the data

Every search is access-checked. A summary or an answer is never readable by someone who couldn't read its sources, and revoking a group's access to a source revokes it on everything built from it, in one transaction.

Egress control

Label where content may be sent, such as "local only" or "Anthropic EU". Search enforces it for the model reading the results, and answers record where their sources went.

Erasure

Erasure reaches every chunk, vector, memory and answer derived from a person's data and either completes everywhere or changes nothing. What it keeps of a person, a document or its content is an unreadable fingerprint, keyed with a secret you hold outside the database, so a stolen copy can't confirm who was erased. The certificate can be checked against the database afterwards by an independent verifier.

Crypto-shredding Enterprise

Text about each person is encrypted with its own key, under a master key held in AWS KMS, Google Cloud KMS or Azure Key Vault. Erasing a person destroys their key, so their text can't be read back from the live database, nor from a restored backup when the key store lives on a separate instance; seal the vectors too, and so do their embeddings.

Suspect content

Scanners hold flagged sources and their derivatives out of retrieval until someone reviews them, and each scanner's verdict stays on the record. A personal-data detector flags what a writer never declared, built in or with Microsoft Presidio; it only tightens labels and never stores what it matched.

Identity and access

Audit and integrity

ReceiptDB gives you the evidence; how you use it determines compliance.

Supply chain

Every release image ships with a software bill of materials and SLSA build provenance, for your supply-chain review.

Every change is checked before it merges: Semgrep for the code and gitleaks for secrets, and every dependency change goes through pip-audit and Trivy, which scans each image and refuses a fixable high-severity flaw.

Operations

Reporting a vulnerability

Write to hello@counterfoillabs.com (also in security.txt). Start your review with our threat model: every trust boundary, STRIDE over each, and the AI-specific threats, from prompt injection to a malicious tenant, with each control mapped to the code and tests that hold it; ask for it. We also answer security review questionnaires: ask for one.