Skip to content

fix: client api security improvements#47

Merged
pandeymangg merged 3 commits into
mainfrom
fix/simple-api-response
May 19, 2026
Merged

fix: client api security improvements#47
pandeymangg merged 3 commits into
mainfrom
fix/simple-api-response

Conversation

@pandeymangg
Copy link
Copy Markdown
Contributor

ports the recent security improvement changes made to the js-core package from PR formbricks/formbricks#7931 in formbricks to the ios sdk

@pandeymangg pandeymangg requested a review from Dhruwang May 18, 2026 12:16
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f71bbf7e-c887-4d75-937d-11e92e8ba6b2

📥 Commits

Reviewing files that changed from the base of the PR and between 7095b15 and f3a5ecb.

📒 Files selected for processing (6)
  • Sources/FormbricksSDK/Manager/PresentSurveyManager.swift
  • Sources/FormbricksSDK/Manager/SurveyManager.swift
  • Sources/FormbricksSDK/Model/Workspace/Survey.swift
  • Sources/FormbricksSDK/Model/Workspace/Surveys/Segment.swift
  • Sources/FormbricksSDK/WebView/FormbricksViewModel.swift
  • Tests/FormbricksSDKTests/FormbricksSDKTests.swift
💤 Files with no reviewable changes (1)
  • Tests/FormbricksSDKTests/FormbricksSDKTests.swift

Walkthrough

This PR refactors the Segment and Survey data models for streamlined client-side representation while maintaining backward compatibility with cached payloads. The Segment model is simplified to id and hasFilters, with custom decoding that accepts legacy filters arrays. The Survey model removes its name property from the Codable payload. SurveyManager is updated to use the new segment.hasFilters contract for filtering and to reference survey.id in logging. Additionally, the survey presentation style changes from sheet to fullscreen modal with cross-dissolve transition, and the embedded WebView HTML layout is updated to use full-viewport styling instead of flexbox bottom-alignment. Tests are updated to reflect the model changes.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: client api security improvements' is partially related to the changeset—it refers to security improvements to the client API, which aligns with removing sensitive fields (name) and updating segment filtering logic for anonymous users.
Description check ✅ Passed The description clearly explains that this PR ports security improvement changes from the js-core package (PR #7931) to the iOS SDK, which is directly related to the changeset of API model updates and filtering logic.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
44.4% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@pandeymangg pandeymangg added this pull request to the merge queue May 19, 2026
Merged via the queue into main with commit 188b32b May 19, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants