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

Safe fields not working when data is an array #2605

Closed
rodolfoBee opened this issue Oct 13, 2023 · 2 comments
Closed

Safe fields not working when data is an array #2605

rodolfoBee opened this issue Oct 13, 2023 · 2 comments
Assignees

Comments

@rodolfoBee
Copy link
Member

When running a python app from console the sys.argv has some information being filtered by Sentry default data scrubbing. This information is useful and I do not want filtered.

Steps to Reproduce

run a python scrip that throws an error, for example: python3 test.py password
test.py and password will be added as extra context by the SDK: {'extra': 'sys.argv': ['test.py', 'password']}
add sys.argv in project settings -> security and privacy -> safe fields

Expected Result

the information in the event is not scrubbed

Actual Result

the information is scrubbed

sys.argv	
[
test.py, 
[Filtered]
]

From testing, this happens with any extra context that is added as an array, and none of the following worked:
sys.argv
extra.sys.argv
extra.'sys.argv;
extra.'sys.argv'.* (taken from the Advanced scrubbed rules suggestion)
extra.sys.argv.**
extra.sys.argv.[*]

I also tested with another field without a dot in its name, the behaviour is the same.

What is the correct syntax to prevent default data scrubbers to scrub information from arrays in extra? Or is it a current limitation?

@jjbayer
Copy link
Member

jjbayer commented Oct 16, 2023

Was able to confirm that exclude_fields does not work with arrays in this unit test: #2610

@Dav1dde
Copy link
Member

Dav1dde commented Oct 31, 2023

@rodolfoBee we've rolled out a change which allows the advanced expressions syntax in the safe fields field now, meaning you should be able to exclude your array using extra.'sys.argv'.**

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants