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

Further expand sanitizers #39700

Merged
merged 2 commits into from
Apr 16, 2024
Merged

Further expand sanitizers #39700

merged 2 commits into from
Apr 16, 2024

Conversation

billwert
Copy link
Contributor

No description provided.

@billwert
Copy link
Contributor Author

/azp run java - storage - ci

Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@billwert
Copy link
Contributor Author

/azp run java - storage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@billwert billwert merged commit 52cb8b0 into Azure:main Apr 16, 2024
20 checks passed
@billwert billwert deleted the add-more-sanitizers branch April 16, 2024 00:40
HarshaNalluru added a commit to Azure/azure-sdk-for-js that referenced this pull request Apr 16, 2024
### Packages impacted by this PR
`@azure-tools/test-recorder` - Adding the central sanitizers

### Issues associated with this PR
**References:**
- Azure/azure-sdk-for-java#39700
- Azure/azure-sdk-for-python#35196
- And the patterns found

### Describe the problem that is addressed by this PR
- Introducing fallback sanitizers into the test recorder to handle
potential secret leaks.
- The new sanitizers are designed to work in conjunction with the
existing `handleEnvSetup` mechanism and the fake secrets.
  - The sanitizers include:
- `BodyKeySanitizers` that redact sensitive information in the JSON body
of the requests.
- `FindReplaceSanitizers` that redact sensitive information based on
provided regular expressions.
- `HeaderSanitizers` that redact sensitive information in the headers of
the requests.

## Tests
I've ran the tests for the following and they work fine
- [x] recorder
- [x] template
- [x] notification-hubs (needed to make a few fixes for browser tests in
notification hubs which do feel like unrelated to this PR, but fixing
them here anyway.)

___Currently only these three packages depend on recorder v4.___

## Future work (future PRs)
- Once this PR is merged, cherrypick the commit and release a hotfix 3.x
version
- Add more tests at some point
billwert added a commit to billwert/azure-sdk-for-java that referenced this pull request Apr 22, 2024
* Further expand sanitizers

* adding another redaction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core azure-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants