Skip to content

Constrain Strava requests in the metadata prototype - #1

Draft
pH-7 wants to merge 6 commits into
mainfrom
codex/audit-metadata-api
Draft

Constrain Strava requests in the metadata prototype#1
pH-7 wants to merge 6 commits into
mainfrom
codex/audit-metadata-api

Conversation

@pH-7

@pH-7 pH-7 commented Sep 12, 2026

Copy link
Copy Markdown
Member

The Strava route accepted an arbitrary destination while forwarding a bearer token, and malformed requests were not validated. Requests now reach only Strava's documented activities endpoint, reject unknown fields and invalid pagination, disable redirects, bound time/response size, and omit sensitive upstream details from errors. The server also limits request bodies and defaults to loopback.

Metadata now loads after environment configuration, the documented discovery route resolves, model descriptions are explicitly examples, and missing models return 404. Duplicate static context serving is removed. The README corrects the unsupported MCP-compliance and production-readiness claims: the implementation is a REST metadata prototype. Historical material is retained with a correction note.

Validation: a clean Node 22 npm ci followed by seven offline tests, TypeScript build and Prettier passes. Six regression tests failed before the route fixes. npm audit reports zero vulnerabilities (previously 14). Gitleaks finds no secrets in source or the six commits. Compiled localhost startup applies a synthetic .env correctly and rejects five invalid port values; the temporary server is stopped.

No real Strava account, token, activity or AI service is used. Public hosting remains a separate decision: the prototype has permissive CORS and no per-user authentication, application-level rate limit or OAuth flow. No real Model Context Protocol transport or ML inference has been added.

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