โ† Back to site

Security

Last updated 12 August 2026

This page describes how DiaryRobo actually protects data, and โ€” in equal detail โ€” what it does not yet do. A security page that only lists strengths tells you nothing, because every service has gaps and the useful question is which ones.

What is in place

Tokens are never stored

When you register a robot, its access token is generated from 32 bytes of cryptographically secure randomness, shown to you once, and then discarded. Only a SHA-256 hash is written to the database. If our database were copied, the tokens in it could not be used โ€” there are none in it.

A leaked token does not cost you the diary

Rotation issues a new token and invalidates the old one immediately, keeping all existing entries. This matters more than it sounds: when the only remedy for a leak is to start over and lose your data, people quietly keep using the compromised token instead.

curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://diaryrobo.onrender.com/robots/$ROBOT_ID/rotate-token

One robot's token opens only that robot

Every endpoint checks the token against the specific robot in the URL. A token for robot A returns 401 on robot B โ€” for reading, exporting, deleting and rotating alike. This is covered by tests that specifically try to cross the boundary.

Deletion actually deletes

Removing a robot cascades at the database level to its diary entries, their raw telemetry payloads and its access records. There is no orphaned data left behind. We verified this against the live database rather than assuming the foreign keys were right.

Row-level security, with helpers out of reach

Access rules are enforced in the database itself, not only in application code. The helper functions those rules use were originally in the public schema, which made them callable directly through the REST API โ€” a signed-in user could have probed which robots they had access to. They now live in a schema that is not exposed.

Encryption

All traffic is over TLS. Data at rest is encrypted by Supabase, and backups are encrypted. Note what this does and does not mean โ€” see the gaps below.

Secrets are not in the repository

Service keys and tokens live in environment variables on the hosting platform. .env is git-ignored. The public code contains no credentials.

What is not in place

These are real gaps, not hypotheticals

They are listed so you can decide whether this service is appropriate for what you want to do with it. For a personal companion robot most of them do not matter much. For a care organisation handling real patients, several of them are disqualifying.

How to protect yourself

Reporting a vulnerability

Write to hello@diaryrobo.com with enough detail to reproduce the issue. We will confirm receipt within 72 hours and tell you what we intend to do.

We have no bug bounty โ€” there is no budget for one. What we can offer is that reports are welcome, will be taken seriously, and that we will not respond to good-faith research with legal threats. Please do not access data belonging to robots that are not yours; if you need a robot to test against, register one, it takes a minute.

If you find something, you will be told what happened to it

Once a reported issue is fixed, this page is updated so that other people can see what changed and when. Quietly patching and saying nothing is how a security page stops being worth reading.

Changes to this page

12 August 2026 โ€” First version. At the same time: added deletion, token rotation, retention limits and data export; moved row-level-security helper functions out of the publicly exposed schema.