Commit d9a3b474b6

d9a3b474b63800c56e83c0ecce5ed902ebe42b61

parent: bf8e6e63d6

Verified · cmc

cmc <hello@cleberg.net> · 2026-11-01 03:21 UTC

Document gh-attest as self-hosted after the hosted takedown

README: self-hosted framing, resource creation, GitHub App settings, and how
installations are recorded. SECURITY.md and PRIVACY.md describe a deployment
the operator runs. wrangler.jsonc drops the deleted database's ID.

Ref #3

Layout: unified · split

PRIVACY.md +43 −105
@@ -1,31 +1,27 @@
1# gh-attest — Privacy Policy 1# gh-attest — Data handling
2 2
3**Effective date:** 2026-07-19 3gh-attest is self-hosted. Audit Labs does not run an instance and receives no
4data from any deployment. Whoever deploys it operates it: the data described
5here is stored in that operator's own Cloudflare account, and the operator is
6responsible for it.
4 7
5gh-attest ("the App") is a GitHub App operated by Audit Labs ("we", 8This document describes what a deployment processes, where it is stored, and
6"us"). It helps compliance and security teams collect 9how long it is kept. It does not cover GitHub itself — see GitHub's Privacy
7point-in-time evidence about the security configuration of their own 10Statement for how GitHub handles your data.
8GitHub organization and map it to SOC 2 and ISO 27001 control
9identifiers. This policy explains what the App processes, why, how long
10it is kept, and your choices.
11 11
12This policy covers the gh-attest App and its dashboard only. It does not 12## What a deployment processes
13cover GitHub itself — see GitHub's Privacy Statement for how GitHub
14handles your data.
15 13
16## What we process 14A deployment processes data only for organizations that have installed its
17 15GitHub App, and only within the scope of the permissions granted at
18The App processes data only for organizations that have installed it, 16installation.
19and only within the scope of the permissions granted at installation.
20 17
21**Organization & installation metadata.** Installation ID, organization 18**Organization & installation metadata.** Installation ID, organization
22login, and installation/suspension timestamps. If you exclude repositories 19login, and installation/suspension timestamps. If repositories are excluded
23from scanning, the App stores the excluded repository names for your 20from scanning, the excluded repository names are stored for that installation.
24installation.
25 21
26**Security & access-control signals (the evidence).** As your 22**Security & access-control signals (the evidence).** As configuration
27configuration changes and on a periodic re-sync, the App records 23changes and on a periodic re-sync, the Worker records point-in-time
28point-in-time "snapshots" of security-relevant state, which may include: 24"snapshots" of security-relevant state, which may include:
29 25
30- branch protection and repository ruleset configuration (enabled / 26- branch protection and repository ruleset configuration (enabled /
31 disabled); 27 disabled);
@@ -37,112 +33,54 @@ webhook payload that produced it. These payloads can contain repository
37names, team names, and the GitHub logins of members whose access 33names, team names, and the GitHub logins of members whose access
38changed. 34changed.
39 35
40**Dashboard sign-in.** When you sign in to the dashboard, the App reads 36**Dashboard sign-in.** On sign-in, the Worker reads the user's GitHub user ID
41your GitHub user ID and login and the list of installations you can 37and login and the list of installations they can access, solely to confirm
42access, solely to confirm you belong to an organization that installed 38they belong to an organization that installed the App. The profile is stored
43the App. Your GitHub profile is stored only inside a signed, expiring 39only inside a signed, expiring session cookie in the browser — it is **not**
44session cookie in your browser — it is **not** written to our database. 40written to the database.
45 41
46**Exports.** Evidence exports you generate (CSV or PDF) are stored so 42**Exports.** Evidence exports (CSV or PDF) are stored so they can be
47you can download them, along with metadata about each export job. 43downloaded, along with metadata about each export job.
48 44
49## What we do NOT process 45## What it does NOT process
50 46
51- We do **not** store the contents of your source code. 47- It does **not** store the contents of source code.
52- We do **not** store GitHub personal access tokens. The App 48- It does **not** store GitHub personal access tokens. The Worker
53 authenticates using short-lived installation access tokens minted per 49 authenticates using short-lived installation access tokens minted per
54 request (valid ~1 hour) and never persisted. 50 request (valid ~1 hour) and never persisted.
55- We do **not** collect passwords or payment information. 51- It does **not** collect passwords or payment information.
56- We do **not** sell your data or share it with third parties for 52- It does **not** send data anywhere other than the operator's Cloudflare
57 advertising, and we do **not** aggregate data across organizations. 53 account and GitHub's API.
58
59## How we use it
60
61Solely to provide the App's function: presenting your current security
62posture, mapping it to SOC 2 / ISO 27001 controls, and generating
63point-in-time evidence exports and access-review comparisons for your
64own organization.
65 54
66## Where it is stored and how it is protected 55## Where it is stored and how it is protected
67 56
68All data is stored on Cloudflare's platform (D1 and R2) in the 57All data is stored in the operator's Cloudflare account (D1 and R2). The
69**European Union**. Both the database and the object storage are created 58deployment steps in the README create both under Cloudflare's `eu`
70under Cloudflare's `eu` jurisdiction, which restricts them to storing and 59jurisdiction, which restricts them to storing and running within the EU.
71running within the EU.
72 60
73Note that the application code itself runs on Cloudflare Workers, which 61The Worker itself runs on Cloudflare Workers, which execute at the network
74execute at the network edge close to the requesting user. A request made 62edge close to the requesting user. A request made from outside the EU is
75from outside the EU is therefore processed outside the EU, even though 63therefore processed outside the EU, even though the data it reads and writes
76the data it reads and writes is stored within the EU. We do not currently 64is stored within the EU.
77use Cloudflare's Regional Services to constrain where request processing
78occurs.
79 65
80Protections include: 66Protections include:
81 67
82- webhook payloads are verified with HMAC-SHA256 signatures before 68- webhook payloads are verified with HMAC-SHA256 signatures before
83 processing; 69 processing;
84- the GitHub App private key, webhook secret, and session-signing key 70- the GitHub App private key, webhook secret, and session-signing key
85 are stored as encrypted platform secrets, never in source code; 71 are stored as encrypted Worker secrets, never in source code;
86- authentication uses short-lived installation tokens that are never 72- authentication uses short-lived installation tokens that are never
87 stored; 73 stored;
88- all stored data is scoped per installation, and the dashboard enforces 74- all stored data is scoped per installation, and the dashboard enforces
89 that a signed-in user can access only their own organization's data. 75 that a signed-in user can access only their own organization's data.
90 76
91## Subprocessors
92
93- **Cloudflare, Inc.** — hosting, database (D1), and object storage (R2),
94 under the EU jurisdiction described above.
95
96**GitHub, Inc.** is the system the data comes from. Your organization has
97its own relationship with GitHub, so GitHub is not a subprocessor we
98engage on your behalf.
99
100If we add or replace a subprocessor, we will notify installed
101organizations in advance so they have an opportunity to object.
102
103## Security incidents
104
105If we become aware of a breach affecting your organization's data, we
106will notify you without undue delay and provide the information you need
107to meet your own notification obligations.
108
109## Data retention & deletion 77## Data retention & deletion
110 78
111Evidence snapshots are retained for 13 months, export files 79Evidence snapshots are retained for 13 months, export files for 90 days, and
112for 90 days, and all data for an organization is deleted when the App 80all data for an organization is deleted when the App is uninstalled. The
113is uninstalled. You may also request deletion at any time. 81operator can also purge an installation through `POST /admin/purge`.
114
115## Your choices and rights
116
117**If you administer an installing organization:**
118
119- **Uninstall** the App at any time from your organization's GitHub
120 settings to stop all processing and trigger deletion of your data.
121- **Exclude repositories** from scanning and reporting from the
122 dashboard, so the App stops collecting new evidence about them.
123- **Export** your organization's data as CSV or PDF from the dashboard
124 at any time.
125- **Request deletion** of your organization's data by contacting us.
126- Request a **Data Processing Addendum** if you need one for your own
127 compliance obligations.
128
129**If you are an individual whose GitHub login appears in an
130organization's data:** we hold that data on behalf of that organization,
131which decides how it is used. We have no direct relationship with you
132and cannot verify your identity, so please direct access, correction, or
133deletion requests to the organization. If you contact us, we will refer
134your request to them rather than acting on it ourselves.
135
136Depending on your jurisdiction (e.g., GDPR, CCPA/CPRA), you may have
137additional rights; the organization can exercise them with our
138assistance.
139 82
140## Contact 83## Contact
141 84
142privacy@audit-labs.dev — Audit Labs 85Questions about the software: privacy@audit-labs.dev. Requests about data held
143 86by a deployment go to the organization that operates it.
144## Changes
145
146We may update this policy. Material changes will be reflected by the
147effective date above and, where appropriate, communicated to installed
148organizations.
README.md +40 −6
@@ -6,10 +6,13 @@
6[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=audit-labs_gh-attest&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=audit-labs_gh-attest) 6[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=audit-labs_gh-attest&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=audit-labs_gh-attest)
7[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](LICENSE) 7[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](LICENSE)
8 8
9Turns GitHub security settings into auditor-ready evidence. A GitHub App that 9Turns GitHub security settings into auditor-ready evidence. A self-hosted
10records branch protection, scanning alerts, and organization access as they 10GitHub App that records branch protection, scanning alerts, and organization
11change, maps them to SOC 2 and ISO 27001 controls, and exports point-in-time 11access as they change, maps them to SOC 2 and ISO 27001 controls, and exports
12CSV and PDF evidence packages. 12point-in-time CSV and PDF evidence packages.
13
14You register your own GitHub App and deploy the Worker to your own Cloudflare
15account. Audit Labs does not run a hosted instance.
13 16
14Read-only — it never modifies your repositories, permissions, or membership. 17Read-only — it never modifies your repositories, permissions, or membership.
15 18
@@ -38,11 +41,18 @@ webhooks never announce (protection and open alerts that predate the install,
38whether each scanner is enabled, and current membership). Each observation is stored as a timestamped snapshot in D1. 41whether each scanner is enabled, and current membership). Each observation is stored as a timestamped snapshot in D1.
39Exports render off the request path via a queue, into R2. 42Exports render off the request path via a queue, into R2.
40 43
41**Stack:** Cloudflare Workers · D1 · R2 · Queues. All storage is provisioned 44**Stack:** Cloudflare Workers · D1 · R2 · Queues. The deployment steps below
42under Cloudflare's `eu` jurisdiction. 45create all storage under Cloudflare's `eu` jurisdiction.
46
47Installations are recorded only from the App's webhooks; the hourly poll covers
48installations already recorded and does not discover new ones. If the webhook
49URL or secret is wrong, every delivery is refused with a 401 and the
50installation never appears.
43 51
44## Endpoints 52## Endpoints
45 53
54Routes served by a deployed Worker:
55
46| Route | Auth | Purpose | 56| Route | Auth | Purpose |
47| --- | --- | --- | 57| --- | --- | --- |
48| `GET /` | session | Dashboard: current posture, exports | 58| `GET /` | session | Dashboard: current posture, exports |
@@ -73,11 +83,35 @@ Type checking: `npm run typecheck`. Generate binding types after editing
73 83
74## Deployment 84## Deployment
75 85
86Create the storage. Jurisdiction is fixed at creation:
87
88```sh
89npx wrangler d1 create gh-attest-db-eu --jurisdiction eu
90npx wrangler r2 bucket create gh-attest-exports-eu --jurisdiction eu
91npx wrangler queues create generate-export
92```
93
94Put the `database_id` printed by `d1 create` into `wrangler.jsonc`, then:
95
76```sh 96```sh
77npm run db:migrate:remote 97npm run db:migrate:remote
78npm run deploy 98npm run deploy
79``` 99```
80 100
101Register a GitHub App with:
102
103| Setting | Value |
104| --- | --- |
105| Webhook URL | `https://<worker>/webhooks/github` |
106| Webhook secret | same value as `GITHUB_WEBHOOK_SECRET` |
107| Callback URL | `https://<worker>/callback` |
108| Repository permissions (read-only) | Administration, Metadata, Dependabot alerts, Code scanning alerts, Secret scanning alerts |
109| Organization permissions (read-only) | Members |
110| Events | Branch protection rule, Repository ruleset, Dependabot alert, Code scanning alert, Secret scanning alert, Member, Organization, Team, Repository, Push |
111
112Install it on your organization, then confirm the `installation` delivery
113returned 200 under the App's Advanced → Recent Deliveries.
114
81Secrets are set with `wrangler secret put <NAME>` — never in `wrangler.jsonc`: 115Secrets are set with `wrangler secret put <NAME>` — never in `wrangler.jsonc`:
82 116
83| Secret | Purpose | 117| Secret | Purpose |
SECURITY.md +11 −11
@@ -2,9 +2,9 @@
2 2
3## Supported versions 3## Supported versions
4 4
5gh-attest is a hosted GitHub App. There is one supported version — the 5gh-attest is self-hosted; Audit Labs does not run an instance. Only the latest
6currently deployed one. Fixes are rolled out to all installations at once; 6`main` is supported. Fixes land there, and each operator deploys them to their
7there is nothing for you to upgrade. 7own Worker.
8 8
9## Reporting a vulnerability 9## Reporting a vulnerability
10 10
@@ -16,7 +16,7 @@ Please report privately rather than opening a public issue.
16 16
17Please include enough detail to reproduce: the endpoint or component, the 17Please include enough detail to reproduce: the endpoint or component, the
18request, and what you observed. If you have a proof of concept, use your own 18request, and what you observed. If you have a proof of concept, use your own
19organization's installation. 19deployment.
20 20
21We aim to acknowledge within 3 working days and to keep you updated until the 21We aim to acknowledge within 3 working days and to keep you updated until the
22issue is resolved. We will credit you when publishing a fix unless you prefer 22issue is resolved. We will credit you when publishing a fix unless you prefer
@@ -28,8 +28,8 @@ otherwise. We do not currently run a paid bug bounty.
28 28
29- The Worker and its endpoints, including webhook signature verification, 29- The Worker and its endpoints, including webhook signature verification,
30 session handling, and the `/admin/*` bearer-guarded routes. 30 session handling, and the `/admin/*` bearer-guarded routes.
31- Tenant isolation — anything allowing one installation to read another's 31- Tenant isolation — anything allowing one installation on a deployment to
32 evidence or exports. 32 read another's evidence or exports.
33- The evidence pipeline, where incorrect data could mislead an audit. 33- The evidence pipeline, where incorrect data could mislead an audit.
34 34
35**Out of scope** 35**Out of scope**
@@ -43,13 +43,13 @@ otherwise. We do not currently run a paid bug bounty.
43 43
44## Testing guidance 44## Testing guidance
45 45
46Please test against an installation on an organization you control. Do not 46Please test against your own deployment and an organization you control. Do
47attempt to access data belonging to another installation; if you believe you 47not attempt to access anyone else's deployment or data.
48have found a way to, stop and report it rather than confirming the extent.
49 48
50## How gh-attest handles data 49## How gh-attest handles data
51 50
52Read-only GitHub scopes, short-lived installation tokens that are never 51Read-only GitHub scopes, short-lived installation tokens that are never
53persisted, no source code or personal access tokens stored, and all data held 52persisted, no source code or personal access tokens stored, and all data held
54in the EU. See [PRIVACY.md](PRIVACY.md) for the full description and 53in the operator's Cloudflare account under the `eu` jurisdiction. See
55[README.md](README.md) for the architecture. 54[PRIVACY.md](PRIVACY.md) for the full description and [README.md](README.md)
55for the architecture.
wrangler.jsonc +5 −4
@@ -9,14 +9,15 @@
9 "head_sampling_rate": 1 9 "head_sampling_rate": 1
10 }, 10 },
11 11
12 // Storage is pinned to the EU jurisdiction so customer data stays in the 12 // Storage is pinned to the EU jurisdiction so evidence stays in the EEA.
13 // EEA. Jurisdiction is immutable: moving it means recreating these 13 // Jurisdiction is immutable: moving it means recreating these resources
14 // resources and migrating the data. 14 // and migrating the data. Create them as in the README's Deployment section.
15 "d1_databases": [ 15 "d1_databases": [
16 { 16 {
17 "binding": "DB", 17 "binding": "DB",
18 "database_name": "gh-attest-db-eu", 18 "database_name": "gh-attest-db-eu",
19 "database_id": "70e8b4b2-4409-4f51-a9f6-badce76f5891", 19 // From `wrangler d1 create gh-attest-db-eu --jurisdiction eu`.
20 "database_id": "00000000-0000-0000-0000-000000000000",
20 "migrations_dir": "./migrations" 21 "migrations_dir": "./migrations"
21 } 22 }
22 ], 23 ],