fix: comprehensive security hardening (audit findings)#98
Merged
a-bonus merged 2 commits intoa-bonus:mainfrom Mar 27, 2026
Merged
fix: comprehensive security hardening (audit findings)#98a-bonus merged 2 commits intoa-bonus:mainfrom
a-bonus merged 2 commits intoa-bonus:mainfrom
Conversation
added 2 commits
March 27, 2026 17:03
Made-with: Cursor
…refs, Web app OAuth note Made-with: Cursor
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
Comprehensive security hardening based on a full codebase audit. Fixes 1 critical, 6 high, 7 medium, and 6 low severity issues. All changes are backward compatible.
Critical
escapeDriveQuery()utility (escapes\then'per Google API docs) applied acrosssearchGoogleDocs,listGoogleDocs,listFolderContents.High
allowedRedirectUriPatternschanged fromhttps://*to${BASE_URL}/*</script>breakout in inline JSON escaped with\u003cdownloadFileandinsertImagenow validate paths resolve withincwd; API-derived filenames stripped withpath.basename()uploadImageToDrivedefault changed toskipPublicSharing: true0o600/0o700;client_secretremoved from persisted payloadMedium
checkDomainnow hastry/catch+res.okcheckcanAccesscomposition, SHA-256 hashed token cache keysstateparameter and 5-minute timeout to local auth serverhttp://andhttps://only.max()constraints on batch writes, spreadsheet values, table data, markdown contentLow
USER node, added.dockerignoreGOOGLE_MCP_PROFILEvalidated against^[\w-]+$!only (handles sheet names containing!)New: Persistent token storage
FirestoreTokenStorageimplementing FastMCP'sTokenStorageinterfaceTOKEN_STORE=firestoreenv var for remote deploymentsJWT_SIGNING_KEYandREFRESH_TOKEN_TTLenv vars for production persistenceTest plan
npm run build-- clean compilationnpm test-- all 172 tests passnpm run format:check-- Prettier cleannpm audit-- 0 vulnerabilities