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

Removing sensitive information from recordings #2230

Open
martinalbert opened this issue Oct 11, 2021 · 2 comments
Open

Removing sensitive information from recordings #2230

martinalbert opened this issue Oct 11, 2021 · 2 comments
Labels
feature pull request welcome Recorder related to recording fixtures or Nock Back

Comments

@martinalbert
Copy link

Hello,

I posted a question yesterday on stackoverflow about removing sensitive information from recording before recording is written.

I'm using recorder.rec() and I'm modifying recording definitions received from recorder.play().

Is there a way to pass recording matching with overwritten recording?

@gr2m gr2m added the Recorder related to recording fixtures or Nock Back label Nov 8, 2021
@gr2m
Copy link
Member

gr2m commented Nov 8, 2021

That's the same I'm currently doing here:
https://github.com/octokit/fixtures/blob/master/lib/record-scenario.js

I agree there should be a built-in API for that.

@martinalbert
Copy link
Author

Yeah, I managed to work around it (See here), tried to process nock scopes, which worked, but couldn't call filteringPath() multiple times, so I process the definitions, rather loading scopes directly with loadRecording(), I load definitions from file first and then swap placeholders for credentials back to pass the matching.

I would rather have nock doing this for me, but not sure if it's possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature pull request welcome Recorder related to recording fixtures or Nock Back
Projects
None yet
Development

No branches or pull requests

2 participants