Repository navigation
INTG-3246: redact sensitive query params and log originalUrl - #38
Open
dandonarahul2002 wants to merge 1 commit into
Open
dandonarahul2002 wants to merge 1 commit into
dandonarahul2002 wants to merge 1 commit into
Conversation
data.request.params is the raw query string, so OAuth tokens, API keys and signed-URL signatures passed as query parameters reached the logs in clear text. Header redaction (DATA-12974) does not cover them. - Query parameters such as access_token, refresh_token, token, api_key, client_secret, password and X-Amz-Signature are logged as [REDACTED], keeping the name. Names are matched case-insensitively after URL decoding. Hosts add their own with Chitragupta.extendSensitiveParams([...]). - A params object supplied by the host through meta is redacted the same way. - endpoint and params come from request.originalUrl when present, so Express routes mounted on a sub-router log their full path. This upstreams the change integrations-service has carried on a fork branch since 2024, so it can move back to master. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
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.
JIRA: https://browserstack.atlassian.net/browse/INTG-3246
data.request.paramslogs the raw query string. OAuth tokens, API keys and signed-URL signatures passed as query parameters therefore reach the logs in clear text. DATA-12974 redacts headers but doesn't cover these.Changes
[REDACTED], keeping the name:access_token,refresh_token,id_token,token,api_key,apikey,api_token,private_token,client_secret,secret,password,signature,X-Amz-Signature,X-Amz-Credential,X-Amz-Security-Token.Chitragupta.extendSensitiveParams([...]), which mirrorsextendSensitiveHeaders.meta.data.request.paramsis redacted the same way.originalUrl:endpointandparamsnow come fromrequest.originalUrlwhen present, falling back torequest.url. Express rewritesurlrelative to the router mount point, so sub-router routes logged a partial path.INTG-NOJIRA-endpoint-fix,d90fbb8, 2024). That's why it's still pinned to a commit without the DATA-12974 header redaction.test/params.jsadded tonpm test.Compatibility
endpointand the record shape stay the same.originalUrlthrough Express will log the full mounted path inendpointwhere they previously logged the sub-router path.Testing
test/params.jscovers redaction, encoded names, parameters without values, host-supplied params objects, the extend API, and theoriginalUrlfallback. This repo's CI doesn't runnpm test(its workflows are npm audit and Semgrep), so please runnpm testlocally while reviewing.Follow-up (integrations-service)
After this merges, bump the
chitraguptapin to the merge commit and callChitragupta.extendSensitiveHeaders(['x-api-admin-key'])andextendSensitiveParams(['code'])at startup.Related: browserstack/integrations-service#3759, #3760, #3761
🤖 Generated with Claude Code