Skip to content

Commit baf3fc8

Browse files
authored
Merge pull request #356 from ruby-oauth/feat/auth-sanitizer
Add: auth-sanitizer
2 parents 4460fca + c23ccc4 commit baf3fc8

41 files changed

Lines changed: 618 additions & 424 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.rubocop_gradual.lock

Lines changed: 0 additions & 115 deletions
This file was deleted.

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby 3.4.7
1+
ruby 4.0.4

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ Please file a bug if you notice a violation of semantic versioning.
2020

2121
### Added
2222

23+
- Add `auth-sanitizer` integration for inspect-time secret redaction in core OAuth objects.
24+
2325
### Changed
2426

27+
- Redact sensitive values from `#inspect` in `OAuth::Consumer`, `OAuth::Token`, and `OAuth::Signature::Base`.
28+
2529
### Deprecated
2630

2731
### Removed

Gemfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,22 @@ git_source(:gitlab) { |repo_name| "https://gitlab.com/#{repo_name}" }
1212
# Include dependencies from <gem name>.gemspec
1313
gemspec
1414

15+
unless %w[false 0 no off].include?(ENV.fetch("RUBY_OAUTH_DEV", "false").downcase)
16+
begin
17+
require "nomono/bundler" unless defined?(Nomono)
18+
rescue LoadError
19+
require_relative "../nomono/lib/nomono/bundler"
20+
end
21+
22+
eval_nomono_gems(
23+
gems: %w[auth-sanitizer],
24+
prefix: "RUBY_OAUTH",
25+
path_env: "RUBY_OAUTH_DEV",
26+
root: %w[code src ruby-oauth],
27+
debug_env: "RUBY_OAUTH_DEBUG",
28+
)
29+
end
30+
1531
# Debugging
1632
eval_gemfile "gemfiles/modular/debug.gemfile"
1733

0 commit comments

Comments
 (0)