Harden optional proxy request boundaries - #3
Draft
pH-7 wants to merge 9 commits into
Draft
Conversation
❌ Deploy Preview for succeedai failed.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Malformed query bodies could reject the Express handler before its error boundary, and valid license responses were read from the wrong JSON:API envelope. This change rejects invalid input, correctly checks active license resources, keeps private request data out of logs, bounds Axios calls, and makes proxy trust explicit.
The unused public JWT issuer now returns 410 because its tokens were never accepted by the actual shared-token authentication middleware. Current native SucceedAI apps use on-device models; this proxy remains optional. Review the token endpoint retirement and deployed reverse-proxy hop count before rollout.
Validation: 15 offline tests pass, including real localhost HTTP routes; TypeScript and Prettier pass; npm audit reports zero vulnerabilities after compatible dependency patches and a scoped qs override. Production startup returns health 200 and unauthenticated query 401. Gitleaks finds no secrets in source or the nine commits.
Provider/license calls are mocked. No Railway deployment, credential rotation, store submission or live provider acceptance is claimed.
The existing Netlify preview integration fails before deployment: its dashboard uses Node 20.20.2 with
npm install && npm run prod, which cannot load this Node >=22.18 TypeScript entry point. It also treats a long-running server as a static-site build and publishes a nonexistentpublicdirectory. The verified preview log marks deploying skipped. Resolving the hosting target requires a separate deployment decision; this branch does not change dashboard settings or introduce a serverless migration.