Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Url parameter secrets are not sanitized by default in ASP.NET #3374

Open
klemmchr opened this issue May 16, 2024 · 5 comments
Open

Url parameter secrets are not sanitized by default in ASP.NET #3374

klemmchr opened this issue May 16, 2024 · 5 comments

Comments

@klemmchr
Copy link

Package

Sentry

.NET Flavor

.NET

.NET Version

8.0.0

OS

Any (not platform specific)

SDK Version

4.6.2

Self-Hosted Sentry Version

No response

Steps to Reproduce

  1. Create endpoint with an url parameter named secret
  2. Send trace using Sentry

Expected Result

Url parameter would be masked (like with user ids).

Actual Result

Url parameter is not masked and full unmasked path is send to Sentry.

@bitsandfoxes
Copy link
Contributor

Thanks for reaching out. That does sound like something that we probably should not do. Let me get back to you.

@jamescrosswell
Copy link
Collaborator

It looks like we have something to redact PII but nothing for secrets or sensitive information more generally:

if (!_options.SendDefaultPii)
{
processedTransaction.Redact();
}

If we did add something more generic to redact sensitive information, it would have to be flexible/configurable, as the kinds of things that indicate whether something is sensitive or not would definitely be cultural specific and likely domain specific as well.

Possibly something like List<Regex> RedactUrlParameters on the SentryOptions.

@bitsandfoxes
Copy link
Contributor

Possibly something like List RedactUrlParameters on the SentryOptions.

I really like this idea. Let me check with the other SDKs if they have something like that in place.

@bitsandfoxes
Copy link
Contributor

I found an event scrubber on the Python SDK that has an extendable deny-list.

@jamescrosswell
Copy link
Collaborator

I found an event scrubber on the Python SDK that has an extendable deny-list.

Looks like that scrubs everything.

I can't see any reference to this in the Developer Docs but we could just mimic the behaviour of the Python SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Status: No status
Development

No branches or pull requests

3 participants