test: guard webhook url secret metadata - #2640
Draft
rudder-devbox[bot] wants to merge 1 commit into
Draft
Conversation
Contributor
Author
|
👋 I'm rudder-devbox. I opened this PR from a Linear ticket. Mention |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2640 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 112 112
Branches 21 21
=========================================
Hits 112 112 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What are the changes introduced in this PR?
Added a regression test asserting the Webhook destination does not classify
webhookUrlas a secret destination key.The existing Webhook destination metadata already keeps
webhookUrlout ofconfig.secretKeysand only marksheaders.toas secret, so no destination configuration files were changed.What is the related Linear task?
Resolves AI-1317
Please explain the objectives of your changes below
Prevent future regressions where the Webhook destination URL could be added to
secretKeysand rendered/stored as a secret by metadata consumers.Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
No runtime behavior change in this repository. This is a test-only guard for the existing Webhook metadata contract.
Any new dependencies introduced with this change?
N/A
Any new checks got introduced or modified in test suites. Please explain the changes.
Added one destination-definition test in
test/validation.test.tsthat verifies WebhooksecretKeysis exactly["headers.to"]and does not containwebhookUrl.Validation
npm ci— passednpx prettier --check /workspace/rudder-integrations-config/test/validation.test.ts— passednpx jest --runTestsByPath /workspace/rudder-integrations-config/test/validation.test.ts --runInBand --watchAll=false --coverage=false -t "webhook does not classify webhookUrl as a secret destination key"— passedPATH=/usr/local/bin:$PATH npm test -- --runInBand --silent— passed with 100% coveragenpm test -- --runTestsByPath test/validation.test.ts --watchAll=falseshowedPASS test/validation.test.tsbut exited non-zero due the repo’s global coverage thresholds on scoped Jest runs.python3onPATHdid not havejsondiff, so the full Jest suite initially failed in schema generator tests. Re-running with/usr/local/binfirst inPATHused the Python environment with the required script dependencies and the suite passed.Developer checklist
My code follows the style guidelines of this project
No breaking changes are being introduced.
All related docs linked with the PR?
All changes manually tested?
Any documentation changes needed with this change?
I have executed schemaGenerator tests and updated schema if needed
Are sensitive fields marked as secret in definition config?
My test cases and placeholders use only masked/sample values for sensitive fields
Is the PR limited to 10 file changes & one task?
Reviewer checklist
Is the type of change in the PR title appropriate as per the changes?
Verified that there are no credentials or confidential data exposed with the changes.
🔭 Live preview
Resumable while this task is open.