Security
Your books stay yours
Your books are among the most sensitive records your business has. This page sets out, control by control, how Ledgorithm protects them and what stays in your hands.
Looking for how the numbers are kept exact? How we keep every number exact
Overview and shared responsibility
This page describes the controls in place in Ledgorithm today.
Security is shared between three parties:
- Ledgorithm is responsible for the application: its access rules, the ledger, the audit trail, and the controls on AI agents.
- Our providers run the hosting, database, email and bank data services underneath. The privacy policy names each one and the data it handles.
- You decide who is invited, which role and entities each person gets, and which AI agents are connected.
Encryption
In transit
Ledgorithm is served over TLS. Every response carries a strict transport security header with a two-year lifetime that covers subdomains, so a browser that has visited once refuses an unencrypted connection.
Secrets at rest
- Bank access tokens and entity tax ID numbers are kept in encrypted secret storage, not in ordinary tables. Screens, exports and agents see only the last four digits of a tax ID.
- Agent API keys and invitation links are stored only as SHA-256 hashes. The secret is shown once, when it is created, and is left out of the audit trail.
- Ledgorithm’s own tables hold no passwords. Sign-in is handled by our authentication provider.
Separation between businesses
Every table has access rules enforced by the database itself, so a mistake in application code cannot show one business the records of another.
- A read is allowed only if you are a member of that business and, for entity records, only if that entity is one you were given. A member can be limited to a list of entities.
- Signed-in users have no permission to insert, update or delete rows in any table directly. Every change goes through a database function that checks membership, role and entity again before it writes.
- Signed-out visitors have no table access. They can reach five named functions, which serve public pay links, the service health check and the agent key gateway.
These rules are tested. Our build fails if any table lacks access rules or grants direct writes. More than 280 database test files run on every change. They include attempts by an outsider, a member of another business, an entity-limited member and an agent to reach records they should not.
Sign-in and sessions
- Passwords. At least 12 characters, with a confirmed email address. The sign-up form gives the same answer whether or not an address already has an account.
- Two-step verification. Any user can add an authenticator app. Owners and accountants must use it once their account is seven days old. Some actions need a two-step session at any age: connecting an AI agent, creating an agent key, approving agent proposals, changing members and requesting deletion.
- Recent sign-in. A full data export and a deletion request need a password or authenticator check made in the last 15 minutes. A session that was only refreshed does not count.
- Sessions. The session token’s signature is checked on each request, and each page confirms the user with the sign-in service before it reads data. Form posts from another site are refused.
- AI assistants. An assistant connects with OAuth. You approve it on a consent screen, with two-step verification, and choose the entities it may see. Its token is tied to that one connection and does not carry your list of businesses.
Roles and least privilege
Each member has one role per business. Roles are enforced in the database, not only in the screens, and a test fails the build if the two disagree.
| Role | Can | Cannot |
|---|---|---|
| Owner | Everything, including members, full exports, access reviews and deletion requests. | Be removed or demoted while they are the last owner. |
| Admin | All bookkeeping and corrections, bank connections, agent keys, and managing bookkeepers and viewers. | Close or reopen a period, post to restricted accounts, or grant the admin or accountant role. |
| Accountant | All bookkeeping and corrections, restricted accounts, closing and reopening periods, approving agent proposals, and reading the audit history. | Manage members. |
| Bookkeeper | Day-to-day entries: categorizing, invoices, bills and reconciling. | Use controls kept for an owner, admin or accountant, such as voiding a deposit or undoing a reconciliation. Close periods or manage members. |
| Viewer | Read the entities they were given. | Change anything. |
| AI agent | Act for the person who connected it, within the level that person set. | Go beyond the role of that person or the entities chosen for it. |
Nobody can change their own role. Only an owner can grant the admin or accountant role. Owners can record a review of who has access each quarter.
AI agents
An agent is a separate, named actor. What it may do is checked in the database on every call, whatever the agent says about itself.
- Scoped connections. An agent connects through OAuth consent or an API key that a person creates. It sees only the entities chosen for it, which can be fewer than the person sees.
- Levels. Each agent has a level, set by a person with two-step verification. Draft only is the default: the agent prepares drafts and proposals, and nothing reaches the books until a person approves it. Limited also lets it issue, void and pay bills in the books within a per-bill limit and a 24-hour total. Full allows the bookkeeping that the person who connected it can do.
- Approval. An agent proposal is approved by an owner or accountant in a two-step session, and the entry records both the agent and the approver.
- People only, at every level. Connecting an assistant, creating a key, inviting or removing members, changing an agent’s own level or limits, bank connections and deletion requests.
- Untrusted text. Bank descriptions, document contents, emails and counterparty names are returned to agents in fields marked as untrusted. Our server treats them as data and never as instructions.
- Limits. The agent endpoints allow 60 reads and 30 writes a minute per agent. Keys also carry their own per-invoice and daily limits. A write needs a request key, so a retry is applied once.
- Revoking. Each call rechecks the connection, so a revoked agent or key stops at once. Keys expire, after 90 days by default. Removing a member revokes that person’s agents and keys in the same step.
Recording a payment writes to the books. It does not move money. Read more about agent controls
The ledger and audit trail
- Posted entries cannot be edited. The database rejects any update or delete of a posted entry or line, including from maintenance access. A correction is a reversal and a new entry, with a reason, and the original stays visible.
- One way in. Only the posting functions write to the ledger. They refuse an entry that does not balance or that is dated in a locked period.
- Period locks. An owner or accountant sets the lock date for an entity. Setting it is itself recorded.
- Every write is attributed. Each change is recorded with who made it (a person, an agent, a bank connection or a scheduled job), what it was, when, and a request ID.
- The audit trail is append-only. The database rejects edits and deletions of audit events. Each event stores a SHA-256 hash that includes the hash of the event before it. An owner or accountant can run a check of that chain in Settings. The check proves the history is internally consistent.
The full audit history is readable by owners and accountants who have access to every entity.
Bank connections
- Read-only. We request transaction data only. Ledgorithm cannot move money in your accounts.
- No bank passwords. You sign in to your bank on our bank data provider’s own screens. Ledgorithm never receives the login.
- Where the token lives. The access token for a connection is kept in encrypted secret storage. It is not in any table, audit event or API response. Only the background job that syncs bank data can read it. The app’s screens and AI agents never can.
- Who can connect. An owner, admin or accountant. Never an agent.
- Disconnecting. Disconnect removes the connection at the provider first, then deletes the token. Transactions already imported stay in your books.
- Incoming notices. A notice from the provider is accepted only after its signature is verified, and it can only queue a sync. A repeated sync changes nothing.
Application security
- Security headers. Every page tells the browser not to guess content types, sends no referrer to other sites, and turns off camera, microphone and location access.
- Content security policy. On every route, the policy blocks framing by other sites, plugin content, changes to the base address, and form posts to any site other than Ledgorithm and our payment provider’s hosted checkout. Documents you download are served under a sandbox policy so they cannot run script.
- Input validation. Requests are checked on the server and again in the database. Money is held as whole cents, never as floating-point numbers. Request sizes are capped.
- Idempotency. Writes carry a request key. A repeated request returns the first result and changes nothing.
- Rate limiting. Agent calls are limited per agent, repeated bad keys are slowed, and outgoing email is capped per business.
- Uploads. Files are limited to 20 MB, checked against their actual size, hash and type, and kept in private storage. A download needs current access to the entity. There are no public file links.
- Testing. Each change runs lint, strict type checks, unit and contract tests, database tests on two database versions, and browser smoke tests. Dependencies install from a locked file.
Infrastructure and operations
- Location. Ledgorithm stores and processes data in the United States.
- Background jobs. Bank sync and document processing run under their own narrow database roles. Each role can call only a short list of named functions and cannot read tables directly.
- Secrets. Credentials are supplied through environment settings and are excluded from the source repository.
- Logging. Sign-in and workspace failures are logged as an event name, a request ID and an error code, without the message, the email address or anything you typed.
Data retention, export and deletion
Export. An owner can download complete lists of the business’s records as Excel or CSV from Owner downloads, after two-step sign-in. We suggest a monthly download that you keep yourself.
Deletion. An owner with full access starts a deletion request in Settings, with two-step verification and a recent sign-in. The request deletes nothing at once. It starts a 30-day grace period in which the owner can cancel it and keep working. Before a deletion completes, an owner can download a final private archive. Removal after the grace period is a separate, reviewed step.
Retention. The app treats journal entries and attached documents as protected for seven years from the date they were recorded. The privacy policy explains what is kept after a deletion and why.
Privacy and sub-processors
The privacy policy says what we collect and how we use it. It lists every sub-processor, what each one does and the data involved.
Report a vulnerability
Email hello@ledgorithm.com with what you found and how to reproduce it. The same contact is published in our security.txt file.
Please test only against your own account, avoid anything that could disrupt the service or reach another customer’s data, and give us a reasonable chance to fix the issue before you share it.
If a security incident affects your data, we will tell you as the law requires.
What you can do
- Turn on two-step verification, and ask every member to do the same.
- Give each person the lowest role that fits their job, and limit them to the entities they work on.
- Review members, pending invitations and connected agents each quarter. Remove anyone who has left.
- Start a new agent at Draft only. Raise its level or limits when you have seen its work.
- Treat an agent key like a password, and revoke it when it is no longer used.
- Download your books each month and keep the file yourself.