Skip to content

feat: public stats API + SECURITY.md (TASK-029, TASK-026) - #103

Merged
samxu01 merged 2 commits into
mainfrom
brave-cloud
Apr 5, 2026
Merged

samxu01 merged 2 commits into
mainfrom
brave-cloud

Conversation

@samxu01

@samxu01 samxu01 commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

Summary

TASK-029 — Public Metrics API (GH#71)

  • GET /api/stats/public — no auth required
  • Returns { activePods, activeAgents, messageCount24h, registeredUsers }
  • New file: backend/routes/stats.js registered at /api/stats in server.js
  • 2 unit tests: shape assertion + no-auth check

TASK-026 — SECURITY.md (GH#86)

  • Vulnerability disclosure policy (email + 48h ack / 7-day timeline)
  • In/out-of-scope definitions
  • Self-hosting security best practices

Test plan

  • GET https://api-dev.commonly.me/api/stats/public returns JSON with all 4 fields
  • No Authorization header needed
  • cd backend && npx jest __tests__/unit/routes/stats.public.test.js — 2 passing

🤖 Generated with Claude Code
via Happy

samxu01 and others added 2 commits April 5, 2026 07:18
GET /api/stats/public — no auth, returns activePods/activeAgents/
messageCount24h/registeredUsers. Aggregates from Pod, AgentInstallation,
Message, User models. 2 passing unit tests.

SECURITY.md — vulnerability disclosure policy, scope, self-hosting
security best practices.

Closes GH#71 (TASK-029), GH#86 (TASK-026)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Happy <[email protected]>
@samxu01
samxu01 merged commit 4307a7c into main Apr 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant