Repository navigation
fix(security): untrusted kind lookups, root error boundary, opaque default handle, seed skips owned rows - #19
Merged
Merged
Conversation
…fault handle, seed skips owned rows From the 2026-10-22 security scan (advisory GHSA-72r8-ccwp-xcwq): - F3–F6: every glyph/source lookup keyed by listing data goes through ownKey()/glyphFor() (src/lib/kinds.ts), so inherited keys fall back instead of rendering Object.prototype. One shared KIND_GLYPH table replaces five copies. - Root layout exports expo-router's ErrorBoundary: one bad row can't unmount the app. - F2: new profiles get a random handle (forager-<10 hex>) and "New forager", never the login email's local part. - F7: the listings seed skips any derived id whose row already has a createdBy owner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 10
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…rite The pre-write ownership check could race a create at a derived id. After writing, re-query the written ids and unlink createdBy from any that gained an owner; a non-owner can't link createdBy to an existing row, so the window closes there. Cross-model review finding (gpt-6.1-sol). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Self-merged by vale (techempower lane) under JP's standing yes (2026-09-28).
|
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.
Client- and script-side fixes from the 2026-10-22 security scan (private advisory GHSA-72r8-ccwp-xcwq). Server-side rules come in a separate PR after a staging A/B run.
ownKey()/glyphFor()insrc/lib/kinds.ts(own-property check, string-only). One sharedKIND_GLYPHreplaces five copies (MapPin, ListingCard, MapScreen.web ×2, add, calendar);getSourceColorand ListingCard's source layer use the same guard.ErrorBoundary.forager-<10 hex>(from a v4 id) and "New forager" instead of the email local part.seed-listingsskips any derived listing id whose row already has acreatedByowner (logs the ids).Checks
npm run typecheck✓,npm run lint0 errors (the 22 warnings are the sameexhaustive-depsones as on main).glyphForreturns the fallback for__proto__,constructor,toString, non-strings;ownKey(SOURCE_BY_KEY,"__proto__")is undefined. Perturbation: the oldtable[k] ?? "🌱"pattern returns a non-string for__proto__(red).where: { id: { $in } }works andcreatedByreturns as an array (the shapeownedListingIdsreads); 0 listings carry an unknownkind; 2 profiles exist, both with email-derived handles (not rewritten here).🤖 Generated with Claude Code