Harden data access, document uploads, and secret handling#42
Open
kveton wants to merge 1 commit intowillchen96:mainfrom
Open
Harden data access, document uploads, and secret handling#42kveton wants to merge 1 commit intowillchen96:mainfrom
kveton wants to merge 1 commit intowillchen96:mainfrom
Conversation
- lock Supabase app tables behind backend service-role APIs - add safe profile endpoints and stop exposing user API keys to the browser - encrypt user LLM API keys at rest - require dedicated download signing and API-key encryption secrets - validate uploaded PDF/DOC/DOCX bytes before storage - tighten tabular-review and chat project authorization - remove sensitive raw LLM/document logging - update vulnerable dependencies and add focused backend security tests
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.
Summary
This PR implements a focused security hardening pass across the backend, frontend, migrations, and dependency locks.
What changed
user_profilesaccess with safe backend profile APIs.has_*_api_keybooleans to the browser.DOWNLOAD_SIGNING_SECRETandUSER_API_KEYS_ENCRYPTION_KEYsecrets.Validation
backend:npm testpassed, 9 tests.backend:npm run buildpassed.frontend:npm run buildpassed with placeholder public env values.backend+frontend:npm audit --jsonreports 0 vulnerabilities./healthreturned 200./loginand/signuprender, protected routes redirect to/login, and no Next error overlays or material console errors appeared.Notes
Authenticated Supabase/R2 flows were not smoke-tested locally because this workspace only has example env files, not real local secrets.