Skip to Content

Security and threat model

What a Sniptide server operator can see, what is encrypted, how tokens and sessions are stored, what deletion removes, how agents should treat snippets, and how to report a vulnerability.

Sniptide stores ordinary pastes in plain text in Postgres. The server operator can read them, including private and password-protected pastes. For files and descriptions you want to keep from the operator, turn on end-to-end encryption when you create the paste.

Who can see what

WhoWhat they can read
Anyone with the linkLive public and unlisted pastes, subject to any password, burn-after-read and encryption key requirements. Eligible public pastes also appear on your profile.
People you inviteLive pastes you shared with them, with view or edit access. Signed-in invitees skip the paste password prompt. Burn-after-read pastes still open through the share link, and encrypted pastes still need a key.
Your API tokens and agent connectionsYour own live ordinary pastes and collections. The token API also gives access to your env groups.
The server operatorOrdinary paste contents and revisions, metadata for encrypted pastes, and env group values using the server's key.

The Sniptide team operates Sniptide Cloud. If you use a self-hosted instance, the person or team who runs it is your operator. Anyone who can read the database or its backups can read ordinary pastes and their revisions. Decrypting env group values also requires the server's key.

Encryption

DataApplication storageNotes
Ordinary paste titles, descriptions, files and revisionsPlain text in PostgresVisibility, passwords and burn after read control access through the app.
Browser-encrypted paste descriptions, file names and contentsAES-256-GCMYour browser encrypts these before upload and keeps the key. The server stores the language as text and the browser infers syntax highlighting from the decrypted file name. Titles, links and other metadata stay readable to the server.
Env group valuesAES-256-GCMEncrypted with a key the server derives from ENV_SECRETS_KEY or BETTER_AUTH_SECRET. See Encrypted secrets.
Env group names, variable names and labelsNot encryptedOnly values are encrypted.
Connected integration tokens (GitHub, Linear, Notion, Slack)AES-256-GCMEncrypted with a key the server derives from ENV_SECRETS_KEY or BETTER_AUTH_SECRET using HKDF.

Anyone with the full link to an unlisted encrypted paste has its key. Browser encryption also depends on the JavaScript your server delivers and the security of your device. See what encrypted pastes protect.

The server can decrypt env group values. Their encryption protects a database dump or backup while the encryption key stays separate. Disk and volume encryption depend on where Postgres runs. For self-hosting, configure HTTPS and encrypt your backups.

Store credentials in an env group if you trust the operator with them. To share a credential once while keeping it from the server, combine browser encryption with burn after read.

How credentials are stored

CredentialHow Sniptide stores it
Account passwordHashed with scrypt by Better Auth. The password itself is never stored.
Paste passwordHashed with scrypt and a random salt.
Env group share link and its passwordOnly hashes are stored, and every reveal checks the password, expiry and revocation.
Personal API token (snpt_…)32 random bytes, shown once. Only a SHA-256 hash and a short prefix are stored. Tokens can expire after a period you choose, or never.
Agent OAuth connectionCodes and tokens are stored as SHA-256 hashes. Codes expire after 10 minutes, access tokens after one hour, and refresh tokens after 30 days without use. Reusing a refresh token ends the connection. See Token lifetime and revocation.
Browser sessionA random token in a signed, HTTP-only cookie. The database keeps the token itself with the device's IP address and user agent, which Settings > Account shows under Sessions. A session lasts seven days and is extended while you use it.
GitHub and Google sign-in tokensBetter Auth stores the access and refresh tokens the provider returns. They are not encrypted in the database. Sniptide requests sign-in scopes only.
Connected integration tokensAccess tokens for GitHub, Linear, Notion and Slack integrations are encrypted with AES-256-GCM using a key derived from ENV_SECRETS_KEY or BETTER_AUTH_SECRET.

Protect database access and the cookie-signing secret. Rotating BETTER_AUTH_SECRET signs users out. Follow Rotate the auth secret to keep existing env groups and connected integrations readable.

A read-only token can retrieve decrypted env group values through the API, even though the MCP tool list has no env group tools. Give a token only to clients you trust with your env groups. Revoke tokens you no longer use under Settings > API tokens.

What deletion removes

ActionWhat happensWhen the data is gone from the database
Move to trashThe link stops working. You can restore the paste for 30 days.30 days later, when the hourly purge job runs
Delete forever or empty trashThe paste, its files, revisions, stars, shares and view history are deleted.At once
Expiry passesThe link stops working. You can set a new expiry to bring it back.On an hourly purge after 30 days
Burn after readThe first reveal moves the paste to your trash, where you can restore it as a private paste.On an hourly purge after 30 days
Edit an ordinary pasteOld content can remain in its revisions. The 20 newest revisions keep a full copy.When the revision's content ages out or the paste is deleted
Delete your accountYour pastes, collections, env groups, tokens and sessions are deleted.At once

Burn after read closes the share link after the reveal. The database still holds the paste while it is in the trash. Select Delete forever in Trash to remove it sooner.

If you pasted a secret by mistake, editing it out isn't enough, because the earlier revision still holds it. Delete the paste forever and rotate the secret.

API tokens and agents can move a paste to the trash, but they never delete one for good.

Deletion removes rows from the live database only. Database backups keep deleted pastes until the backups themselves are deleted, and the operator decides how long that is. Moderation records keep a removed paste's ID and the reason for the decision, but not its content. Abuse report records and reviewer audit events also survive paste and account deletion.

What the server records about readers

  • View analytics. Each view is stored with the referrer's host, the country the CDN reports and the device type; raw reads and copies store only the device type. All three store a daily visitor HMAC of the IP address and user agent under a salt that changes every UTC day. The rollup job deletes old salts from the live database after the following day ends. Backups may retain them.
  • Request logs. When enabled, request logs use route patterns such as /[slug] and record status and duration. A reverse proxy or CDN can keep its own logs with full URLs and IP addresses.
  • Product analytics and error tracking. A configured POSTHOG_KEY enables explicit analytics events and scrubbed server error reports. Browser analytics have session replay disabled. See monitoring settings.
  • Instance telemetry. Self-hosted instances send aggregate usage and deployment information by default. See what instance reports contain and how to turn them off.

Treat snippets as untrusted input

A snippet read over MCP can contain instructions from a gist, a website or a collaborator. The MCP server labels snippet content as user-provided data and passes it through without a prompt-injection filter. The agent must treat the content as data. The MCP tools themselves cannot run code or write local files.

  • Use the read scope for agents that only look up snippets.
  • Keep your client's approval prompts enabled for shell commands and file writes. Review proposed changes before an agent applies a snippet or collection.
  • Limit edit access to people you trust to change the snippets your agents use.

Run your own instance

With self-hosting, you control operator access and storage.

  • Keep BETTER_AUTH_SECRET and ENV_SECRETS_KEY secret, and store them apart from database backups. Anyone holding both a backup and the key can read your env groups and integration tokens. Rotating the active key without migrating makes existing env group values unreadable and disconnects connected integrations.
  • Restrict who can reach Postgres and its backups. They hold ordinary pastes in plain text.
  • Serve the app over HTTPS only, and consider a separate share domain so shared pages run on a different origin than the signed-in app.
  • Close sign-up or restrict it to allowed emails with the sign-in settings if the instance isn't meant for the public.
  • Upgrade when a release fixes a security issue.

Report a vulnerability

Use GitHub's private vulnerability reporting form. Include the affected version or URL, reproduction steps and the impact you observed. See the disclosure policy for scope and how maintainers handle reports.

Was this helpful?

On this page