fix: pass existing config to integration constructor in UpdateIntegration#515
Conversation
…tion Fixes #514 - UpdateIntegration was passing the new config instead of the existing database config to the integration constructor. This broke partial update semantics where onUpdate methods expect to merge changes with the current state via patterns like this._deepMerge(this.config, params.config). Changes: - Pass integrationRecord.config (existing) instead of config (new) to constructor - Add TDD tests verifying partial config update preserves unspecified fields - Update DummyIntegration test double to implement proper onUpdate merge behavior - Add ConfigCapturingIntegration test double for verifying config state
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 22520632 | Triggered | Generic High Entropy Secret | 29da1f3 | packages/core/credential/repositories/tests/credential-repository-documentdb-encryption.test.js | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
|




Summary
Fixes #514 -
UpdateIntegrationwas passing the new config instead of the existing database config to the integration constructor, breaking partial update semantics.integrationRecord.config(existing) instead ofconfig(new) to constructoronUpdatehandler now correctly receives existing config inthis.configand new config inparams.configTest plan
this.configcontains existing database values whenonUpdateis called