# Penetration Test — Scoping Document

> **Status: Proposed / Planning.**
> This document defines the **intended scope for a future penetration test**. No
> penetration test has been performed, scheduled, or contracted. No testing provider
> has been selected. Nothing in this document is a finding, a result, or a claim that
> any listed component has been tested. Items marked **TBD** are not yet decided.

---

## 1. Objective

Assess the security of Gatekeeper's public-facing and pilot-facing surfaces —
authentication, authorization, API handling, and input validation — and produce an
independent findings report that can be published alongside the Trust Center's other
reviewer documentation.

## 2. In-Scope Components (proposed)

All components below exist in the current system; none have been tested yet.

**Frontend (Next.js application, Vercel-hosted):**

- Public marketing site, including the live demo submission path
- Trust Center (`/trust`) and public reviewer documents
- Vendor registry (`/registry`)
- Authentication boundary: sign-in / sign-up (`/auth/*`), NextAuth credentials
  provider, JWT session handling, middleware gating of `/dashboard/**`
- Authenticated dashboard and its API route handlers (`/api/**`): billing (Stripe
  checkout/portal), Slack integration endpoints, metrics, compliance report export,
  evidence endpoints, signup/credential endpoints
- Same-origin scan proxy (`/scan`)

**Gateway (backend service, Railway-hosted):**

- Proxy endpoints (`/proxy/openai`, `/proxy/anthropic`) including governance-header
  handling (`X-Gatekeeper-Key`, `X-Workflow-Tag`, `X-Actor-ID`)
- Scan endpoint used by the public demo
- Per-app key authentication of proxy calls

**Data layer (via the applications only):**

- PostgreSQL access paths as reachable through the application surfaces above
  (no direct database-infrastructure testing)

## 3. Out-of-Scope Components (proposed)

- Third-party platform infrastructure: Vercel, Railway, Neon, Stripe, Slack, zcal
  (their own platforms are covered by their own programs)
- Upstream model providers (OpenAI, Anthropic)
- Denial-of-service / load testing
- Social engineering, phishing, and physical security
- The ML detection-quality of the redaction/jailbreak models (measured separately by
  the evaluation harness; this test covers application security, not detector recall)

## 4. Test Boundaries

- **Authorized targets:** only the components listed in §2, at URLs to be confirmed in
  the formal authorization — **TBD**
- **Environment:** dedicated pilot/staging environment vs. production — **TBD**
- **Test accounts:** dedicated credentials and gateway app keys to be provisioned —
  **TBD**
- **Testing windows:** **TBD**
- **Rate limits:** the application enforces rate limiting; testing thresholds to be
  agreed with the provider — **TBD**
- **Safety constraints (fixed):** synthetic / non-production data only — no PHI or real
  personal data may be used as test payloads (consistent with the
  [No-PHI Pilot Architecture](/trust/pilot-architecture.md)); no destructive testing
  against stored audit data

## 5. Testing Objectives (what should be assessed)

These are categories to be tested — **none of them has been tested yet**:

- Authentication and authorization (credentials flow, JWT/session handling, middleware
  bypass attempts)
- Access control between tenants (per-user gateway credentials, per-app keys)
- Input validation across API route handlers and the proxy
- API security (authorization of `/api/**` handlers, mass assignment, IDOR)
- Injection resistance (web-layer injection: SQLi, header injection, SSRF via proxy
  routes; note: prompt-injection *detection* is a product feature — the pen test
  assesses the web application, not detector recall)
- Sensitive data exposure (audit content, keys, secrets in responses or errors)
- Session management
- Common web-application vulnerabilities (OWASP Top 10 baseline)

## 6. Deliverables (expected from the future test)

To be produced by the engaged provider — **none of these exist today**:

- Findings report with severity classification (e.g. CVSS)
- Reproduction evidence per finding
- Remediation recommendations
- Retest / verification results after fixes
- A publishable summary suitable for the Trust Center

## 7. Status

```text
Pen-test scope: Proposed / Planning
Provider:       Not selected
Dates:          TBD
Findings:       None (no test has occurred)
```

This document will be updated when a provider is engaged; results, if published, will
appear on the [Trust Center](/trust).
