What TestGuard reads

What TestGuard never does

GitHub App permissions

PermissionAccessWhy TestGuard needs it
checkswritePost and update the TestGuard check run on a pull request's commit.
contentsreadRead the base .testguard.yml and the changed files' contents at base and head.
metadatareadRequired by GitHub for every App, whatever else it asks for.
pull_requestswriteList a pull request's changed files, and create or update the sticky review comment.

Webhook events: pull_request.

Signing in

Signing in uses GitHub OAuth to read your user name, the installations you can access, and your role in each organization. The GitHub token is used during sign-in and is not stored. A session lasts 8 hours; only a hash of the session id is stored.

Every dashboard response sends a restrictive Content-Security-Policy, Referrer-Policy: same-origin, and the other protective headers a browser checks before running or linking anything on the page.

What TestGuard stores

TableWhat it holdsKept for
installationsThe GitHub App installations TestGuard knows about: the account name and whether it is an organization or a user account.Until uninstall Deleted when the GitHub App is uninstalled.
reposThe repositories visible to each installation: the full repository name and whether scanning is enabled for it.Until removed Deleted at uninstall, when removed from the installation, or when another repository takes its name.
deliveriesThe webhook delivery ids TestGuard has already processed, so a retried delivery is ignored instead of handled twice.Retention period
jobsThe scan jobs queued, running, done or failed for a pull request commit, with their retry count.Retention period Once finished; any job after the removal grace period once its repository or installation is removed.
scansThe findings report for one commit, with file paths, line numbers, messages and excerpts of the changed test lines around each finding.Retention period Or the removal grace period after the repository is removed.
audit_eventsA log of actions TestGuard or a signed-in user took: sign-ins, sign-outs, scans and retention purges.Retention period
job_claimsWhich installation most recently had a scan job claimed, used to share worker time fairly across installations.Removal grace period After the installation is removed.
check_runsThe id of the GitHub check run TestGuard posted for a commit, so a retry updates it instead of creating a duplicate.Closed pull request period After the pull request closes; the retention period if unused; the removal grace period after the repository is removed.
pr_commentsThe id of TestGuard's sticky summary comment on a pull request, so later updates edit it instead of creating a new one.Closed pull request period After the pull request closes; the retention period if unused; the removal grace period after the repository is removed.
usersGitHub user id, login and display name.Inactive user period Without a sign-in, with their sessions and memberships, unless they belong to an existing installation.
sessionsA hash of a dashboard session id, which user it belongs to, and when it expires.Until they expire Or at sign-out, or with their user after the inactive user period.
oauth_statesA one-time value used to verify a sign-in attempt in progress, and when it expires.Until used or expired Deleted when used to sign in or when they expire.
membershipsWhich installations a signed-in user can access, and their role (admin or member) in each.Replaced at each sign-in Deleted after the removal grace period once the installation is removed, or with their user after the inactive user period.
feedbackA reviewer's note that a finding should be approved or rejected as a false positive, and the decision.Retention period Unless it is the record behind an active suppression; the removal grace period after the repository is removed.
suppressionsWhich rule and path combinations a repository has approved to stop flagging, from an approved feedback item.Retention period once inactive Active ones stay while the repository is present; the removal grace period after the repository is removed.
billing_accountsThe billing provider's customer and subscription ids, plan, status and grace end.5 years After the last billing activity or the uninstall, whichever is later.
billing_eventsThe billing provider's event ids TestGuard has already applied, so a retried webhook event is ignored instead of applied twice.5 years After receipt, or after the last billing activity or the uninstall when the event belongs to a removed installation, whichever is later.
billing_cancellationsA record that a subscription still needs to be cancelled after uninstall, with its retry count, so the cancellation is retried until it succeeds or the billing provider reports it already gone.5 years After the cancellation request or the uninstall, whichever is later.
terms_acceptancesWhich signed-in user agreed to the Terms of Service and Privacy Policy at checkout, which installation, which version of the documents, and when.5 years After the acceptance or the uninstall, whichever is later.
fake_checkoutsTest-mode checkout records created by the fake billing provider, used only when billing runs without Stripe.1 day Test mode only.
removed_targetsWhen an installation or repository was removed, so the data tied to it can be deleted later.Removal grace period Or until the installation or repository is added again; an installation's record stays while any billing account or event still dates it.
pr_closuresWhen a pull request was closed, so the ids TestGuard keeps for it can be deleted later.Until reopened Then the retention period, or the removal grace period after the repository is removed.

Retention today

The operator chooses TESTGUARD_RETENTION_DAYS (30 to 90 days), TESTGUARD_ORPHAN_DAYS (7 to 90 days), TESTGUARD_CLOSED_PR_DAYS (7 to 90 days) and TESTGUARD_INACTIVE_USER_DAYS (30 to 365 days) at setup; TestGuard sets no default for any of them. Billing records are kept 5 years after the last billing activity or the uninstall, whichever is later, a fixed period that is not configurable. A row exactly at the edge of its period is kept, not deleted, except sign-in states and dashboard sessions, which are deleted once they expire. Purge runs when the service starts, and then every hour.

Each purge deletes scans, audit events and webhook deliveries older than the retention cutoff, and finished jobs older than the cutoff (queued and running jobs are kept). Expired sign-in states and dashboard sessions stop working when they expire and are deleted by the next purge.

Scans, jobs, feedback, suppressions, check-run and comment ids, pull-request-closure records, memberships and shared worker-claim state tied to a removed installation or repository are deleted once the removal grace period has passed since the removal. Billing accounts and events of a removed installation are kept 5 years after the last billing activity or the uninstall, whichever is later. The record of the removal itself (the tombstone) is deleted once the removal grace period has passed and, for an installation, once no billing account or event still dates it. Data of installations and repositories removed before removals were recorded counts as removed on the day the database was upgraded.

Installations and their repositories are also deleted when the GitHub App is uninstalled (and a repository when it is removed from the installation). A user's memberships are replaced with their current roles each time they sign in; a user with no membership in an existing installation is deleted, along with their sessions and memberships, after the inactive user period without a sign-in — a deleted user's feedback then shows "a former user" instead of their name. Signing out deletes the session.

Decided feedback is deleted after the retention period unless it is the record behind an active suppression; pending feedback is deleted after the retention period because its scan is already gone. An inactive (not currently suppressing anything) suppression is deleted after the retention period; an active one is kept while its repository is still present.

Check-run and comment ids are deleted after the closed pull request period once their pull request closes, or after the retention period if nothing updates them in that time.

Billing runs in test mode only: card details are entered on the billing provider's own hosted checkout page and never reach TestGuard. Invoices, payments and tax records are held by the billing provider (Stripe); TestGuard keeps its own billing records for 5 years after the last billing activity or the uninstall, whichever is later.

Hosting

Hosting region
Fly.io (Fly.io, Inc.), United States (Ashburn, VA).
Hosted retention policy
On the hosted service: 90 days for scan results, scan jobs, the audit log and webhook delivery ids (TESTGUARD_RETENTION_DAYS); a 30-day removal grace period (TESTGUARD_ORPHAN_DAYS); 90 days after a pull request closes (TESTGUARD_CLOSED_PR_DAYS); 90 days for users who have not signed in (TESTGUARD_INACTIVE_USER_DAYS). These are deployment settings, not code defaults; see the self-host defaults.

The public site is hosted on Fly.io. GitHub sign-in and paid plans are not available yet: the GitHub App is not connected, and plans cannot be bought.