Repository navigation
Conversation
Detection reports carried the request's full header map, so a visitor's session cookie, bearer token or API key header was sent with every report. toWireDetectionRequest now replaces credential header values with an empty string and keeps only WebDecoy's own wd_clearance cookie. Rules still see the full request.
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.
Detection reports sent the request's full header map, so a visitor's
Cookie,Authorizationand API key headers were sent to WebDecoy. None of those values is needed to score a request.toWireDetectionRequest, the one function that shapes a report, now passes headers throughreportableHeaders(). Credential headers keep their name and get an empty value.cookieis cut down to WebDecoy's ownwd_clearancecookie, which the service uses to recognise a cleared client.cookie|auth|token|secret|passw|session|credential|csrf|xsrf|api-key|access-key|private-key), so names nobody listed are caught too. The ingest service enforces the same pattern for older SDK versions.Tests:
report-headers.test.tssends the header map the adapters forward throughclient.detectand checks that no credential value is on the wire, every header name is, evidence headers keep their values, and the caller's object is not mutated.invariants.test.tschecks that the detect endpoint has exactly one caller and that it goes throughtoWireDetectionRequest.npm run build,lint,test(582 tests) andcheck:edgepass.