fix: strip unresolved keyword placeholders from API payloads before deploy #1360
Open
ankita10119 wants to merge 3 commits intomasterfrom
Open
fix: strip unresolved keyword placeholders from API payloads before deploy #1360ankita10119 wants to merge 3 commits intomasterfrom
ankita10119 wants to merge 3 commits intomasterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1360 +/- ##
==========================================
+ Coverage 80.10% 80.14% +0.03%
==========================================
Files 152 152
Lines 6212 6229 +17
Branches 1290 1295 +5
==========================================
+ Hits 4976 4992 +16
- Misses 702 703 +1
Partials 534 534 ☔ View full report in Codecov by Sentry. 🚀 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.
🔧 Changes
When a keyword placeholder (e.g.
##MY_SECRET##) is not resolved, because the corresponding environment variable is absent or the keyword file is missing, the raw##...##string was previously forwarded to the Auth0 Management API, silently overwriting real tenant values with literal placeholder strings.New utility:
stripUnresolvedPlaceholders(src/tools/utils.ts)##...##pattern.log.warnfor each stripped field, including the full dotted field path, resource type, resource name, and the offending placeholder value, so operators have a clear audit trail.src/tools/auth0/handlers/default.tsstripUnresolvedPlaceholdersis now applied in all three create/update payload construction paths, chained afterstripObfuscatedFieldsFromPayload.📚 References
closes #1344
🔬 Testing
Unit tests covering:
##PLACEHOLDER##is stripped and a warning is logged.options.secret) containing an unresolved placeholder is stripped with the correct dotted path in the warning.nullinputs and array values are returned as-is without modification.📝 Checklist