feat: cleanup includeKeys in destination definitions#2367
feat: cleanup includeKeys in destination definitions#2367saikumarrs wants to merge 1 commit intodevelopfrom
Conversation
Remove secret keys (apiKey, apiSecret, mid, advertiserId, etc.) from includeKeys arrays across 26 destinations to prevent client-side exposure via source configuration response. Destinations updated: af, awin, candu, canny, clickup, custify, facebook_offline_conversions, freshmarketer, freshsales, klaviyo_bulk_upload, mailjet, mailmodo, marketo_static_list, mautic, new_relic, pagerduty, persistiq, rakuten, refiner, smartly, snapchat_custom_audience, stormly, user, userpilot, wootric, zapier Scanned-by: gitleaks 8.30.0
📝 WalkthroughWalkthroughThis pull request removes specific API keys and sensitive identifiers from the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2367 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 72 72
Branches 8 8
=========================================
Hits 72 72 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/schemas/destinations/db-config-schema.json`:
- Around line 301-302: The schema comment for includeKeys conflicts with its
validation: it currently states the array may be "empty" but the includeKeys
property has "minItems": 1 which forbids empty arrays; update the comment or the
schema so they match — either remove "or empty" from the includeKeys description
to reflect minItems: 1, or relax/remove the minItems constraint to allow empty
arrays; locate the includeKeys property and its "description" and "minItems"
entries in db-config-schema.json and make the chosen change so documentation and
validation are consistent.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 90af2204-ba3e-48d4-9d00-a750dcb99a03
📒 Files selected for processing (27)
src/configurations/destinations/af/db-config.jsonsrc/configurations/destinations/awin/db-config.jsonsrc/configurations/destinations/candu/db-config.jsonsrc/configurations/destinations/canny/db-config.jsonsrc/configurations/destinations/clickup/db-config.jsonsrc/configurations/destinations/custify/db-config.jsonsrc/configurations/destinations/facebook_offline_conversions/db-config.jsonsrc/configurations/destinations/freshmarketer/db-config.jsonsrc/configurations/destinations/freshsales/db-config.jsonsrc/configurations/destinations/klaviyo_bulk_upload/db-config.jsonsrc/configurations/destinations/mailjet/db-config.jsonsrc/configurations/destinations/mailmodo/db-config.jsonsrc/configurations/destinations/marketo_static_list/db-config.jsonsrc/configurations/destinations/mautic/db-config.jsonsrc/configurations/destinations/new_relic/db-config.jsonsrc/configurations/destinations/pagerduty/db-config.jsonsrc/configurations/destinations/persistiq/db-config.jsonsrc/configurations/destinations/rakuten/db-config.jsonsrc/configurations/destinations/refiner/db-config.jsonsrc/configurations/destinations/smartly/db-config.jsonsrc/configurations/destinations/snapchat_custom_audience/db-config.jsonsrc/configurations/destinations/stormly/db-config.jsonsrc/configurations/destinations/user/db-config.jsonsrc/configurations/destinations/userpilot/db-config.jsonsrc/configurations/destinations/wootric/db-config.jsonsrc/configurations/destinations/zapier/db-config.jsonsrc/schemas/destinations/db-config-schema.json
💤 Files with no reviewable changes (22)
- src/configurations/destinations/userpilot/db-config.json
- src/configurations/destinations/pagerduty/db-config.json
- src/configurations/destinations/canny/db-config.json
- src/configurations/destinations/custify/db-config.json
- src/configurations/destinations/new_relic/db-config.json
- src/configurations/destinations/mailmodo/db-config.json
- src/configurations/destinations/wootric/db-config.json
- src/configurations/destinations/clickup/db-config.json
- src/configurations/destinations/freshsales/db-config.json
- src/configurations/destinations/mautic/db-config.json
- src/configurations/destinations/mailjet/db-config.json
- src/configurations/destinations/refiner/db-config.json
- src/configurations/destinations/zapier/db-config.json
- src/configurations/destinations/marketo_static_list/db-config.json
- src/configurations/destinations/snapchat_custom_audience/db-config.json
- src/configurations/destinations/freshmarketer/db-config.json
- src/configurations/destinations/awin/db-config.json
- src/configurations/destinations/user/db-config.json
- src/configurations/destinations/smartly/db-config.json
- src/configurations/destinations/klaviyo_bulk_upload/db-config.json
- src/configurations/destinations/af/db-config.json
- src/configurations/destinations/facebook_offline_conversions/db-config.json
| "description": "The list of properties that are to be included in the destination configuration sent to the client SDKs via source configuration response.", | ||
| "$comment": "For destinations that support device/hybrid mode, this should be mandatorily defined. Otherwise, it should not be defined at all. No fields will be included in the destination configuration if this field is not defined or empty.", |
There was a problem hiding this comment.
Align includeKeys comment with schema behavior.
Line 302 says includeKeys can be “empty”, but Line 306 (minItems: 1) rejects empty arrays. Please remove “or empty” (or relax minItems) to avoid contradictory guidance.
Suggested doc-only fix
- "$comment": "For destinations that support device/hybrid mode, this should be mandatorily defined. Otherwise, it should not be defined at all. No fields will be included in the destination configuration if this field is not defined or empty.",
+ "$comment": "For destinations that support device/hybrid mode, this should be mandatorily defined. Otherwise, it should not be defined at all. No fields will be included in the destination configuration if this field is not defined.",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "description": "The list of properties that are to be included in the destination configuration sent to the client SDKs via source configuration response.", | |
| "$comment": "For destinations that support device/hybrid mode, this should be mandatorily defined. Otherwise, it should not be defined at all. No fields will be included in the destination configuration if this field is not defined or empty.", | |
| "description": "The list of properties that are to be included in the destination configuration sent to the client SDKs via source configuration response.", | |
| "$comment": "For destinations that support device/hybrid mode, this should be mandatorily defined. Otherwise, it should not be defined at all. No fields will be included in the destination configuration if this field is not defined.", |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/schemas/destinations/db-config-schema.json` around lines 301 - 302, The
schema comment for includeKeys conflicts with its validation: it currently
states the array may be "empty" but the includeKeys property has "minItems": 1
which forbids empty arrays; update the comment or the schema so they match —
either remove "or empty" from the includeKeys description to reflect minItems:
1, or relax/remove the minItems constraint to allow empty arrays; locate the
includeKeys property and its "description" and "minItems" entries in
db-config-schema.json and make the chosen change so documentation and validation
are consistent.
Reverts includeKeys cleanup for 26 destinations and db-config-schema.json changes to keep this branch focused on secretKeys cleanup only. These changes are tracked in: #2367
Summary
apiKey,apiSecret,mid,advertiserId, etc.) fromconfig.includeKeysarrays across 26 destinationsDestinations Updated
af,awin,candu,canny,clickup,custify,facebook_offline_conversions,freshmarketer,freshsales,klaviyo_bulk_upload,mailjet,mailmodo,marketo_static_list,mautic,new_relic,pagerduty,persistiq,rakuten,refiner,smartly,snapchat_custom_audience,stormly,user,userpilot,wootric,zapierTest plan
npm testSummary by CodeRabbit
Chores
Documentation