Skip to content

#120 [High] Require mandatory code-owner review on security-sensitive paths via branch protection #329

Description

@james2177

Description: Building on the CODEOWNERS file added in issue #101, this issue enables and documents GitHub's "require review from Code Owners" branch protection setting specifically scoped to the highest-risk paths — src/soroban/ (on-chain signing/submission), src/common/stellar-signature.ts (signature verification), prisma/schema.prisma (data model), and src/soroban/signer.service.ts (key handling) — so PRs touching these can't merge without a qualified reviewer's sign-off, independent of whatever general review the PR already received.

Problem Statement & Context: This backlog already documents a long history of exactly the class of bug that slips through general review in these paths — signature-verification gaps (issues #82, #83, #96, #97), key-material handling (issue #91), and spoofable trust boundaries (issue #20). A general CODEOWNERS mapping (issue #101) routes review requests, but without branch-protection enforcement it's advisory only; this issue makes review on the highest-risk subset mandatory, not optional.

Scope & Acceptance Criteria:

  • Enable "Require review from Code Owners" in the repository's branch protection rules for main, scoped via the CODEOWNERS entries for src/soroban/, src/common/stellar-signature.ts, and prisma/schema.prisma added/refined for this purpose.
  • Document the policy and the rationale (linking the specific prior-issue history above) in SECURITY.md (issue Add unit tests for LoggingInterceptor #103).
  • Out of scope: building any new tooling — this issue is a CODEOWNERS refinement plus a repo-admin branch-protection configuration change, documented for auditability.

Implementation Guidelines:

  1. Key files: CODEOWNERS (from issue Add unit tests for StatsService.getProtocolStats() #101), SECURITY.md (from issue Add unit tests for LoggingInterceptor #103), src/soroban/, src/common/stellar-signature.ts, prisma/schema.prisma.
  2. Verify the general CODEOWNERS mapping from issue Add unit tests for StatsService.getProtocolStats() #101 doesn't already imply broader ownership that conflicts with a tighter security-specific rule — reconcile any overlap explicitly rather than leaving two contradictory ownership claims.
  3. Confirm the designated code owners for these paths are realistic (actual active maintainers, not a bottleneck of one person) to avoid the mandatory-review requirement stalling contributor PRs indefinitely.
  4. Testing/validation: N/A (GitHub configuration, not application code), but the PR implementing this must include a screenshot or exported branch-protection-rule JSON as evidence the setting is live, plus a test PR touching src/soroban/ demonstrating the review requirement actually blocks merge without code-owner approval.

Definition of Done:

  • Branch protection configured and scoped correctly, documented in SECURITY.md.
  • Acceptance criteria met, including live-verification evidence.
  • PR passes CI, reviewed and approved.

Resources: CODEOWNERS, SECURITY.md, src/soroban/, src/common/stellar-signature.ts, prisma/schema.prisma

Complexity: High (200 points)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions