feat: improve label resolution in form-builder#120
Merged
olliethedev merged 2 commits intomainfrom Apr 20, 2026
Merged
Conversation
…version for consistent admin and public form display
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Security Review — No High-Confidence Vulnerabilities Found
PR: feat: improve label resolution in JSON Schema to FormBuilderField conversion
Scope: 4 files changed — packages/stack/package.json, packages/ui/src/components/form-builder/components/index.tsx, packages/ui/src/components/form-builder/schema-utils.ts, and a new test file.
What was reviewed
| Threat | Finding |
|---|---|
| Injection (SQL/command/template/path) | None. beautifyObjectName is a pure string transform (regex + capitalize); no interpreter is involved. |
| XSS | None. The computed label is assigned as a plain string prop to React components. React escapes string props by default; no dangerouslySetInnerHTML is in the call path. prop.label and prop.title were already user-controlled before this PR — the change does not broaden that surface. |
| Authn/authz bypass | None. No authentication or authorization logic is modified. |
| Secrets / token leakage / insecure logging | None. The existing console.warn that logs key and prop (pre-existing, not introduced here) is unchanged in character. No credentials or tokens are in scope. |
| Supply-chain / new dependencies | None. beautifyObjectName is imported from an existing internal module (../auto-form/helpers); no new external packages are added. |
| Unsafe deserialization / SSRF / CSRF | None. No network requests, binary parsing, or cross-origin interactions are introduced. |
Conclusion
The diff is a purely cosmetic label-resolution improvement. All changes are confined to display-layer string formatting in the admin canvas. No high-confidence security vulnerability was identified in this pull request.
Sent by Cursor Automation: Find vulnerabilities
Contributor
|
✅ Shadcn registry updated — registry JSON files were rebuilt and committed to this branch. |
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
Type of change
Checklist
pnpm buildpassespnpm typecheckpassespnpm lintpassesdocs/content/docs/) if consumer-facing types or behavior changedScreenshots
Note
Low Risk
Low risk: changes only how field labels are derived/displayed in the FormBuilder and its unknown-type fallback, plus adds tests and a patch version bump.
Overview
Improves FormBuilder label resolution so JSON Schema properties without
label/titledisplay a humanised field name (viabeautifyObjectName) instead of the raw key, aligning the admin canvas withAutoFormrendering.Updates both the component-level
getLabelhelper and theschema-utilsunknown-field fallback, and adds unit tests coveringlabel/titleprecedence and the humanised-key fallback. Also bumps@btst/stackto2.11.7.Reviewed by Cursor Bugbot for commit 65c3aea. Bugbot is set up for automated code reviews on this repo. Configure here.