Skip to content

Commit

Permalink
Code review feedback 2
Browse files Browse the repository at this point in the history
Implement cassette scrubbing for cookie values

None of these values are currently sensitive, but the possibility exists
that future cassettes could store sensitive values in the Set-Cookie
headers.
  • Loading branch information
matt-bernhardt committed Jan 13, 2025
1 parent 88da0dd commit ea880f1
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 36 deletions.
5 changes: 5 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
header&.each do |redacted_text|
interaction.filter!(redacted_text, '<REDACTED_NEL>')
end

header = interaction.response&.headers&.[]('Set-Cookie')
header&.each do |redacted_text|
interaction.filter!(redacted_text, '<FAKE_COOKIE_DATA>')
end
end
end

Expand Down
20 changes: 9 additions & 11 deletions test/vcr_cassettes/barcode_39080027236626.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 9 additions & 11 deletions test/vcr_cassettes/barcode_not_found.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions test/vcr_cassettes/pmid_37953305.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions test/vcr_cassettes/pmid_not_found.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ea880f1

Please sign in to comment.