-
Notifications
You must be signed in to change notification settings - Fork 7
fix: filtering out endpoints with PII data #570
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
Conversation
|
This PR will trigger a patch release when merged. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
|
||
| uuid: withInputValidation((str, replaceWith) => str.replace(/([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})|([0-9a-fA-F]{32})/g, replaceWith)), | ||
|
|
||
| email: withInputValidation((str, replaceWith) => str.replace(/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g, replaceWith)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noticed the email regex is quite slow 700k urls in 6 seconds while
the uuid above took only 1 seconds.
| return str.replace(/eyJ[a-zA-Z0-9]+\.eyJ[a-zA-Z0-9]+\.[a-zA-Z0-9]+/g, '<jwt>'); | ||
| } | ||
| return str; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was being duplicated in filters. So removed it.
src/utils.mjs
Outdated
| [/\/api\/mdm.+/i, '/api/mdm'], | ||
| [/\/api\/employer.+/i, '/api/employer'], | ||
| [/\/api\/perfios.+/i, '/api/perfios'], | ||
| [/\/kyccallback.+/i, '/kyccallback'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last two have the format perfios<someword>_uuid and kyccallback_uuid. I am in favor of removing them since uuid filter should remove them. @trieloff WDYT ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree
| [/\/api\/mdm.+/i, '/api/mdm'], | ||
| [/\/api\/employer.+/i, '/api/employer'], | ||
| [/\/api\/perfios.+/i, '/api/perfios'], | ||
| [/\/kyccallback.+/i, '/kyccallback'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the first 4 can contain any PII data (free text)
the last 2 can only contain uuid
trieloff
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd also remove all emails by default.
## [2.44.3](v2.44.2...v2.44.3) (2025-11-20) ### Bug Fixes * filtering out endpoints with PII data ([#570](#570)) ([a267b45](a267b45))
|
🎉 This PR is included in version 2.44.3 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Please ensure your pull request adheres to the following guidelines:
Related Issues
Thanks for contributing!