What we access
The metadata of pull requests in repositories you connect, and the contents of the files each pull request changes. Read-only: the app cannot push, merge or change settings.
What we store
Scan results (findings, traces, risk scores, AI estimates), the content of scanned files — so reviewers can see the flagged lines — attestations and an audit log. Scoped to your organisation.
What we never do
Execute your code, use it to train AI models, share it with other customers, or ask for write access to your repositories' contents.
Architecture and data flow
Repository permissions, and why each is needed
pull_requestpushcheck_runcheck_suite. GitLab and Bitbucket connections need read access to merge/pull requests and repository content, and permission to post a commit/build status.| Permission | Access | Why |
|---|---|---|
| Pull requests | Read | To learn which files a pull request changes and to read its metadata (title, branch, author, commit). |
| Contents | Read | To fetch the contents of the changed files so the scanner can analyse them. No write access to your code. |
| Metadata | Read | Required by GitHub for every app: repository names and visibility. |
| Checks | Write | To post the scan result as a check run on the pull request, which is what can hold a merge. |
| Commit statuses | Write | Requested by the app manifest so a result can also be reported as a commit status. On GitHub, TrustLedger currently reports through check runs only. |
Source code, retention and deletion
How code is processed
Changed files are fetched when a pull request is opened or updated and analysed by the scanner as text. It never runs, builds or installs your code, and it has hard limits on file size and parse depth so a hostile file cannot exhaust it. Processing happens in TrustLedger's hosted infrastructure; we do not currently offer an on-premises scanner.
What is retained
Scan results and the content of each scanned file are stored so reviewers can see the flagged lines when they attest. By default nothing is deleted automatically: an organisation chooses a retention window between 30 days and 7 years in Settings. Automatic enforcement never deletes attested scans (they are the audit evidence), open items, or the audit log.
Deletion
Administrators can delete historical, unattested scans older than seven days, export the organisation's data, or delete the organisation's account and data from Settings. Attestations are immutable by database rule. Some records may be kept where the law requires it.
AI and model training
Your source code is used only to provide the service to your organisation. It is not used to train our models or third-party models, and it is not sent to external AI services for analysis — the engines run inside TrustLedger.
How data is protected
Encryption
HTTPS with HSTS everywhere. Data at rest is encrypted by the database provider. Two-factor secrets are additionally encrypted with AES-256-GCM, and backup codes are stored only as salted hashes.
Secrets and credentials
GitHub access uses short-lived app installation tokens requested when needed, not stored personal tokens. Incoming webhooks are rejected unless their HMAC-SHA256 signature verifies. Service credentials are held as environment secrets in the hosting provider, never in the repository.
Tenant isolation
Every organisation's rows are separated by Postgres row-level security. An automated test (built on scripts/tenantScopeAudit.cjs) fails when a server-side query on customer data is not limited to one organisation.
Access control
Role-based permissions checked on every API write; SAML single sign-on, two-factor authentication and SCIM deprovisioning; per-IP rate limits on every API route.
Audit log
Sign-ins, repository changes, exports, attestations and administrative actions are written to a hash-chained log: each entry commits to the one before it, so a removed or edited entry breaks verification.
Attestation integrity
An attestation records the reviewer, a timestamp and a payload hash, and is bound to the file's content hash: it carries over only to scans of byte-identical content. Trust Records and audit exports are signed with Ed25519; the public key is published at /.well-known/trustledger-export-signing-key and scripts/verify-trust-record.mjs verifies a document offline.
Threat model (summary)
| Threat | Control |
|---|---|
| One customer reads another customer's code or findings | Row-level security on customer tables, and a test that fails when a server-side query on an organisation's data is not limited to one organisation. |
| A forged webhook triggers scans or writes results | HMAC-SHA256 signature verification with the per-app webhook secret before any processing. |
| A malicious file attacks the scanner | Code is parsed, never executed; file-size and nesting-depth limits; the analysis engines work only on the text they are given and make no network or filesystem calls. |
| A stolen session or API key is used | 2FA and SSO, API keys with expiry and revocation, per-IP rate limits, every sensitive action in the hash-chained audit log. |
| Someone rewrites the audit record of who approved what | Immutable attestations, hash-chained audit log, Ed25519-signed exports verifiable offline. |
| An approval is reused for code that later changed | Attestations are bound to the file's content hash; changed content needs a new attestation. |
Subprocessors
| Provider | Purpose | Data |
|---|---|---|
| Vercel | Application hosting and serverless functions | All application traffic, transiently |
| Supabase | Postgres database, authentication, file storage | Account data, scan results, scanned file content, audit log |
| Upstash | Job queue (QStash) and Redis cache / rate limiting | Scan job references, rate-limit counters |
| GitHub, GitLab, Bitbucket | Source hosting integrations | Only repositories you connect |
| Sentry | Error monitoring | Error reports and stack traces |
| PostHog | Product analytics, where enabled | Usage events |
| SendGrid | Account and alert email | Recipient address and message |
| Payment processor | Billing, paid plans only | Billing contact and payment details |
Integrations you configure yourself (Slack, Jira, PagerDuty, webhooks) receive the alerts you route to them.
Vulnerability disclosure and incident response
Report a vulnerability
Email trustledgerapp.dev@gmail.com. We acknowledge within 3 business days and give an initial assessment within 10. Good-faith research within our guidelines is covered by safe harbour. Full policy: /security · machine-readable: security.txt.
If something goes wrong
Incidents are triaged by severity with a written runbook. If we confirm an incident affecting a customer's data we notify that customer's administrators without undue delay and within 72 hours of confirming it, with what happened, what data was involved and what to do.
Compliance status
- SOC 2: not certified. TrustLedger helps you produce SOC 2 evidence for your own change-management controls; we have not completed a SOC 2 audit of our own.
- ISO 27001: not certified.
- Independent penetration test: not yet performed. We will publish a summary when one is.
- GDPR: data export and deletion are available to administrators; see the privacy policy.
We will update this section when any of these change, and never list a certification we do not hold.