Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ body:
attributes:
value: |
Thanks for taking the time to file a bug report. **Security
vulnerabilities should not be reported here** — see [SECURITY.md](https://github.com/pulkitpareek18/ZeroAuth/blob/main/SECURITY.md).
vulnerabilities should not be reported here** — see [SECURITY.md](https://github.com/zeroauth-dev/ZeroAuth/blob/main/SECURITY.md).

- type: textarea
id: description
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Security vulnerability
url: https://github.com/pulkitpareek18/ZeroAuth/blob/main/SECURITY.md
url: https://github.com/zeroauth-dev/ZeroAuth/blob/main/SECURITY.md
about: Please report security issues privately, not as a public issue.
- name: Documentation
url: https://zeroauth.dev/docs/
about: Browse the full hosted documentation site.
- name: Discussions
url: https://github.com/pulkitpareek18/ZeroAuth/discussions
url: https://github.com/zeroauth-dev/ZeroAuth/discussions
about: Ask questions or propose changes before opening an issue.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ body:
attributes:
value: |
For broader proposals, consider opening a
[discussion](https://github.com/pulkitpareek18/ZeroAuth/discussions)
[discussion](https://github.com/zeroauth-dev/ZeroAuth/discussions)
first so we can align on scope.

- type: textarea
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ welcome bug reports, fixes, integrations, and ideas.

## Ways to contribute

- **Found a bug?** Open an [issue](https://github.com/pulkitpareek18/ZeroAuth/issues/new).
- **Found a bug?** Open an [issue](https://github.com/zeroauth-dev/ZeroAuth/issues/new).
Include reproduction steps, expected vs. actual behaviour, and your
environment (`node -v`, OS, Docker version).
- **Have a feature in mind?** Start a
[discussion](https://github.com/pulkitpareek18/ZeroAuth/discussions) before
[discussion](https://github.com/zeroauth-dev/ZeroAuth/discussions) before
opening a PR — we'd rather agree on direction first.
- **Found a security vulnerability?** **Do not** open a public issue. See
[SECURITY.md](SECURITY.md).

## Development setup

```bash
git clone https://github.com/pulkitpareek18/ZeroAuth.git
git clone https://github.com/zeroauth-dev/ZeroAuth.git
cd ZeroAuth
npm run setup # installs all workspaces, builds everything
cp .env.example .env # local env (uses Base Sepolia testnet by default)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
</p>

<p>
<a href="https://github.com/pulkitpareek18/ZeroAuth/blob/main/LICENSE"><img src="https://img.shields.io/github/license/pulkitpareek18/ZeroAuth?color=blue" alt="License" /></a>
<a href="https://github.com/pulkitpareek18/ZeroAuth/stargazers"><img src="https://img.shields.io/github/stars/pulkitpareek18/ZeroAuth?style=flat" alt="Stars" /></a>
<a href="https://github.com/pulkitpareek18/ZeroAuth/issues"><img src="https://img.shields.io/github/issues/pulkitpareek18/ZeroAuth" alt="Issues" /></a>
<a href="https://github.com/zeroauth-dev/ZeroAuth/blob/main/LICENSE"><img src="https://img.shields.io/github/license/zeroauth-dev/ZeroAuth?color=blue" alt="License" /></a>
<a href="https://github.com/zeroauth-dev/ZeroAuth/stargazers"><img src="https://img.shields.io/github/stars/zeroauth-dev/ZeroAuth?style=flat" alt="Stars" /></a>
<a href="https://github.com/zeroauth-dev/ZeroAuth/issues"><img src="https://img.shields.io/github/issues/zeroauth-dev/ZeroAuth" alt="Issues" /></a>
<img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen" alt="Node 20+" />
<img src="https://img.shields.io/badge/typescript-strict-blue" alt="TypeScript strict" />
<img src="https://img.shields.io/badge/zk-Groth16-purple" alt="Groth16" />
Expand Down Expand Up @@ -125,7 +125,7 @@ Full API reference at [zeroauth.dev/docs/reference/api-reference](https://zeroau
### Run it yourself (Docker, ~2 minutes)

```bash
git clone https://github.com/pulkitpareek18/ZeroAuth.git
git clone https://github.com/zeroauth-dev/ZeroAuth.git
cd ZeroAuth
cp .env.example .env # generates fresh secrets via scripts/deploy.sh
./scripts/deploy.sh dev
Expand Down
14 changes: 7 additions & 7 deletions adr/0004-governance-in-separate-repo.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ADR-0004 — Split governance docs into a separate repo (`pulkitpareek18/ZeroAuth-Governance`)
# ADR-0004 — Split governance docs into a separate repo (`zeroauth-dev/ZeroAuth-Governance`)

## Status

Expand All @@ -23,12 +23,12 @@ The reasons we revisited:

1. **The DPDP §8(7) breach-notification procedure was unwritten.** No document anywhere named which lawyer gets called, in what time window, with what information. That's a legal-teeth gap, not a hygiene gap. It has to land somewhere; writing it in a code repo would mix legal blast radius with engineering blast radius.
2. **Compliance mappings have multiple-regulator scope.** A DPDP / IRDAI / RBI / MeitY mapping is read by auditors and a buyer's security team. Forcing them to clone a TypeScript repo to find it is friction at exactly the wrong moment in a pilot conversation.
3. **The canonical threat model needs a stable URL** before repo #2 (verifier, B02, Week 2) exists. If the verifier's component threat model points at `pulkitpareek18/ZeroAuth/docs/threat_model.md`, the link rots the moment we split the verifier; if it points at a governance repo, the URL is stable forever.
3. **The canonical threat model needs a stable URL** before repo #2 (verifier, B02, Week 2) exists. If the verifier's component threat model points at `zeroauth-dev/ZeroAuth/docs/threat_model.md`, the link rots the moment we split the verifier; if it points at a governance repo, the URL is stable forever.
4. **Two-reviewer enforcement is easier with a dedicated repo.** Path-globbed CODEOWNERS in a code repo gets bypassed under deadline pressure ("just merge the policy change inline, fix it later"). A standalone repo where every PR is *by definition* a policy change makes the discipline mechanical.

## Decision

Create `pulkitpareek18/ZeroAuth-Governance` as a separate public GitHub repo with the structure from `governance_CLAUDE.md`:
Create `zeroauth-dev/ZeroAuth-Governance` as a separate public GitHub repo with the structure from `governance_CLAUDE.md`:

- `docs/shared/{security-policy, coding-standards, naming-conventions, incident-response, breach-notification}.md`
- `docs/threat-model/{canonical, api, verifier, iot, sdk, dashboard}.md`
Expand All @@ -41,7 +41,7 @@ Create `pulkitpareek18/ZeroAuth-Governance` as a separate public GitHub repo wit

The repo is **public**, CC-BY-4.0 licensed — same posture as the main `ZeroAuth` repo. The audit story benefits from open visibility.

This repo (`pulkitpareek18/ZeroAuth`) keeps:
This repo (`zeroauth-dev/ZeroAuth`) keeps:

- `CLAUDE.md` — the constitution for this repo, links to the canonical shared docs
- `docs/api_contract.md` — API-specific contract (won't move)
Expand All @@ -53,7 +53,7 @@ This repo (`pulkitpareek18/ZeroAuth`) keeps:

- **Positive — DPDP §8(7) procedure now exists.** Written down, with named counsel contacts (TODO entries where contacts aren't confirmed yet). Drillable. Reviewable.
- **Positive — auditor-friendly surface.** A buyer's security team can clone one repo and read every policy without slogging through TypeScript. The W08 evidence-pack assembler from the operational suite reads from `evidence-pack-sources/CHECKSUMS.md` cleanly.
- **Positive — stable URLs across the 8-week build.** When B02 (verifier, Week 2), B03 (IoT, Week 3), B04 (SDK, Week 5) split out, they all link to `github.com/pulkitpareek18/ZeroAuth-Governance/blob/main/docs/threat-model/canonical.md` — that URL doesn't move.
- **Positive — stable URLs across the 8-week build.** When B02 (verifier, Week 2), B03 (IoT, Week 3), B04 (SDK, Week 5) split out, they all link to `github.com/zeroauth-dev/ZeroAuth-Governance/blob/main/docs/threat-model/canonical.md` — that URL doesn't move.
- **Positive — two-reviewer rule is mechanical.** CODEOWNERS in the governance repo names both Pulkit and Amit on `/docs/shared/` and `/docs/compliance/`. Counsel review is enforced manually (counsel doesn't have GitHub access) by a note in the PR description before merge.
- **Negative — two repos to clone on a fresh dev machine.** Mitigated: `scripts/setup-dev.sh` (TODO) will clone both side by side.
- **Negative — cross-repo links rot more easily than same-repo links.** Mitigated by `markdown-link-check` CI on every PR in both repos.
Expand Down Expand Up @@ -81,8 +81,8 @@ The governance repo doesn't get folded back into the API repo. The split is mono

- B06 build prompt: `zeroauth_prompt_suite/04_development_suite/02_claude_code_dev/build_prompts/B06_governance_repo_bootstrap.md`
- Governance constitution: `zeroauth_prompt_suite/04_development_suite/02_claude_code_dev/CLAUDE_md/governance_CLAUDE.md`
- New repo: <https://github.com/pulkitpareek18/ZeroAuth-Governance>
- Canonical threat model (new home): <https://github.com/pulkitpareek18/ZeroAuth-Governance/blob/main/docs/threat-model/canonical.md>
- New repo: <https://github.com/zeroauth-dev/ZeroAuth-Governance>
- Canonical threat model (new home): <https://github.com/zeroauth-dev/ZeroAuth-Governance/blob/main/docs/threat-model/canonical.md>
- Brainstorm session on Day 3 (Wed May 13 2026) weighing collapsed vs separate repo: this conversation

---
Expand Down
10 changes: 5 additions & 5 deletions adr/0005-adopt-nodemailer-for-smtp.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Accepted

## Context

[Issue #27](https://github.com/pulkitpareek18/ZeroAuth/issues/27) (F-2 from PR #22 security review) needs email infrastructure to close the email-enumeration finding properly. Beyond that single fix, several pending workstreams converge on "we need transactional email":
[Issue #27](https://github.com/zeroauth-dev/ZeroAuth/issues/27) (F-2 from PR #22 security review) needs email infrastructure to close the email-enumeration finding properly. Beyond that single fix, several pending workstreams converge on "we need transactional email":

- **Breach-notification procedure** in `pulkitpareek18/ZeroAuth-Governance: docs/shared/breach-notification.md` step §3 requires emailing every affected tenant within 6 hours of confirmation — currently has no implementation
- **Breach-notification procedure** in `zeroauth-dev/ZeroAuth-Governance: docs/shared/breach-notification.md` step §3 requires emailing every affected tenant within 6 hours of confirmation — currently has no implementation
- **Password reset flow** — entirely missing today; we ship console accounts with no recovery path
- **Welcome email on signup** — minor UX win, plus a server-side signal that the address is real
- **"Someone tried to sign up with your email" notice** — security signal for legitimate account holders, partial mitigation for F-2 enumeration
Expand Down Expand Up @@ -57,7 +57,7 @@ Adopt **`nodemailer` v8.x** (latest stable, MIT-0 licensed) as the SMTP transpor

## Threat model delta

- New egress to `smtp-relay.brevo.com:587` from the API process. Update `pulkitpareek18/ZeroAuth-Governance: docs/threat-model/canonical.md` to add A-V06 (SMTP credential exfiltration / Brevo account takeover risk) — tracked as a follow-up.
- New egress to `smtp-relay.brevo.com:587` from the API process. Update `zeroauth-dev/ZeroAuth-Governance: docs/threat-model/canonical.md` to add A-V06 (SMTP credential exfiltration / Brevo account takeover risk) — tracked as a follow-up.

## Operational notes

Expand All @@ -71,8 +71,8 @@ Adopt **`nodemailer` v8.x** (latest stable, MIT-0 licensed) as the SMTP transpor
- nodemailer source: <https://github.com/nodemailer/nodemailer>
- nodemailer license (MIT-0): <https://github.com/nodemailer/nodemailer/blob/master/LICENSE>
- Brevo SMTP docs: <https://developers.brevo.com/docs/smtp-integration>
- DPDP §8(7) breach-notification procedure that depends on this: `pulkitpareek18/ZeroAuth-Governance: docs/shared/breach-notification.md`
- Issue this unblocks: <https://github.com/pulkitpareek18/ZeroAuth/issues/27>
- DPDP §8(7) breach-notification procedure that depends on this: `zeroauth-dev/ZeroAuth-Governance: docs/shared/breach-notification.md`
- Issue this unblocks: <https://github.com/zeroauth-dev/ZeroAuth/issues/27>

---

Expand Down
14 changes: 7 additions & 7 deletions adr/0006-verifier-typescript-not-rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ The plan-mode doc's §3.3 recommended **Plan A**. Pulkit picked **Plan B** on Th

## Decision

The Groth16 verifier ships as **`@zeroauth/verifier`, an npm workspace inside `pulkitpareek18/ZeroAuth`**, written in TypeScript on top of `snarkjs`. It runs as a separate Docker container (`zeroauth-verifier`) bound to `127.0.0.1:3001` on the Docker network. The API container reaches it via HTTP — never inline anymore.
The Groth16 verifier ships as **`@zeroauth/verifier`, an npm workspace inside `zeroauth-dev/ZeroAuth`**, written in TypeScript on top of `snarkjs`. It runs as a separate Docker container (`zeroauth-verifier`) bound to `127.0.0.1:3001` on the Docker network. The API container reaches it via HTTP — never inline anymore.

Shipped in three PRs today:

- [PR #35](https://github.com/pulkitpareek18/ZeroAuth/pull/35) — Dockerfile `verifier-build` + `verifier-production` stages, compose service, `VERIFIER_URL` wired into the API's environment.
- [PR #36](https://github.com/pulkitpareek18/ZeroAuth/pull/36) — Healthcheck hotfix (`localhost` → `127.0.0.1` because alpine busybox `wget` hits IPv6 first).
- [PR #37](https://github.com/pulkitpareek18/ZeroAuth/pull/37) — SQLite append-only audit log + hash chain (the design doc §4.3 component).
- [PR #35](https://github.com/zeroauth-dev/ZeroAuth/pull/35) — Dockerfile `verifier-build` + `verifier-production` stages, compose service, `VERIFIER_URL` wired into the API's environment.
- [PR #36](https://github.com/zeroauth-dev/ZeroAuth/pull/36) — Healthcheck hotfix (`localhost` → `127.0.0.1` because alpine busybox `wget` hits IPv6 first).
- [PR #37](https://github.com/zeroauth-dev/ZeroAuth/pull/37) — SQLite append-only audit log + hash chain (the design doc §4.3 component).

The inline-`snarkjs` fallback in `src/services/zkp.ts` **stays in the codebase for two more weeks** as a safety net while the verifier service soaks in production. It activates only when `VERIFIER_URL` is unset (which never happens in prod — the value is hard-set in `docker-compose.yml`'s `environment:` block). Retirement is scheduled for end of Week 4 of the build cycle (~2026-06-08), as a separate PR.

Expand All @@ -52,7 +52,7 @@ Single-engineer velocity. The Rust path was the brainstorm's recommendation when
- **No reproducible build provenance** for the verifier image. Docker `buildx --provenance --sbom` would produce signed attestations, but the `better-sqlite3` native build (alpine arm64-musl has no prebuilt → node-gyp compile via apk-added python+make+g++) is non-deterministic. The audit story is therefore "trust the image" not "verify the image's bytes." Acceptable for v0; this is the single biggest delta vs Plan A.
- **Larger transitive surface.** snarkjs has ~12 transitive deps vs arkworks' ~6. Each is JS, MIT-licensed, audited; but the larger surface is real.
- **`cryptographer-reviewer` subagent calibration** assumes Rust + arkworks per its current spec. The subagent works against snarkjs too (it's just JS) but the review is less precise — Rust's type system catches a class of memory-safety bugs the reviewer can stop looking for. With snarkjs, the reviewer has to reason about JS-level invariants. Documented in the subagent's known-limitations section (TBD).
- **No `--unsafe` audit story.** TypeScript has no equivalent of Rust's `unsafe` block, so the "no unsafe without an ADR" rule in B02's quality bar doesn't transfer. The closest analog is "no `any` in exported signatures + no `dangerouslySetInnerHTML` in user-rendering code" which is already in our [`coding-standards.md`](https://github.com/pulkitpareek18/ZeroAuth-Governance/blob/main/docs/shared/coding-standards.md).
- **No `--unsafe` audit story.** TypeScript has no equivalent of Rust's `unsafe` block, so the "no unsafe without an ADR" rule in B02's quality bar doesn't transfer. The closest analog is "no `any` in exported signatures + no `dangerouslySetInnerHTML` in user-rendering code" which is already in our [`coding-standards.md`](https://github.com/zeroauth-dev/ZeroAuth-Governance/blob/main/docs/shared/coding-standards.md).
- **Container image size is bigger.** Alpine + node + snarkjs + better-sqlite3 → ~140MB. A static Rust binary would be ~20MB. We're not bandwidth-constrained at single-VPS scale; revisit if/when we go multi-region.

### Neutral
Expand Down Expand Up @@ -85,8 +85,8 @@ If during the soak window any verifier failure mode surfaces that we can't fix f

- Plan-mode design doc: [`docs/design/verifier-service-split.md`](../docs/design/verifier-service-split.md)
- B02 build prompt (rejected path): `zeroauth_prompt_suite/04_development_suite/02_claude_code_dev/build_prompts/B02_verifier_service_bootstrap.md`
- Issue tracking: [#35](https://github.com/pulkitpareek18/ZeroAuth/pull/35), [#36](https://github.com/pulkitpareek18/ZeroAuth/pull/36), [#37](https://github.com/pulkitpareek18/ZeroAuth/pull/37)
- Component threat model (to be promoted from stub in the governance repo): `pulkitpareek18/ZeroAuth-Governance: docs/threat-model/verifier.md`
- Issue tracking: [#35](https://github.com/zeroauth-dev/ZeroAuth/pull/35), [#36](https://github.com/zeroauth-dev/ZeroAuth/pull/36), [#37](https://github.com/zeroauth-dev/ZeroAuth/pull/37)
- Component threat model (to be promoted from stub in the governance repo): `zeroauth-dev/ZeroAuth-Governance: docs/threat-model/verifier.md`

---

Expand Down
Loading
Loading