components/bounty-detail/bounty-detail-client.tsx:67 falls back to MOCK_MODEL4_CONTRIBUTORS when the bounty has no contributorProgress:
contributorProgress: bounty?.contributorProgress ?? MOCK_MODEL4_CONTRIBUTORS,
getFullMilestoneData is consumed by both the public MilestoneFunnel (visible to unauthenticated visitors) and the authenticated Model4MaintainerDashboard. A real bounty with no contributors will surface the demo names (Alice, Bob, David) as if they were real participants.
getRealContributors already exists for the public funnel path and returns [] instead of demo data, but any other consumer that calls getFullMilestoneData for public rendering is still exposed.
What to do
- Audit every call site of
getFullMilestoneData and confirm none of them render in a public context. Public-only paths must use getRealContributors
- Gate the
MOCK_MODEL4_CONTRIBUTORS fallback in getFullMilestoneData behind process.env.NODE_ENV === "development" so it only kicks in during local dev
- Add a brief code comment explaining why
Acceptance criteria
- In a production build,
getFullMilestoneData never returns MOCK_MODEL4_CONTRIBUTORS
- Public-facing funnel renders an empty contributor list for bounties without
contributorProgress
- Authenticated maintainer and contributor views still see real data when present, empty list otherwise
Files
components/bounty-detail/bounty-detail-client.tsx
components/bounty-detail/bounty-detail-client.tsx:67falls back toMOCK_MODEL4_CONTRIBUTORSwhen the bounty has nocontributorProgress:getFullMilestoneDatais consumed by both the publicMilestoneFunnel(visible to unauthenticated visitors) and the authenticatedModel4MaintainerDashboard. A real bounty with no contributors will surface the demo names (Alice, Bob, David) as if they were real participants.getRealContributorsalready exists for the public funnel path and returns[]instead of demo data, but any other consumer that callsgetFullMilestoneDatafor public rendering is still exposed.What to do
getFullMilestoneDataand confirm none of them render in a public context. Public-only paths must usegetRealContributorsMOCK_MODEL4_CONTRIBUTORSfallback ingetFullMilestoneDatabehindprocess.env.NODE_ENV === "development"so it only kicks in during local devAcceptance criteria
getFullMilestoneDatanever returnsMOCK_MODEL4_CONTRIBUTORScontributorProgressFiles
components/bounty-detail/bounty-detail-client.tsx