Skip to content

Security regression pass over the OpenAPI/visibility/key surface #868

Done

Description

@athvin

API product implementation work · roadmap #1008 · use parent dependency order; not a separate product rank.

Part of #857. Stack rank 11 of 13. Depends on: T4, T9, T10 — scheduled after all three so it tests the real surface, not the plan.

Color

The adversarial closing of the guard, per the security skill's harness-first rule: every claim this epic makes about what a client cannot see becomes a regression test that was observed failing first. A guard whose precondition always holds is decoration — that principle is applied to the epic's own gates here.

Scope + testing (the same list — each bullet is a test)

  • Public-document leak tests: no operator route, no /v1/internal/* path, no internal-visibility property anywhere in openapi.public.json — each proven by temporarily breaking the filter and watching the test fail, then restoring.
  • Mutation-test V18: a fixture entity with an undeclared webhook_secret-shaped column must fail the lint; a declared one must pass. (If T1's fixtures already cover both directions, this is a verification pass, not new code.)
  • Key-minting family in pg_auth.rs (T9's tests re-run as a family): cross-org mint → 404; role ceiling → 422; steward/viewer → 403; plaintext once; list leaks nothing.
  • BFF authz: the new routes (api-keys, docs spec route) present in check-bff-authz.mjs, observed failing on a deliberately removed entry.
  • Serialization gate: no handler serializes a non-wire entity struct on a client path — a freeform_sql-style source test if cheap; otherwise a written review finding with the sites listed.

Findings that turn out to be real vulnerabilities are filed as issues, not silently fixed in this ticket.

Out of scope

A full /pentest campaign (separately invokable); any non-epic surface.

Definition of done

Epic DoD, plus: each bullet's test exists in the named harness, failed once for the right reason (evidence linked in the PR), and passes; zero open findings, or each open finding has its own issue.

Metadata

Metadata

Assignees

Labels

mvprust

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions