auth-sanitizer 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +1 -2
- data/CHANGELOG.md +45 -1
- data/CITATION.cff +1 -1
- data/CODE_OF_CONDUCT.md +0 -5
- data/CONTRIBUTING.md +74 -29
- data/FUNDING.md +0 -0
- data/LICENSE.md +10 -0
- data/README.md +98 -122
- data/RUBOCOP.md +0 -0
- data/SECURITY.md +1 -4
- data/certs/pboling.pem +27 -0
- data/lib/auth/sanitizer/core.rb +0 -0
- data/lib/auth/sanitizer/filtered_attributes.rb +2 -2
- data/lib/auth/sanitizer/sanitized_logger.rb +3 -3
- data/lib/auth/sanitizer/thing_filter.rb +0 -0
- data/lib/auth/sanitizer/version.rb +1 -1
- data/lib/auth/sanitizer.rb +6 -0
- data/lib/auth_sanitizer/loader.rb +27 -1
- data/sig/auth/sanitizer/version.rbs +8 -0
- data/sig/auth/sanitizer.rbs +0 -0
- data.tar.gz.sig +0 -0
- metadata +47 -19
- metadata.gz.sig +0 -0
- data/REEK +0 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c91251e1007c195c50ee201a4c41cd42b618ca427a6be9cbbbf6fbb9e27c9954
|
|
4
|
+
data.tar.gz: 07dc8e308d6177992350f763615c9abecb77fc4e807d6b34d332e1a1880b17de
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 22a80ac4d3a37a9570bb2cc875c5f725b989a6b6e93be87d03c9e0145e598deadf8da4c90114f2a5ad4b28ab253f491d31679c7b459015571069f52aac651750
|
|
7
|
+
data.tar.gz: 8a03ebabaebda0de8ea0144e613fe5198d6f03d8b1612e431a272fab6bed71f846f75794932714d0abd7a34c70925ea08b6e582c48a01d61132e4bddcd019e7d
|
checksums.yaml.gz.sig
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
�
|
|
2
|
-
�E�o8��.�5����*^�R��fs�.熮����R���a���~�5��i��g�dgFY�Z�* hڂ��0
|
|
1
|
+
^,�ͧ�6��IO�~V���b�1��=פ�4D<��e�_x�q�鸰�1���x)�J���������Vȧ�/$Y����M0�^��1�Q`��t92�;�����q���s���2��y���&�����yٻ��'J^�{����:Y�VXQ�`��k��*��d�N(谞�/+9�9�I�q�<�x��I�E��D\���U%�|�����ٵ�bM�9���<x��m�Qx���M� P�ߒ��ͬ�F�d+{�}�c�{��
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,46 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [0.1.5] - 2026-06-03
|
|
34
|
+
|
|
35
|
+
- TAG: [v0.1.5][0.1.5t]
|
|
36
|
+
- COVERAGE: 100.00% -- 138/138 lines in 6 files
|
|
37
|
+
- BRANCH COVERAGE: 100.00% -- 28/28 branches in 6 files
|
|
38
|
+
- 84.62% documented
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- Added `VersionGem::Basic` helpers to `Auth::Sanitizer::Version`.
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
|
|
46
|
+
- Refreshed generated package metadata, support documentation, CI workflows,
|
|
47
|
+
and development dependency floors from the current kettle-jem template.
|
|
48
|
+
- Documented that CI workflows and appraisals now target MRI Ruby 2.4+ while
|
|
49
|
+
runtime compatibility remains MRI Ruby 2.2+.
|
|
50
|
+
|
|
51
|
+
### Fixed
|
|
52
|
+
|
|
53
|
+
- Prevented isolated loader namespace leakage on Ruby 2.5 and older TruffleRuby runtimes.
|
|
54
|
+
- Protected the custom gemspec version loader from templating rewrites so
|
|
55
|
+
version detection does not define top-level `Auth` on older Rubies.
|
|
56
|
+
|
|
57
|
+
## [0.1.4] - 2026-05-21
|
|
58
|
+
|
|
59
|
+
- TAG: [v0.1.4][0.1.4t]
|
|
60
|
+
- COVERAGE: 100.00% -- 135/135 lines in 6 files
|
|
61
|
+
- BRANCH COVERAGE: 100.00% -- 28/28 branches in 6 files
|
|
62
|
+
- 84.62% documented
|
|
63
|
+
|
|
64
|
+
### Changed
|
|
65
|
+
|
|
66
|
+
- (docs) Document constrained `auth-sanitizer` version lookup for isolated loader examples
|
|
67
|
+
- (dev) Make templating dependencies opt-in for the main `Gemfile`
|
|
68
|
+
|
|
69
|
+
### Fixed
|
|
70
|
+
|
|
71
|
+
- (test) Stop running Appraisal install steps in the locked-deps workflow for the main `Gemfile`
|
|
72
|
+
|
|
33
73
|
## [0.1.3] - 2026-05-20
|
|
34
74
|
|
|
35
75
|
- TAG: [v0.1.3][0.1.3t]
|
|
@@ -79,7 +119,11 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
79
119
|
|
|
80
120
|
- Initial release
|
|
81
121
|
|
|
82
|
-
[Unreleased]: https://github.com
|
|
122
|
+
[Unreleased]: https://github.com/ruby-oauth/auth-sanitizer/compare/v0.1.5...HEAD
|
|
123
|
+
[0.1.5]: https://github.com/ruby-oauth/auth-sanitizer/compare/v0.1.4...v0.1.5
|
|
124
|
+
[0.1.5t]: https://github.com/ruby-oauth/auth-sanitizer/releases/tag/v0.1.5
|
|
125
|
+
[0.1.4]: https://github.com//ruby-oauth/auth-sanitizer/compare/v0.1.3...v0.1.4
|
|
126
|
+
[0.1.4t]: https://github.com//ruby-oauth/auth-sanitizer/releases/tag/v0.1.4
|
|
83
127
|
[0.1.3]: https://github.com//ruby-oauth/auth-sanitizer/compare/v0.1.2...v0.1.3
|
|
84
128
|
[0.1.3t]: https://github.com//ruby-oauth/auth-sanitizer/releases/tag/v0.1.3
|
|
85
129
|
[0.1.2]: https://github.com//ruby-oauth/auth-sanitizer/compare/v0.1.1...v0.1.2
|
data/CITATION.cff
CHANGED
data/CODE_OF_CONDUCT.md
CHANGED
|
@@ -71,11 +71,6 @@ reporter of any incident.
|
|
|
71
71
|
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
72
|
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
73
|
|
|
74
|
-
* Participants will be tolerant of opposing views.
|
|
75
|
-
* Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks.
|
|
76
|
-
* When interpreting the words and actions of others, participants should always assume good intentions.
|
|
77
|
-
* Behaviour which can be reasonably considered harassment will not be tolerated.
|
|
78
|
-
|
|
79
74
|
### 1. Correction
|
|
80
75
|
|
|
81
76
|
**Community Impact**: Use of inappropriate language or other behavior deemed
|
data/CONTRIBUTING.md
CHANGED
|
@@ -8,19 +8,27 @@ To submit a patch, please fork the project, create a patch with tests, and send
|
|
|
8
8
|
|
|
9
9
|
Remember to [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] if you make changes.
|
|
10
10
|
|
|
11
|
+
## Developer Certificate of Origin
|
|
12
|
+
|
|
13
|
+
In order to protect users of this project, we require all contributors to comply with the
|
|
14
|
+
[Developer Certificate of Origin](https://developercertificate.org/).
|
|
15
|
+
This ensures that all contributions are properly licensed and attributed.
|
|
16
|
+
|
|
11
17
|
## Help out!
|
|
12
18
|
|
|
13
|
-
Take a look at the
|
|
19
|
+
Take a look at the open issues and pull requests, or use the gem and find something to improve.
|
|
14
20
|
|
|
15
21
|
Follow these instructions:
|
|
16
22
|
|
|
17
|
-
1.
|
|
18
|
-
2.
|
|
19
|
-
3.
|
|
20
|
-
4.
|
|
21
|
-
5.
|
|
22
|
-
6.
|
|
23
|
-
7.
|
|
23
|
+
1. Join the Discord: [![Live Chat on Discord][✉️discord-invite-img]][✉️discord-invite]
|
|
24
|
+
2. Fork the repository
|
|
25
|
+
3. Create your feature branch (`git checkout -b my-new-feature`)
|
|
26
|
+
4. Make some fixes.
|
|
27
|
+
5. Commit your changes (`git commit -am 'Added some feature'`)
|
|
28
|
+
6. Push to the branch (`git push origin my-new-feature`)
|
|
29
|
+
7. Make sure to add tests for it. This is important, so it doesn't break in a future release.
|
|
30
|
+
8. Create new Pull Request.
|
|
31
|
+
9. Announce it in the channel for this org in the [Discord][✉️discord-invite]!
|
|
24
32
|
|
|
25
33
|
## Executables vs Rake tasks
|
|
26
34
|
|
|
@@ -42,6 +50,22 @@ There are many Rake tasks available as well. You can see them by running:
|
|
|
42
50
|
bin/rake -T
|
|
43
51
|
```
|
|
44
52
|
|
|
53
|
+
## Code quality checks
|
|
54
|
+
|
|
55
|
+
Run the Reek task when you want a smell check that fails on current findings:
|
|
56
|
+
|
|
57
|
+
```shell
|
|
58
|
+
bin/rake reek
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Refresh the checked-in `REEK` backlog through the rake task, not by redirecting
|
|
62
|
+
the raw `reek` executable output. The rake task uses the project bundle and
|
|
63
|
+
avoids stale generated binstubs shadowing the Reek gem executable:
|
|
64
|
+
|
|
65
|
+
```shell
|
|
66
|
+
bin/rake reek:update
|
|
67
|
+
```
|
|
68
|
+
|
|
45
69
|
## Environment Variables for Local Development
|
|
46
70
|
|
|
47
71
|
Below are the primary environment variables recognized by stone_checksums (and its integrated tools). Unless otherwise noted, set boolean values to the string "true" to enable.
|
|
@@ -78,11 +102,32 @@ Git hooks and commit message helpers (exe/kettle-commit-msg)
|
|
|
78
102
|
- GIT_HOOK_FOOTER_SENTINEL: Required when footer append is enabled — a unique first-line sentinel to prevent duplicates
|
|
79
103
|
- GIT_HOOK_FOOTER_APPEND_DEBUG: Extra debug output in the footer template (true/false)
|
|
80
104
|
|
|
105
|
+
Git diff driver setup
|
|
106
|
+
- Local setup writes repository `.gitattributes` entries and local Git `diff.smorg-*` command config so this checkout uses StructuredMerge semantic diffs.
|
|
107
|
+
- Global setup registers `diff.smorg-*` commands once in the user Git config; use it when you work across several StructuredMerge-enabled repositories.
|
|
108
|
+
- Include-file setup writes `.git/smorg/config` and includes it from local Git config, keeping command registrations out of the repository files.
|
|
109
|
+
- Git hosting forges generally ignore external diff drivers, so pull request views may still show raw textual diffs even when local `git diff` uses semantic drivers.
|
|
110
|
+
|
|
111
|
+
```console
|
|
112
|
+
K_JEM_TEMPLATING=true bundle exec kettle-jem install
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Troubleshooting Git diffs
|
|
116
|
+
- Use `git diff --no-ext-diff` to compare against Git's built-in diff output.
|
|
117
|
+
- Use `git diff --no-textconv` when a textconv projection obscures the raw file bytes you need to inspect.
|
|
118
|
+
- If Git reports a missing `smorg-*` executable, rerun `bundle install` and the setup command above, then check `git config --local --get-regexp '^diff\.smorg-'`.
|
|
119
|
+
- To remove managed local entries, run `K_JEM_TEMPLATING=true bundle exec kettle-jem install --undo`; remove global command registrations with `git config --global --unset-all diff.smorg-ruby.command`.
|
|
120
|
+
|
|
81
121
|
For a quick starting point, this repository’s `mise.toml` defines the shared defaults, and `.env.local` can override them locally. Copy `.env.local.example` to `.env.local`, use `KEY=value` lines, and either activate `mise` in your shell or run commands through `mise exec -C /path/to/project -- ...`.
|
|
82
122
|
|
|
83
123
|
## Appraisals
|
|
84
124
|
|
|
85
125
|
From time to time the [appraisal2][🚎appraisal2] gemfiles in `gemfiles/` will need to be updated.
|
|
126
|
+
Generated appraisal and CI workflow floors are controlled by `ruby.test_minimum`
|
|
127
|
+
in `.structuredmerge/kettle-jem.yml`; this project was templated with `ruby.test_minimum: 2.4`.
|
|
128
|
+
That value describes the lowest Ruby version expected to run the test/development
|
|
129
|
+
toolchain, and it may be higher than the gemspec runtime floor.
|
|
130
|
+
|
|
86
131
|
They are created and updated with the commands:
|
|
87
132
|
|
|
88
133
|
```console
|
|
@@ -97,22 +142,20 @@ bin/rake appraisal:reset
|
|
|
97
142
|
|
|
98
143
|
When adding an appraisal to CI, check the [runner tool cache][🏃♂️runner-tool-cache] to see which runner to use.
|
|
99
144
|
|
|
100
|
-
##
|
|
101
|
-
|
|
102
|
-
Take a look at the `reek` list which is the file called `REEK` and find something to improve.
|
|
145
|
+
## Run Tests
|
|
103
146
|
|
|
104
|
-
|
|
147
|
+
Run tests via `kettle-test` (provided by `kettle-test`). It runs RSpec, writes the full log to
|
|
148
|
+
`tmp/kettle-test/rspec-TIMESTAMP.log`, and prints a compact highlight block with timing, seed,
|
|
149
|
+
pass/fail count, failing example list, and SimpleCov coverage percentages.
|
|
105
150
|
|
|
106
151
|
```console
|
|
107
|
-
bundle exec
|
|
152
|
+
bundle exec kettle-test
|
|
108
153
|
```
|
|
109
154
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
To run all tests
|
|
155
|
+
For targeted runs, disable the hard coverage threshold to avoid false failures:
|
|
113
156
|
|
|
114
157
|
```console
|
|
115
|
-
bundle exec
|
|
158
|
+
K_SOUP_COV_MIN_HARD=false bundle exec kettle-test spec/path/to/spec.rb
|
|
116
159
|
```
|
|
117
160
|
|
|
118
161
|
### Spec organization (required)
|
|
@@ -183,33 +226,34 @@ NOTE: To build without signing the gem set `SKIP_GEM_SIGNING` to any value in th
|
|
|
183
226
|
1. Run `bin/setup && bin/rake` as a "test, coverage, & linting" sanity check
|
|
184
227
|
2. Update the version number in `version.rb`, and ensure `CHANGELOG.md` reflects changes
|
|
185
228
|
3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock`
|
|
186
|
-
4. Run `
|
|
187
|
-
5. Run `git
|
|
229
|
+
4. Run `bin/rake yard` to regenerate the docs site using the canonical docs task
|
|
230
|
+
5. Run `git commit -am "🔖 Prepare release v<VERSION>"` to commit the changes
|
|
231
|
+
6. Run `git push` to trigger the final CI pipeline before release, and merge PRs
|
|
188
232
|
- NOTE: Remember to [check the build][🧪build].
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
233
|
+
7. Run `export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME`
|
|
234
|
+
8. Run `git checkout $GIT_TRUNK_BRANCH_NAME`
|
|
235
|
+
9. Run `git pull origin $GIT_TRUNK_BRANCH_NAME` to ensure latest trunk code
|
|
236
|
+
10. Optional for older Bundler (< 2.7.0): Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use the same timestamp and generate the same checksums
|
|
193
237
|
- If your Bundler is >= 2.7.0, you can skip this; builds are reproducible by default.
|
|
194
238
|
- Run `export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH`
|
|
195
239
|
- If the echo above has no output, then it didn't work.
|
|
196
240
|
- Note: `zsh/datetime` module is needed, if running `zsh`.
|
|
197
241
|
- In older versions of `bash` you can use `date +%s` instead, i.e. `export SOURCE_DATE_EPOCH=$(date +%s) && echo $SOURCE_DATE_EPOCH`
|
|
198
|
-
|
|
199
|
-
|
|
242
|
+
11. Run `bundle exec rake build`
|
|
243
|
+
12. Run `bin/gem_checksums` (more context [1][🔒️rubygems-checksums-pr], [2][🔒️rubygems-guides-pr])
|
|
200
244
|
to create SHA-256 and SHA-512 checksums. This functionality is provided by the `stone_checksums`
|
|
201
245
|
[gem][💎stone_checksums].
|
|
202
246
|
- The script automatically commits but does not push the checksums
|
|
203
|
-
|
|
247
|
+
13. Sanity check the SHA256, comparing with the output from the `bin/gem_checksums` command:
|
|
204
248
|
- `sha256sum pkg/<gem name>-<version>.gem`
|
|
205
|
-
|
|
249
|
+
14. Run `bundle exec rake release` which will create a git tag for the version,
|
|
206
250
|
push git commits and tags, and push the `.gem` file to the gem host configured in the gemspec.
|
|
207
251
|
|
|
208
|
-
[📜src-gl]: https://gitlab.com/ruby-oauth/auth-sanitizer
|
|
252
|
+
[📜src-gl]: https://gitlab.com/ruby-oauth/auth-sanitizer
|
|
209
253
|
[📜src-cb]: https://codeberg.org/ruby-oauth/auth-sanitizer
|
|
210
254
|
[📜src-gh]: https://github.com/ruby-oauth/auth-sanitizer
|
|
211
255
|
[🧪build]: https://github.com/ruby-oauth/auth-sanitizer/actions
|
|
212
|
-
[🤝conduct]: https://
|
|
256
|
+
[🤝conduct]: https://github.com/ruby-oauth/auth-sanitizer/blob/main/CODE_OF_CONDUCT.md
|
|
213
257
|
[🖐contrib-rocks]: https://contrib.rocks
|
|
214
258
|
[🖐contributors]: https://github.com/ruby-oauth/auth-sanitizer/graphs/contributors
|
|
215
259
|
[🚎contributors-gl]: https://gitlab.com/ruby-oauth/auth-sanitizer/-/graphs/main
|
|
@@ -225,3 +269,4 @@ NOTE: To build without signing the gem set `SKIP_GEM_SIGNING` to any value in th
|
|
|
225
269
|
[📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
|
|
226
270
|
[🚎appraisal2]: https://github.com/appraisal-rb/appraisal2
|
|
227
271
|
[🏃♂️runner-tool-cache]: https://github.com/ruby/ruby-builder/releases/tag/toolcache
|
|
272
|
+
[✉️discord-invite]: https://discord.gg/3qme4XHNKN
|
data/FUNDING.md
CHANGED
|
File without changes
|
data/LICENSE.md
ADDED
data/README.md
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
<a href="https://github.com/ruby-oauth"><img alt="ruby-oauth Logo by Aboling0, CC BY-SA 4.0" src="https://logos.galtzo.com/assets/images/ruby-oauth/avatar-128px.svg" width="14%" align="right"/></a>
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[🖼️galtzo-discord]: https://discord.gg/3qme4XHNKN
|
|
5
|
-
[🖼️ruby-lang-i]: https://logos.galtzo.com/assets/images/ruby-lang/avatar-192px.svg
|
|
6
|
-
[🖼️ruby-lang]: https://www.ruby-lang.org/
|
|
7
|
-
[🖼️oauth2-i]: https://logos.galtzo.com/assets/images/oauth/oauth2/avatar-192px.svg
|
|
8
|
-
[🖼️oauth2]: https://github.com/ruby-oauth/oauth2
|
|
3
|
+
# 💎 Auth::Sanitizer
|
|
9
4
|
|
|
10
|
-
|
|
5
|
+
[![Version][👽versioni]][👽version] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: MIT][📄license-img]][📄license] [![Downloads Rank][👽dl-ranki]][👽dl-rank] [![CodeCov Test Coverage][🏀codecovi]][🏀codecov] [![Coveralls Test Coverage][🏀coveralls-img]][🏀coveralls] [![QLTY Test Coverage][🏀qlty-covi]][🏀qlty-cov] [![QLTY Maintainability][🏀qlty-mnti]][🏀qlty-mnt] [![CI Heads][🚎3-hd-wfi]][🚎3-hd-wf] [![CI Runtime Dependencies @ HEAD][🚎12-crh-wfi]][🚎12-crh-wf] [![CI Current][🚎11-c-wfi]][🚎11-c-wf] [![CI Truffle Ruby][🚎9-t-wfi]][🚎9-t-wf] [![CI JRuby][🚎10-j-wfi]][🚎10-j-wf] [![Deps Locked][🚎13-🔒️-wfi]][🚎13-🔒️-wf] [![Deps Unlocked][🚎14-🔓️-wfi]][🚎14-🔓️-wf] [![CI Test Coverage][🚎2-cov-wfi]][🚎2-cov-wf] [![CI Style][🚎5-st-wfi]][🚎5-st-wf] [![Apache SkyWalking Eyes License Compatibility Check][🚎15-🪪-wfi]][🚎15-🪪-wf]
|
|
11
6
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
`if ci_badges.map(&:color).detect { it != "green"}` ☝️ [let me know][🖼️galtzo-discord], as I may have missed the [discord notification][🖼️galtzo-discord].
|
|
7
|
+
`if ci_badges.map(&:color).detect { it != "green"}` ☝️ [let me know][✉️discord-invite], as I may have missed the [discord notification][✉️discord-invite].
|
|
15
8
|
|
|
16
9
|
---
|
|
17
10
|
|
|
@@ -20,13 +13,13 @@
|
|
|
20
13
|
[![OpenCollective Backers][🖇osc-backers-i]][🖇osc-backers] [![OpenCollective Sponsors][🖇osc-sponsors-i]][🖇osc-sponsors] [![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor] [![Liberapay Goal Progress][⛳liberapay-img]][⛳liberapay] [![Donate on PayPal][🖇paypal-img]][🖇paypal] [![Buy me a coffee][🖇buyme-small-img]][🖇buyme] [![Donate on Polar][🖇polar-img]][🖇polar] [![Donate at ko-fi.com][🖇kofi-img]][🖇kofi]
|
|
21
14
|
|
|
22
15
|
<details>
|
|
23
|
-
|
|
16
|
+
<summary>👣 How will this project approach the September 2025 hostile takeover of RubyGems? 🚑️</summary>
|
|
24
17
|
|
|
25
18
|
I've summarized my thoughts in [this blog post](https://dev.to/galtzo/hostile-takeover-of-rubygems-my-thoughts-5hlo).
|
|
26
19
|
|
|
27
20
|
</details>
|
|
28
21
|
|
|
29
|
-
## 🌻 Synopsis
|
|
22
|
+
## 🌻 Synopsis <a href="https://discord.gg/3qme4XHNKN"><img alt="Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0" src="https://logos.galtzo.com/assets/images/galtzo-floss/avatar-128px.svg" width="8%" align="right"/></a> <a href="https://ruby-toolbox.com"><img alt="ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5" src="https://logos.galtzo.com/assets/images/ruby-lang/avatar-128px.svg" width="8%" align="right"/></a>
|
|
30
23
|
|
|
31
24
|
`auth-sanitizer` provides small, dependency-light helpers for keeping OAuth and authentication secrets out of object
|
|
32
25
|
inspection and log output.
|
|
@@ -79,40 +72,44 @@ This gem is used by the following libraries to ensure clean output:
|
|
|
79
72
|
|
|
80
73
|
## 💡 Info you can shake a stick at
|
|
81
74
|
|
|
82
|
-
| Tokens to Remember
|
|
75
|
+
| Tokens to Remember | [![Gem name][⛳️name-img]][⛳️gem-name] [![Gem namespace][⛳️namespace-img]][⛳️gem-namespace] |
|
|
83
76
|
|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
84
|
-
| Works with JRuby
|
|
77
|
+
| Works with JRuby | [![JRuby 9.2 Compat][💎jruby-9.2i]][🚎jruby-9.2-wf] [![JRuby 9.3 Compat][💎jruby-9.3i]][🚎jruby-9.3-wf] <br/> [![JRuby 9.4 Compat][💎jruby-9.4i]][🚎jruby-9.4-wf] [![JRuby current Compat][💎jruby-c-i]][🚎10-j-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf]|
|
|
85
78
|
| Works with Truffle Ruby | [![Truffle Ruby 22.3 Compat][💎truby-22.3i]][🚎truby-22.3-wf] [![Truffle Ruby 23.0 Compat][💎truby-23.0i]][🚎truby-23.0-wf] [![Truffle Ruby 23.1 Compat][💎truby-23.1i]][🚎truby-23.1-wf] <br/> [![Truffle Ruby 24.2 Compat][💎truby-24.2i]][🚎truby-24.2-wf] [![Truffle Ruby 25.0 Compat][💎truby-25.0i]][🚎truby-25.0-wf] [![Truffle Ruby current Compat][💎truby-c-i]][🚎9-t-wf]|
|
|
86
|
-
| Works with MRI Ruby 4
|
|
87
|
-
| Works with MRI Ruby 3
|
|
88
|
-
| Works with MRI Ruby 2
|
|
89
|
-
| Support & Community
|
|
90
|
-
| Source
|
|
91
|
-
| Documentation
|
|
92
|
-
| Compliance
|
|
93
|
-
| Style
|
|
94
|
-
| Maintainer 🎖️
|
|
95
|
-
| `...` 💖
|
|
79
|
+
| Works with MRI Ruby 4 | [![Ruby 4.0 Compat][💎ruby-4.0i]][🚎11-c-wf] [![Ruby current Compat][💎ruby-c-i]][🚎11-c-wf] [![Ruby HEAD Compat][💎ruby-headi]][🚎3-hd-wf]|
|
|
80
|
+
| Works with MRI Ruby 3 | [![Ruby 3.0 Compat][💎ruby-3.0i]][🚎ruby-3.0-wf] [![Ruby 3.1 Compat][💎ruby-3.1i]][🚎ruby-3.1-wf] [![Ruby 3.2 Compat][💎ruby-3.2i]][🚎ruby-3.2-wf] [![Ruby 3.3 Compat][💎ruby-3.3i]][🚎ruby-3.3-wf] [![Ruby 3.4 Compat][💎ruby-3.4i]][🚎ruby-3.4-wf]|
|
|
81
|
+
| Works with MRI Ruby 2 | ![Ruby 2.2 Compat][💎ruby-2.2i] <br/> [![Ruby 2.4 Compat][💎ruby-2.4i]][🚎ruby-2.4-wf] [![Ruby 2.5 Compat][💎ruby-2.5i]][🚎ruby-2.5-wf] [![Ruby 2.6 Compat][💎ruby-2.6i]][🚎ruby-2.6-wf] [![Ruby 2.7 Compat][💎ruby-2.7i]][🚎ruby-2.7-wf]|
|
|
82
|
+
| Support & Community | [![Join Me on Daily.dev's RubyFriends][✉️ruby-friends-img]][✉️ruby-friends] [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] [![Get help from me on Upwork][👨🏼🏫expsup-upwork-img]][👨🏼🏫expsup-upwork] [![Get help from me on Codementor][👨🏼🏫expsup-codementor-img]][👨🏼🏫expsup-codementor] |
|
|
83
|
+
| Source | [![Source on GitLab.com][📜src-gl-img]][📜src-gl] [![Source on CodeBerg.org][📜src-cb-img]][📜src-cb] [![Source on Github.com][📜src-gh-img]][📜src-gh] [![The best SHA: dQw4w9WgXcQ!][🧮kloc-img]][🧮kloc] |
|
|
84
|
+
| Documentation | [![Current release on RubyDoc.info][📜docs-cr-rd-img]][🚎yard-current] [![YARD on Galtzo.com][📜docs-head-rd-img]][🚎yard-head] [![Maintainer Blog][🚂maint-blog-img]][🚂maint-blog] [![GitLab Wiki][📜gl-wiki-img]][📜gl-wiki] [![GitHub Wiki][📜gh-wiki-img]][📜gh-wiki] |
|
|
85
|
+
| Compliance | [![License: MIT][📄license-img]][📄license] [![Apache license compatibility: Category A][📄license-compat-img]][📄license-compat] [![📄ilo-declaration-img]][📄ilo-declaration] [![Security Policy][🔐security-img]][🔐security] [![Contributor Covenant 2.1][🪇conduct-img]][🪇conduct] [![SemVer 2.0.0][📌semver-img]][📌semver] |
|
|
86
|
+
| Style | [![Enforced Code Style Linter][💎rlts-img]][💎rlts] [![Keep-A-Changelog 1.0.0][📗keep-changelog-img]][📗keep-changelog] [![Gitmoji Commits][📌gitmoji-img]][📌gitmoji] [![Compatibility appraised by: appraisal2][💎appraisal2-img]][💎appraisal2] |
|
|
87
|
+
| Maintainer 🎖️ | [![Follow Me on LinkedIn][💖🖇linkedin-img]][💖🖇linkedin] [![Follow Me on Ruby.Social][💖🐘ruby-mast-img]][💖🐘ruby-mast] [![Follow Me on Bluesky][💖🦋bluesky-img]][💖🦋bluesky] [![Contact Maintainer][🚂maint-contact-img]][🚂maint-contact] [![My technical writing][💖💁🏼♂️devto-img]][💖💁🏼♂️devto] |
|
|
88
|
+
| `...` 💖 | [![Find Me on WellFound:][💖✌️wellfound-img]][💖✌️wellfound] [![Find Me on CrunchBase][💖💲crunchbase-img]][💖💲crunchbase] [![My LinkTree][💖🌳linktree-img]][💖🌳linktree] [![More About Me][💖💁🏼♂️aboutme-img]][💖💁🏼♂️aboutme] [🧊][💖🧊berg] [🐙][💖🐙hub] [🛖][💖🛖hut] [🧪][💖🧪lab] |
|
|
96
89
|
|
|
97
90
|
### Compatibility
|
|
98
91
|
|
|
99
92
|
Compatible with MRI Ruby 2.2.0+, and concordant releases of JRuby, and TruffleRuby.
|
|
93
|
+
CI workflows and Appraisals are generated for MRI Ruby 2.4+.
|
|
94
|
+
This test floor is configured by `ruby.test_minimum` in `.kettle-jem.yml` and
|
|
95
|
+
may be higher than the gem's runtime compatibility floor when legacy Rubies are
|
|
96
|
+
not practical for the current toolchain.
|
|
100
97
|
|
|
101
|
-
| 🚚 _Amazing_ test matrix was brought to you by | 🔎 appraisal2 🔎 and the color 💚 green 💚
|
|
98
|
+
| 🚚 _Amazing_ test matrix was brought to you by | 🔎 appraisal2 🔎 and the color 💚 green 💚 |
|
|
102
99
|
|------------------------------------------------|--------------------------------------------------------|
|
|
103
|
-
| 👟 Check it out!
|
|
100
|
+
| 👟 Check it out! | ✨ [github.com/appraisal-rb/appraisal2][💎appraisal2] ✨ |
|
|
104
101
|
|
|
105
102
|
### Federated DVCS
|
|
106
103
|
|
|
107
104
|
<details markdown="1">
|
|
108
|
-
|
|
105
|
+
<summary>Find this repo on federated forges (Coming soon!)</summary>
|
|
109
106
|
|
|
110
|
-
| Federated [DVCS][💎d-in-dvcs] Repository
|
|
107
|
+
| Federated [DVCS][💎d-in-dvcs] Repository | Status | Issues | PRs | Wiki | CI | Discussions |
|
|
111
108
|
|-------------------------------------------------|-----------------------------------------------------------------------|---------------------------|--------------------------|---------------------------|--------------------------|------------------------------|
|
|
112
|
-
| 🧪 [ruby-oauth/auth-sanitizer on GitLab][📜src-gl]
|
|
113
|
-
| 🧊 [ruby-oauth/auth-sanitizer on CodeBerg][📜src-cb] | An Ethical Mirror ([Donate][🤝cb-donate])
|
|
114
|
-
| 🐙 [ruby-oauth/auth-sanitizer on GitHub][📜src-gh]
|
|
115
|
-
| 🎮️ [Discord Server][✉️discord-invite]
|
|
109
|
+
| 🧪 [ruby-oauth/auth-sanitizer on GitLab][📜src-gl] | The Truth | [💚][🤝gl-issues] | [💚][🤝gl-pulls] | [💚][📜gl-wiki] | 🐭 Tiny Matrix | ➖ |
|
|
110
|
+
| 🧊 [ruby-oauth/auth-sanitizer on CodeBerg][📜src-cb] | An Ethical Mirror ([Donate][🤝cb-donate]) | [💚][🤝cb-issues] | [💚][🤝cb-pulls] | ➖ | ⭕️ No Matrix | ➖ |
|
|
111
|
+
| 🐙 [ruby-oauth/auth-sanitizer on GitHub][📜src-gh] | Another Mirror | [💚][🤝gh-issues] | [💚][🤝gh-pulls] | [💚][📜gh-wiki] | 💯 Full Matrix | [💚][gh-discussions] |
|
|
112
|
+
| 🎮️ [Discord Server][✉️discord-invite] | [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] | [Let's][✉️discord-invite] | [talk][✉️discord-invite] | [about][✉️discord-invite] | [this][✉️discord-invite] | [library!][✉️discord-invite] |
|
|
116
113
|
|
|
117
114
|
</details>
|
|
118
115
|
|
|
@@ -123,7 +120,7 @@ Compatible with MRI Ruby 2.2.0+, and concordant releases of JRuby, and TruffleRu
|
|
|
123
120
|
Available as part of the Tidelift Subscription.
|
|
124
121
|
|
|
125
122
|
<details markdown="1">
|
|
126
|
-
|
|
123
|
+
<summary>Need enterprise-level guarantees?</summary>
|
|
127
124
|
|
|
128
125
|
The maintainers of this and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use.
|
|
129
126
|
|
|
@@ -155,41 +152,6 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
|
155
152
|
gem install auth-sanitizer
|
|
156
153
|
```
|
|
157
154
|
|
|
158
|
-
### 🔒 Secure Installation
|
|
159
|
-
|
|
160
|
-
<details markdown="1">
|
|
161
|
-
<summary>For Medium or High Security Installations</summary>
|
|
162
|
-
|
|
163
|
-
This gem is cryptographically signed and has verifiable [SHA-256 and SHA-512][💎SHA_checksums] checksums by
|
|
164
|
-
[stone_checksums][💎stone_checksums]. Be sure the gem you install hasn’t been tampered with
|
|
165
|
-
by following the instructions below.
|
|
166
|
-
|
|
167
|
-
Add my public key (if you haven’t already; key expires 2045-04-29) as a trusted certificate:
|
|
168
|
-
|
|
169
|
-
```console
|
|
170
|
-
gem cert --add <(curl -Ls https://raw.github.com/galtzo-floss/certs/main/pboling.pem)
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
You only need to do that once. Then proceed to install with:
|
|
174
|
-
|
|
175
|
-
```console
|
|
176
|
-
gem install auth-sanitizer -P HighSecurity
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
The `HighSecurity` trust profile will verify signed gems, and not allow the installation of unsigned dependencies.
|
|
180
|
-
|
|
181
|
-
If you want to up your security game full-time:
|
|
182
|
-
|
|
183
|
-
```console
|
|
184
|
-
bundle config set --global trust-policy MediumSecurity
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
`MediumSecurity` instead of `HighSecurity` is necessary if not all the gems you use are signed.
|
|
188
|
-
|
|
189
|
-
NOTE: Be prepared to track down certs for signed gems and add them the same way you added mine.
|
|
190
|
-
|
|
191
|
-
</details>
|
|
192
|
-
|
|
193
155
|
## ⚙️ Configuration
|
|
194
156
|
|
|
195
157
|
Most applications can use the defaults. Configuration is available when a host gem or application wants to align
|
|
@@ -248,12 +210,18 @@ A gem that needs zero new top-level namespaces from this dependency can load the
|
|
|
248
210
|
namespace. On Ruby 3.1+, use `Kernel.load(path, module)`:
|
|
249
211
|
|
|
250
212
|
```ruby
|
|
251
|
-
|
|
252
|
-
|
|
213
|
+
auth_sanitizer_requirement = Gem::Requirement.new("~> 0.1", ">= 0.1.3")
|
|
214
|
+
auth_sanitizer_spec = Gem.loaded_specs["auth-sanitizer"]
|
|
215
|
+
unless auth_sanitizer_spec && auth_sanitizer_requirement.satisfied_by?(auth_sanitizer_spec.version)
|
|
216
|
+
auth_sanitizer_spec = Gem::Specification.find_by_name("auth-sanitizer", auth_sanitizer_requirement)
|
|
217
|
+
end
|
|
253
218
|
auth_sanitizer_loader_path = File.join(
|
|
254
219
|
auth_sanitizer_spec.full_gem_path,
|
|
255
|
-
"lib/auth_sanitizer/loader.rb"
|
|
220
|
+
"lib/auth_sanitizer/loader.rb"
|
|
256
221
|
)
|
|
222
|
+
unless File.file?(auth_sanitizer_loader_path)
|
|
223
|
+
raise LoadError, "auth-sanitizer #{auth_sanitizer_requirement} loader not found at #{auth_sanitizer_loader_path}"
|
|
224
|
+
end
|
|
257
225
|
|
|
258
226
|
auth_sanitizer_loader_namespace = Module.new
|
|
259
227
|
Kernel.load(auth_sanitizer_loader_path, auth_sanitizer_loader_namespace)
|
|
@@ -274,18 +242,24 @@ Ruby 2.2 through Ruby 3.0 do not support `Kernel.load(path, module)`. For those
|
|
|
274
242
|
inside an anonymous namespace with `Module#module_eval`:
|
|
275
243
|
|
|
276
244
|
```ruby
|
|
277
|
-
|
|
278
|
-
|
|
245
|
+
auth_sanitizer_requirement = Gem::Requirement.new("~> 0.1", ">= 0.1.3")
|
|
246
|
+
auth_sanitizer_spec = Gem.loaded_specs["auth-sanitizer"]
|
|
247
|
+
unless auth_sanitizer_spec && auth_sanitizer_requirement.satisfied_by?(auth_sanitizer_spec.version)
|
|
248
|
+
auth_sanitizer_spec = Gem::Specification.find_by_name("auth-sanitizer", auth_sanitizer_requirement)
|
|
249
|
+
end
|
|
279
250
|
auth_sanitizer_loader_path = File.join(
|
|
280
251
|
auth_sanitizer_spec.full_gem_path,
|
|
281
|
-
"lib/auth_sanitizer/loader.rb"
|
|
252
|
+
"lib/auth_sanitizer/loader.rb"
|
|
282
253
|
)
|
|
254
|
+
unless File.file?(auth_sanitizer_loader_path)
|
|
255
|
+
raise LoadError, "auth-sanitizer #{auth_sanitizer_requirement} loader not found at #{auth_sanitizer_loader_path}"
|
|
256
|
+
end
|
|
283
257
|
|
|
284
258
|
auth_sanitizer_loader_namespace = Module.new
|
|
285
259
|
auth_sanitizer_loader_namespace.module_eval(
|
|
286
260
|
File.read(auth_sanitizer_loader_path),
|
|
287
261
|
auth_sanitizer_loader_path,
|
|
288
|
-
1
|
|
262
|
+
1
|
|
289
263
|
)
|
|
290
264
|
|
|
291
265
|
AUTH_SANITIZER = auth_sanitizer_loader_namespace
|
|
@@ -341,7 +315,7 @@ logger = Auth::Sanitizer::SanitizedLogger.new(
|
|
|
341
315
|
api_key
|
|
342
316
|
private_key
|
|
343
317
|
session_secret
|
|
344
|
-
]
|
|
318
|
+
]
|
|
345
319
|
)
|
|
346
320
|
```
|
|
347
321
|
|
|
@@ -351,7 +325,7 @@ You can also replace the list entirely:
|
|
|
351
325
|
logger = Auth::Sanitizer::SanitizedLogger.new(
|
|
352
326
|
Logger.new($stdout),
|
|
353
327
|
filtered_keys: %w[my_secret],
|
|
354
|
-
label: "[GONE]"
|
|
328
|
+
label: "[GONE]"
|
|
355
329
|
)
|
|
356
330
|
```
|
|
357
331
|
|
|
@@ -449,7 +423,7 @@ end
|
|
|
449
423
|
response = TokenResponse.new(
|
|
450
424
|
access_token: "access-token-value",
|
|
451
425
|
refresh_token: "refresh-token-value",
|
|
452
|
-
scope: "profile email"
|
|
426
|
+
scope: "profile email"
|
|
453
427
|
)
|
|
454
428
|
|
|
455
429
|
response.inspect
|
|
@@ -512,7 +486,7 @@ Use `filtered_keys:` for application-specific secrets:
|
|
|
512
486
|
logger = Auth::Sanitizer::SanitizedLogger.new(
|
|
513
487
|
Logger.new($stdout),
|
|
514
488
|
filtered_keys: %w[access_token api_key signing_secret],
|
|
515
|
-
label: "[SECRET]"
|
|
489
|
+
label: "[SECRET]"
|
|
516
490
|
)
|
|
517
491
|
|
|
518
492
|
logger.debug("api_key=12345&access_token=abc123")
|
|
@@ -541,8 +515,8 @@ While ruby-oauth tools are free software and will always be, the project would b
|
|
|
541
515
|
Raising a monthly budget of... "dollars" would make the project more sustainable.
|
|
542
516
|
|
|
543
517
|
We welcome both individual and corporate sponsors! We also offer a
|
|
544
|
-
wide array of funding channels to account for your preferences
|
|
545
|
-
|
|
518
|
+
wide array of funding channels to account for your preferences.
|
|
519
|
+
Currently, [Open Collective][🖇osc] is our preferred funding platform.
|
|
546
520
|
|
|
547
521
|
**If you're working in a company that's making significant use of ruby-oauth tools we'd
|
|
548
522
|
appreciate it if you suggest to your company to become a ruby-oauth sponsor.**
|
|
@@ -554,7 +528,7 @@ You can support the development of ruby-oauth tools via
|
|
|
554
528
|
[Open Collective][🖇osc]
|
|
555
529
|
and [Tidelift][🏙️entsup-tidelift].
|
|
556
530
|
|
|
557
|
-
| 📍 NOTE
|
|
531
|
+
| 📍 NOTE |
|
|
558
532
|
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
559
533
|
| If doing a sponsorship in the form of donation is problematic for your company <br/> from an accounting standpoint, we'd recommend the use of Tidelift, <br/> where you can get a support-like subscription instead. |
|
|
560
534
|
|
|
@@ -582,7 +556,7 @@ No sponsors yet. Be the first!
|
|
|
582
556
|
|
|
583
557
|
### Another way to support open-source
|
|
584
558
|
|
|
585
|
-
I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small.
|
|
559
|
+
I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈 cats).
|
|
586
560
|
|
|
587
561
|
If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in `bundle fund`.
|
|
588
562
|
|
|
@@ -599,7 +573,7 @@ See [SECURITY.md][🔐security].
|
|
|
599
573
|
## 🤝 Contributing
|
|
600
574
|
|
|
601
575
|
If you need some ideas of where to help, you could work on adding more code coverage,
|
|
602
|
-
or if it is already 💯 (see [below](#code-coverage)) check [
|
|
576
|
+
or if it is already 💯 (see [below](#code-coverage)) check [issues][🤝gh-issues] or [PRs][🤝gh-pulls],
|
|
603
577
|
or use the gem and think about how it could be better.
|
|
604
578
|
|
|
605
579
|
We [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] so if you make changes, remember to update it.
|
|
@@ -612,12 +586,17 @@ See [CONTRIBUTING.md][🤝contributing].
|
|
|
612
586
|
|
|
613
587
|
### Code Coverage
|
|
614
588
|
|
|
589
|
+
<details markdown="1">
|
|
590
|
+
<summary>Coverage service badges</summary>
|
|
591
|
+
|
|
615
592
|
[![Coverage Graph][🏀codecov-g]][🏀codecov]
|
|
616
593
|
|
|
617
594
|
[![Coveralls Test Coverage][🏀coveralls-img]][🏀coveralls]
|
|
618
595
|
|
|
619
596
|
[![QLTY Test Coverage][🏀qlty-covi]][🏀qlty-cov]
|
|
620
597
|
|
|
598
|
+
</details>
|
|
599
|
+
|
|
621
600
|
### 🪇 Code of Conduct
|
|
622
601
|
|
|
623
602
|
Everyone interacting with this project's codebases, issue trackers,
|
|
@@ -632,13 +611,13 @@ Made with [contributors-img][🖐contrib-rocks].
|
|
|
632
611
|
Also see GitLab Contributors: [https://gitlab.com/ruby-oauth/auth-sanitizer/-/graphs/main][🚎contributors-gl]
|
|
633
612
|
|
|
634
613
|
<details>
|
|
635
|
-
|
|
614
|
+
<summary>⭐️ Star History</summary>
|
|
636
615
|
|
|
637
|
-
<a href="https://star-history.com
|
|
616
|
+
<a href="https://star-history.com/ruby-oauth/auth-sanitizer&Date">
|
|
638
617
|
<picture>
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
618
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=ruby-oauth/auth-sanitizer&type=Date&theme=dark" />
|
|
619
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=ruby-oauth/auth-sanitizer&type=Date" />
|
|
620
|
+
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=ruby-oauth/auth-sanitizer&type=Date" />
|
|
642
621
|
</picture>
|
|
643
622
|
</a>
|
|
644
623
|
|
|
@@ -646,19 +625,8 @@ Also see GitLab Contributors: [https://gitlab.com/ruby-oauth/auth-sanitizer/-/gr
|
|
|
646
625
|
|
|
647
626
|
## 📌 Versioning
|
|
648
627
|
|
|
649
|
-
This
|
|
650
|
-
|
|
651
|
-
Specifically, if a minor or patch version is released that breaks backward compatibility,
|
|
652
|
-
a new version should be immediately released that restores compatibility.
|
|
653
|
-
Breaking changes to the public API will only be introduced with new major versions.
|
|
654
|
-
|
|
655
|
-
> dropping support for a platform is both obviously and objectively a breaking change <br/>
|
|
656
|
-
>—Jordan Harband ([@ljharb](https://github.com/ljharb), maintainer of SemVer) [in SemVer issue 716][📌semver-breaking]
|
|
657
|
-
|
|
658
|
-
I understand that policy doesn't work universally ("exceptions to every rule!"),
|
|
659
|
-
but it is the policy here.
|
|
660
|
-
As such, in many cases it is good to specify a dependency on this library using
|
|
661
|
-
the [Pessimistic Version Constraint][📌pvc] with two digits of precision.
|
|
628
|
+
This library follows [![Semantic Versioning 2.0.0][📌semver-img]][📌semver] for its public API where practical.
|
|
629
|
+
For most applications, prefer the [Pessimistic Version Constraint][📌pvc] with two digits of precision.
|
|
662
630
|
|
|
663
631
|
For example:
|
|
664
632
|
|
|
@@ -669,8 +637,8 @@ spec.add_dependency("auth-sanitizer", "~> 0.0")
|
|
|
669
637
|
<details markdown="1">
|
|
670
638
|
<summary>📌 Is "Platform Support" part of the public API? More details inside.</summary>
|
|
671
639
|
|
|
672
|
-
|
|
673
|
-
|
|
640
|
+
Dropping support for a platform can be a breaking change for affected users.
|
|
641
|
+
If a release changes supported platforms, it should be called out clearly in the changelog and versioned with that impact in mind.
|
|
674
642
|
|
|
675
643
|
To get a better understanding of how SemVer is intended to work over a project's lifetime,
|
|
676
644
|
read this article from the creator of SemVer:
|
|
@@ -690,6 +658,13 @@ the [MIT](MIT.md) [![License: MIT][📄license-img]][📄license-ref].
|
|
|
690
658
|
|
|
691
659
|
See [LICENSE.md][📄license] for the official copyright notice.
|
|
692
660
|
|
|
661
|
+
<details markdown="1">
|
|
662
|
+
<summary>Copyright holders</summary>
|
|
663
|
+
|
|
664
|
+
- Copyright (c) 2026 Peter H. Boling
|
|
665
|
+
|
|
666
|
+
</details>
|
|
667
|
+
|
|
693
668
|
## 🤑 A request for help
|
|
694
669
|
|
|
695
670
|
Maintainers have teeth and need to pay their dentists.
|
|
@@ -709,6 +684,8 @@ To say "thanks!" ☝️ Join the Discord or 👇️ send money.
|
|
|
709
684
|
|
|
710
685
|
### Please give the project a star ⭐ ♥.
|
|
711
686
|
|
|
687
|
+
Many parts of this project are actively managed by a [kettle-jem](https://github.com/structuredmerge/structuredmerge-ruby/tree/main/gems/kettle-jem) smart template utilizing [StructuredMerge.org](https://structuredmerge.org) merge contracts.
|
|
688
|
+
|
|
712
689
|
Thanks for RTFM. ☺️
|
|
713
690
|
|
|
714
691
|
[⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611&style=flat
|
|
@@ -753,7 +730,7 @@ Thanks for RTFM. ☺️
|
|
|
753
730
|
[⛳️gem-name]: https://bestgems.org/gems/auth-sanitizer
|
|
754
731
|
[⛳️name-img]: https://img.shields.io/badge/name-auth--sanitizer-3C2D2D.svg?style=square&logo=rubygems&logoColor=red
|
|
755
732
|
[⛳️tag-img]: https://img.shields.io/github/tag/ruby-oauth/auth-sanitizer.svg
|
|
756
|
-
[⛳️tag]:
|
|
733
|
+
[⛳️tag]: https://github.com/ruby-oauth/auth-sanitizer/releases
|
|
757
734
|
[🚂maint-blog]: http://www.railsbling.com/tags/auth-sanitizer
|
|
758
735
|
[🚂maint-blog-img]: https://img.shields.io/badge/blog-railsbling-0093D0.svg?style=for-the-badge&logo=rubyonrails&logoColor=orange
|
|
759
736
|
[🚂maint-contact]: http://www.railsbling.com/contact
|
|
@@ -788,7 +765,7 @@ Thanks for RTFM. ☺️
|
|
|
788
765
|
[💁🏼♂️peterboling]: http://www.peterboling.com
|
|
789
766
|
[🚂railsbling]: http://www.railsbling.com
|
|
790
767
|
[📜src-gl-img]: https://img.shields.io/badge/GitLab-FBA326?style=for-the-badge&logo=Gitlab&logoColor=orange
|
|
791
|
-
[📜src-gl]: https://gitlab.com/ruby-oauth/auth-sanitizer
|
|
768
|
+
[📜src-gl]: https://gitlab.com/ruby-oauth/auth-sanitizer
|
|
792
769
|
[📜src-cb-img]: https://img.shields.io/badge/CodeBerg-4893CC?style=for-the-badge&logo=CodeBerg&logoColor=blue
|
|
793
770
|
[📜src-cb]: https://codeberg.org/ruby-oauth/auth-sanitizer
|
|
794
771
|
[📜src-gh-img]: https://img.shields.io/badge/GitHub-238636?style=for-the-badge&logo=Github&logoColor=green
|
|
@@ -797,8 +774,8 @@ Thanks for RTFM. ☺️
|
|
|
797
774
|
[📜docs-head-rd-img]: https://img.shields.io/badge/YARD_on_Galtzo.com-HEAD-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
|
|
798
775
|
[📜gl-wiki]: https://gitlab.com/ruby-oauth/auth-sanitizer/-/wikis/home
|
|
799
776
|
[📜gh-wiki]: https://github.com/ruby-oauth/auth-sanitizer/wiki
|
|
800
|
-
[📜gl-wiki-img]: https://img.shields.io/badge/wiki-
|
|
801
|
-
[📜gh-wiki-img]: https://img.shields.io/badge/wiki-
|
|
777
|
+
[📜gl-wiki-img]: https://img.shields.io/badge/wiki-gitlab-943CD2.svg?style=for-the-badge&logo=gitlab&logoColor=white
|
|
778
|
+
[📜gh-wiki-img]: https://img.shields.io/badge/wiki-github-943CD2.svg?style=for-the-badge&logo=github&logoColor=white
|
|
802
779
|
[👽dl-rank]: https://bestgems.org/gems/auth-sanitizer
|
|
803
780
|
[👽dl-ranki]: https://img.shields.io/gem/rd/auth-sanitizer.svg
|
|
804
781
|
[👽version]: https://bestgems.org/gems/auth-sanitizer
|
|
@@ -811,9 +788,6 @@ Thanks for RTFM. ☺️
|
|
|
811
788
|
[🏀codecovi]: https://codecov.io/gh/ruby-oauth/auth-sanitizer/graph/badge.svg
|
|
812
789
|
[🏀coveralls]: https://coveralls.io/github/ruby-oauth/auth-sanitizer?branch=main
|
|
813
790
|
[🏀coveralls-img]: https://coveralls.io/repos/github/ruby-oauth/auth-sanitizer/badge.svg?branch=main
|
|
814
|
-
[🖐codeQL]: https://github.com/ruby-oauth/auth-sanitizer/security/code-scanning
|
|
815
|
-
[🖐codeQL-img]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/codeql-analysis.yml/badge.svg
|
|
816
|
-
[🚎ruby-2.3-wf]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/ruby-2.3.yml
|
|
817
791
|
[🚎ruby-2.4-wf]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/ruby-2.4.yml
|
|
818
792
|
[🚎ruby-2.5-wf]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/ruby-2.5.yml
|
|
819
793
|
[🚎ruby-2.6-wf]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/ruby-2.6.yml
|
|
@@ -823,6 +797,7 @@ Thanks for RTFM. ☺️
|
|
|
823
797
|
[🚎ruby-3.2-wf]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/ruby-3.2.yml
|
|
824
798
|
[🚎ruby-3.3-wf]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/ruby-3.3.yml
|
|
825
799
|
[🚎ruby-3.4-wf]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/ruby-3.4.yml
|
|
800
|
+
[🚎jruby-9.2-wf]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/jruby-9.2.yml
|
|
826
801
|
[🚎jruby-9.3-wf]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/jruby-9.3.yml
|
|
827
802
|
[🚎jruby-9.4-wf]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/jruby-9.4.yml
|
|
828
803
|
[🚎truby-22.3-wf]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/truffleruby-22.3.yml
|
|
@@ -851,7 +826,6 @@ Thanks for RTFM. ☺️
|
|
|
851
826
|
[🚎15-🪪-wf]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/license-eye.yml
|
|
852
827
|
[🚎15-🪪-wfi]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/license-eye.yml/badge.svg
|
|
853
828
|
[💎ruby-2.2i]: https://img.shields.io/badge/Ruby-2.2_(%F0%9F%9A%ABCI)-AABBCC?style=for-the-badge&logo=ruby&logoColor=white
|
|
854
|
-
[💎ruby-2.3i]: https://img.shields.io/badge/Ruby-2.3-DF00CA?style=for-the-badge&logo=ruby&logoColor=white
|
|
855
829
|
[💎ruby-2.4i]: https://img.shields.io/badge/Ruby-2.4-DF00CA?style=for-the-badge&logo=ruby&logoColor=white
|
|
856
830
|
[💎ruby-2.5i]: https://img.shields.io/badge/Ruby-2.5-DF00CA?style=for-the-badge&logo=ruby&logoColor=white
|
|
857
831
|
[💎ruby-2.6i]: https://img.shields.io/badge/Ruby-2.6-DF00CA?style=for-the-badge&logo=ruby&logoColor=white
|
|
@@ -870,6 +844,7 @@ Thanks for RTFM. ☺️
|
|
|
870
844
|
[💎truby-24.2i]: https://img.shields.io/badge/Truffle_Ruby-24.2-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
871
845
|
[💎truby-25.0i]: https://img.shields.io/badge/Truffle_Ruby-25.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
872
846
|
[💎truby-c-i]: https://img.shields.io/badge/Truffle_Ruby-current-34BCB1?style=for-the-badge&logo=ruby&logoColor=green
|
|
847
|
+
[💎jruby-9.2i]: https://img.shields.io/badge/JRuby-9.2-FBE742?style=for-the-badge&logo=ruby&logoColor=red
|
|
873
848
|
[💎jruby-9.3i]: https://img.shields.io/badge/JRuby-9.3-FBE742?style=for-the-badge&logo=ruby&logoColor=red
|
|
874
849
|
[💎jruby-9.4i]: https://img.shields.io/badge/JRuby-9.4-FBE742?style=for-the-badge&logo=ruby&logoColor=red
|
|
875
850
|
[💎jruby-c-i]: https://img.shields.io/badge/JRuby-current-FBE742?style=for-the-badge&logo=ruby&logoColor=green
|
|
@@ -881,34 +856,35 @@ Thanks for RTFM. ☺️
|
|
|
881
856
|
[🤝cb-issues]: https://codeberg.org/ruby-oauth/auth-sanitizer/issues
|
|
882
857
|
[🤝cb-pulls]: https://codeberg.org/ruby-oauth/auth-sanitizer/pulls
|
|
883
858
|
[🤝cb-donate]: https://donate.codeberg.org/
|
|
884
|
-
[🤝contributing]: CONTRIBUTING.md
|
|
885
|
-
[🏀codecov-g]: https://codecov.io/gh/ruby-oauth/auth-sanitizer/
|
|
859
|
+
[🤝contributing]: https://github.com/ruby-oauth/auth-sanitizer/blob/main/CONTRIBUTING.md
|
|
860
|
+
[🏀codecov-g]: https://codecov.io/gh/ruby-oauth/auth-sanitizer/graph/badge.svg
|
|
886
861
|
[🖐contrib-rocks]: https://contrib.rocks
|
|
887
862
|
[🖐contributors]: https://github.com/ruby-oauth/auth-sanitizer/graphs/contributors
|
|
888
863
|
[🖐contributors-img]: https://contrib.rocks/image?repo=ruby-oauth/auth-sanitizer
|
|
889
864
|
[🚎contributors-gl]: https://gitlab.com/ruby-oauth/auth-sanitizer/-/graphs/main
|
|
890
|
-
[🪇conduct]: CODE_OF_CONDUCT.md
|
|
865
|
+
[🪇conduct]: https://github.com/ruby-oauth/auth-sanitizer/blob/main/CODE_OF_CONDUCT.md
|
|
891
866
|
[🪇conduct-img]: https://img.shields.io/badge/Contributor_Covenant-2.1-259D6C.svg
|
|
892
867
|
[📌pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
|
|
893
868
|
[📌semver]: https://semver.org/spec/v2.0.0.html
|
|
894
869
|
[📌semver-img]: https://img.shields.io/badge/semver-2.0.0-259D6C.svg?style=flat
|
|
895
870
|
[📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
|
|
896
871
|
[📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
|
|
897
|
-
[📌changelog]: CHANGELOG.md
|
|
872
|
+
[📌changelog]: https://github.com/ruby-oauth/auth-sanitizer/blob/main/CHANGELOG.md
|
|
898
873
|
[📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
|
|
899
874
|
[📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-34495e.svg?style=flat
|
|
900
875
|
[📌gitmoji]: https://gitmoji.dev
|
|
901
876
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
902
877
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
903
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.
|
|
904
|
-
[🔐security]: SECURITY.md
|
|
878
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.138-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
879
|
+
[🔐security]: https://github.com/ruby-oauth/auth-sanitizer/blob/main/SECURITY.md
|
|
905
880
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
906
881
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
|
907
882
|
[📄license]: LICENSE.md
|
|
908
|
-
[📄license-ref]:
|
|
883
|
+
[📄license-ref]: MIT.md
|
|
909
884
|
[📄license-img]: https://img.shields.io/badge/License-MIT-259D6C.svg
|
|
910
|
-
[📄license-compat]: https://
|
|
911
|
-
[📄license-compat-img]: https://img.shields.io/badge/Apache_Compatible:_Category_A
|
|
885
|
+
[📄license-compat]: https://www.apache.org/legal/resolved.html#category-a
|
|
886
|
+
[📄license-compat-img]: https://img.shields.io/badge/Apache_Compatible:_Category_A-✓-259D6C.svg?style=flat&logo=Apache
|
|
887
|
+
|
|
912
888
|
[📄ilo-declaration]: https://www.ilo.org/declaration/lang--en/index.htm
|
|
913
889
|
[📄ilo-declaration-img]: https://img.shields.io/badge/ILO_Fundamental_Principles-✓-259D6C.svg?style=flat
|
|
914
890
|
[🚎yard-current]: http://rubydoc.info/gems/auth-sanitizer
|
data/RUBOCOP.md
CHANGED
|
File without changes
|
data/SECURITY.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Version | Supported |
|
|
6
6
|
|----------|-----------|
|
|
7
|
-
|
|
|
7
|
+
| 0.latest | ✅ |
|
|
8
8
|
|
|
9
9
|
## Security contact information
|
|
10
10
|
|
|
@@ -12,8 +12,6 @@ To report a security vulnerability, please use the
|
|
|
12
12
|
[Tidelift security contact](https://tidelift.com/security).
|
|
13
13
|
Tidelift will coordinate the fix and disclosure.
|
|
14
14
|
|
|
15
|
-
More detailed explanation of the process is in [IRP.md][IRP]
|
|
16
|
-
|
|
17
15
|
## Additional Support
|
|
18
16
|
|
|
19
17
|
If you are interested in support for versions older than the latest release,
|
|
@@ -21,4 +19,3 @@ please consider sponsoring the project / maintainer @ https://liberapay.com/pbol
|
|
|
21
19
|
or find other sponsorship links in the [README].
|
|
22
20
|
|
|
23
21
|
[README]: README.md
|
|
24
|
-
[IRP]: IRP.md
|
data/certs/pboling.pem
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
|
2
|
+
MIIEgDCCAuigAwIBAgIBATANBgkqhkiG9w0BAQsFADBDMRUwEwYDVQQDDAxwZXRl
|
|
3
|
+
ci5ib2xpbmcxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkW
|
|
4
|
+
A2NvbTAeFw0yNTA1MDQxNTMzMDlaFw00NTA0MjkxNTMzMDlaMEMxFTATBgNVBAMM
|
|
5
|
+
DHBldGVyLmJvbGluZzEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPy
|
|
6
|
+
LGQBGRYDY29tMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAruUoo0WA
|
|
7
|
+
uoNuq6puKWYeRYiZekz/nsDeK5x/0IEirzcCEvaHr3Bmz7rjo1I6On3gGKmiZs61
|
|
8
|
+
LRmQ3oxy77ydmkGTXBjruJB+pQEn7UfLSgQ0xa1/X3kdBZt6RmabFlBxnHkoaGY5
|
|
9
|
+
mZuZ5+Z7walmv6sFD9ajhzj+oIgwWfnEHkXYTR8I6VLN7MRRKGMPoZ/yvOmxb2DN
|
|
10
|
+
coEEHWKO9CvgYpW7asIihl/9GMpKiRkcYPm9dGQzZc6uTwom1COfW0+ZOFrDVBuV
|
|
11
|
+
FMQRPswZcY4Wlq0uEBLPU7hxnCL9nKK6Y9IhdDcz1mY6HZ91WImNslOSI0S8hRpj
|
|
12
|
+
yGOWxQIhBT3fqCBlRIqFQBudrnD9jSNpSGsFvbEijd5ns7Z9ZMehXkXDycpGAUj1
|
|
13
|
+
to/5cuTWWw1JqUWrKJYoifnVhtE1o1DZ+LkPtWxHtz5kjDG/zR3MG0Ula0UOavlD
|
|
14
|
+
qbnbcXPBnwXtTFeZ3C+yrWpE4pGnl3yGkZj9SMTlo9qnTMiPmuWKQDatAgMBAAGj
|
|
15
|
+
fzB9MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQE8uWvNbPVNRXZ
|
|
16
|
+
HlgPbc2PCzC4bjAhBgNVHREEGjAYgRZwZXRlci5ib2xpbmdAZ21haWwuY29tMCEG
|
|
17
|
+
A1UdEgQaMBiBFnBldGVyLmJvbGluZ0BnbWFpbC5jb20wDQYJKoZIhvcNAQELBQAD
|
|
18
|
+
ggGBAJbnUwfJQFPkBgH9cL7hoBfRtmWiCvdqdjeTmi04u8zVNCUox0A4gT982DE9
|
|
19
|
+
wmuN12LpdajxZONqbXuzZvc+nb0StFwmFYZG6iDwaf4BPywm2e/Vmq0YG45vZXGR
|
|
20
|
+
L8yMDSK1cQXjmA+ZBKOHKWavxP6Vp7lWvjAhz8RFwqF9GuNIdhv9NpnCAWcMZtpm
|
|
21
|
+
GUPyIWw/Cw/2wZp74QzZj6Npx+LdXoLTF1HMSJXZ7/pkxLCsB8m4EFVdb/IrW/0k
|
|
22
|
+
kNSfjtAfBHO8nLGuqQZVH9IBD1i9K6aSs7pT6TW8itXUIlkIUI2tg5YzW6OFfPzq
|
|
23
|
+
QekSkX3lZfY+HTSp/o+YvKkqWLUV7PQ7xh1ZYDtocpaHwgxe/j3bBqHE+CUPH2vA
|
|
24
|
+
0V/FwdTRWcwsjVoOJTrYcff8pBZ8r2MvtAc54xfnnhGFzeRHfcltobgFxkAXdE6p
|
|
25
|
+
DVjBtqT23eugOqQ73umLcYDZkc36vnqGxUBSsXrzY9pzV5gGr2I8YUxMqf6ATrZt
|
|
26
|
+
L9nRqA==
|
|
27
|
+
-----END CERTIFICATE-----
|
data/lib/auth/sanitizer/core.rb
CHANGED
|
File without changes
|
|
@@ -34,10 +34,10 @@ module Auth
|
|
|
34
34
|
# the current {Auth::Sanitizer.filtered_label} value.
|
|
35
35
|
module InitializerMethods
|
|
36
36
|
def initialize(*args, &block)
|
|
37
|
-
super
|
|
37
|
+
super
|
|
38
38
|
@thing_filter = ThingFilter.new(
|
|
39
39
|
self.class.filtered_attribute_names,
|
|
40
|
-
label: Auth::Sanitizer.filtered_label
|
|
40
|
+
label: Auth::Sanitizer.filtered_label
|
|
41
41
|
)
|
|
42
42
|
end
|
|
43
43
|
end
|
|
@@ -219,7 +219,7 @@ module Auth
|
|
|
219
219
|
# @param [String] message Logger message
|
|
220
220
|
# @return [String] Sanitized logger message
|
|
221
221
|
def sanitize_authorization_header(message)
|
|
222
|
-
message.gsub(/(Authorization:\s*)(
|
|
222
|
+
message.gsub(/(Authorization:\s*)(?:"[^"]*"|[^\r\n]+)/i, "\\1\"#{thing_filter.label}\"")
|
|
223
223
|
end
|
|
224
224
|
|
|
225
225
|
# Redact JSON-style values for configured sensitive key names.
|
|
@@ -227,7 +227,7 @@ module Auth
|
|
|
227
227
|
# @param [String] message Logger message
|
|
228
228
|
# @return [String] Sanitized logger message
|
|
229
229
|
def sanitize_json_pairs(message)
|
|
230
|
-
message.gsub(/([
|
|
230
|
+
message.gsub(/(["'])(#{thing_filter.pattern_source})\1(\s*:\s*)(["'])(.*?)\4/i) do
|
|
231
231
|
%(#{$1}#{$2}#{$1}#{$3}#{$4}#{thing_filter.label}#{$4})
|
|
232
232
|
end
|
|
233
233
|
end
|
|
@@ -237,7 +237,7 @@ module Auth
|
|
|
237
237
|
# @param [String] message Logger message
|
|
238
238
|
# @return [String] Sanitized logger message
|
|
239
239
|
def sanitize_form_and_query_pairs(message)
|
|
240
|
-
message.gsub(/(\b(?:#{thing_filter.pattern_source})=)([^&\s
|
|
240
|
+
message.gsub(/(\b(?:#{thing_filter.pattern_source})=)([^&\s"]+)/i, "\\1#{thing_filter.label}")
|
|
241
241
|
end
|
|
242
242
|
end
|
|
243
243
|
end
|
|
File without changes
|
data/lib/auth/sanitizer.rb
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "version_gem"
|
|
4
|
+
|
|
3
5
|
require_relative "sanitizer/version"
|
|
4
6
|
require_relative "sanitizer/thing_filter"
|
|
5
7
|
require_relative "sanitizer/core"
|
|
6
8
|
require_relative "sanitizer/filtered_attributes"
|
|
7
9
|
require_relative "sanitizer/sanitized_logger"
|
|
10
|
+
|
|
11
|
+
Auth::Sanitizer::Version.class_eval do
|
|
12
|
+
extend VersionGem::Basic
|
|
13
|
+
end
|
|
@@ -22,12 +22,38 @@ module AuthSanitizer
|
|
|
22
22
|
# @return [Module] isolated Auth::Sanitizer module
|
|
23
23
|
def load_isolated
|
|
24
24
|
namespace = Module.new
|
|
25
|
+
auth_namespace = Module.new
|
|
26
|
+
namespace.const_set(:Auth, auth_namespace)
|
|
27
|
+
|
|
25
28
|
FILES.each do |relative_path|
|
|
26
29
|
path = File.expand_path("../#{relative_path}", __dir__)
|
|
27
|
-
|
|
30
|
+
auth_namespace.module_eval(isolated_source(path), path, 1)
|
|
28
31
|
end
|
|
32
|
+
|
|
29
33
|
namespace.const_get(:Auth).const_get(:Sanitizer)
|
|
30
34
|
end
|
|
35
|
+
|
|
36
|
+
private
|
|
37
|
+
|
|
38
|
+
# Remove the public top-level Auth wrapper before evaluating a file inside
|
|
39
|
+
# the anonymous Auth namespace. This keeps the normal files unchanged while
|
|
40
|
+
# avoiding Object::Auth leakage on runtimes where Module#module_eval still
|
|
41
|
+
# resolves nested module declarations through Object.
|
|
42
|
+
def isolated_source(path)
|
|
43
|
+
lines = File.readlines(path)
|
|
44
|
+
wrapper_index = lines.index("module Auth\n")
|
|
45
|
+
return lines.join.split("Auth::Sanitizer").join("Sanitizer") unless wrapper_index
|
|
46
|
+
|
|
47
|
+
lines.delete_at(wrapper_index)
|
|
48
|
+
closing_index = lines.rindex("end\n")
|
|
49
|
+
lines.delete_at(closing_index) if closing_index
|
|
50
|
+
|
|
51
|
+
wrapper_index.upto(lines.length - 1) do |index|
|
|
52
|
+
line = lines[index]
|
|
53
|
+
lines[index] = line.start_with?(" ") ? line[2..-1] : line
|
|
54
|
+
end
|
|
55
|
+
lines.join.split("Auth::Sanitizer").join("Sanitizer")
|
|
56
|
+
end
|
|
31
57
|
end
|
|
32
58
|
end
|
|
33
59
|
end
|
data/sig/auth/sanitizer.rbs
CHANGED
|
File without changes
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: auth-sanitizer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
@@ -64,6 +64,9 @@ dependencies:
|
|
|
64
64
|
- - "~>"
|
|
65
65
|
- !ruby/object:Gem::Version
|
|
66
66
|
version: '2.0'
|
|
67
|
+
- - ">="
|
|
68
|
+
- !ruby/object:Gem::Version
|
|
69
|
+
version: 2.0.8
|
|
67
70
|
type: :development
|
|
68
71
|
prerelease: false
|
|
69
72
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -71,6 +74,9 @@ dependencies:
|
|
|
71
74
|
- - "~>"
|
|
72
75
|
- !ruby/object:Gem::Version
|
|
73
76
|
version: '2.0'
|
|
77
|
+
- - ">="
|
|
78
|
+
- !ruby/object:Gem::Version
|
|
79
|
+
version: 2.0.8
|
|
74
80
|
- !ruby/object:Gem::Dependency
|
|
75
81
|
name: bundler-audit
|
|
76
82
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -145,20 +151,40 @@ dependencies:
|
|
|
145
151
|
requirements:
|
|
146
152
|
- - "~>"
|
|
147
153
|
- !ruby/object:Gem::Version
|
|
148
|
-
version: '
|
|
154
|
+
version: '2.0'
|
|
149
155
|
- - ">="
|
|
150
156
|
- !ruby/object:Gem::Version
|
|
151
|
-
version:
|
|
157
|
+
version: 2.0.3
|
|
152
158
|
type: :development
|
|
153
159
|
prerelease: false
|
|
154
160
|
version_requirements: !ruby/object:Gem::Requirement
|
|
155
161
|
requirements:
|
|
156
162
|
- - "~>"
|
|
157
163
|
- !ruby/object:Gem::Version
|
|
158
|
-
version: '
|
|
164
|
+
version: '2.0'
|
|
159
165
|
- - ">="
|
|
160
166
|
- !ruby/object:Gem::Version
|
|
161
|
-
version:
|
|
167
|
+
version: 2.0.3
|
|
168
|
+
- !ruby/object:Gem::Dependency
|
|
169
|
+
name: turbo_tests2
|
|
170
|
+
requirement: !ruby/object:Gem::Requirement
|
|
171
|
+
requirements:
|
|
172
|
+
- - "~>"
|
|
173
|
+
- !ruby/object:Gem::Version
|
|
174
|
+
version: '3.1'
|
|
175
|
+
- - ">="
|
|
176
|
+
- !ruby/object:Gem::Version
|
|
177
|
+
version: 3.1.1
|
|
178
|
+
type: :development
|
|
179
|
+
prerelease: false
|
|
180
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
181
|
+
requirements:
|
|
182
|
+
- - "~>"
|
|
183
|
+
- !ruby/object:Gem::Version
|
|
184
|
+
version: '3.1'
|
|
185
|
+
- - ">="
|
|
186
|
+
- !ruby/object:Gem::Version
|
|
187
|
+
version: 3.1.1
|
|
162
188
|
- !ruby/object:Gem::Dependency
|
|
163
189
|
name: ruby-progressbar
|
|
164
190
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -199,21 +225,21 @@ dependencies:
|
|
|
199
225
|
requirements:
|
|
200
226
|
- - "~>"
|
|
201
227
|
- !ruby/object:Gem::Version
|
|
202
|
-
version: '
|
|
228
|
+
version: '2.0'
|
|
203
229
|
- - ">="
|
|
204
230
|
- !ruby/object:Gem::Version
|
|
205
|
-
version:
|
|
231
|
+
version: 2.0.1
|
|
206
232
|
type: :development
|
|
207
233
|
prerelease: false
|
|
208
234
|
version_requirements: !ruby/object:Gem::Requirement
|
|
209
235
|
requirements:
|
|
210
236
|
- - "~>"
|
|
211
237
|
- !ruby/object:Gem::Version
|
|
212
|
-
version: '
|
|
238
|
+
version: '2.0'
|
|
213
239
|
- - ">="
|
|
214
240
|
- !ruby/object:Gem::Version
|
|
215
|
-
version:
|
|
216
|
-
description: "\
|
|
241
|
+
version: 2.0.1
|
|
242
|
+
description: "\U0001F48E Configurable KV output redaction. Sanitize/filter your secrets."
|
|
217
243
|
email:
|
|
218
244
|
- floss@galtzo.com
|
|
219
245
|
executables: []
|
|
@@ -224,8 +250,8 @@ extra_rdoc_files:
|
|
|
224
250
|
- CODE_OF_CONDUCT.md
|
|
225
251
|
- CONTRIBUTING.md
|
|
226
252
|
- FUNDING.md
|
|
253
|
+
- LICENSE.md
|
|
227
254
|
- README.md
|
|
228
|
-
- REEK
|
|
229
255
|
- RUBOCOP.md
|
|
230
256
|
- SECURITY.md
|
|
231
257
|
files:
|
|
@@ -234,10 +260,11 @@ files:
|
|
|
234
260
|
- CODE_OF_CONDUCT.md
|
|
235
261
|
- CONTRIBUTING.md
|
|
236
262
|
- FUNDING.md
|
|
263
|
+
- LICENSE.md
|
|
237
264
|
- README.md
|
|
238
|
-
- REEK
|
|
239
265
|
- RUBOCOP.md
|
|
240
266
|
- SECURITY.md
|
|
267
|
+
- certs/pboling.pem
|
|
241
268
|
- lib/auth/sanitizer.rb
|
|
242
269
|
- lib/auth/sanitizer/core.rb
|
|
243
270
|
- lib/auth/sanitizer/filtered_attributes.rb
|
|
@@ -246,15 +273,16 @@ files:
|
|
|
246
273
|
- lib/auth/sanitizer/version.rb
|
|
247
274
|
- lib/auth_sanitizer/loader.rb
|
|
248
275
|
- sig/auth/sanitizer.rbs
|
|
276
|
+
- sig/auth/sanitizer/version.rbs
|
|
249
277
|
homepage: https://github.com/ruby-oauth/auth-sanitizer
|
|
250
278
|
licenses:
|
|
251
279
|
- MIT
|
|
252
280
|
metadata:
|
|
253
|
-
homepage_uri: https://auth-sanitizer.galtzo.com
|
|
254
|
-
source_code_uri: https://github.com/ruby-oauth/auth-sanitizer/tree/v0.1.
|
|
255
|
-
changelog_uri: https://github.com/ruby-oauth/auth-sanitizer/blob/v0.1.
|
|
281
|
+
homepage_uri: https://auth-sanitizer.galtzo.com
|
|
282
|
+
source_code_uri: https://github.com/ruby-oauth/auth-sanitizer/tree/v0.1.5
|
|
283
|
+
changelog_uri: https://github.com/ruby-oauth/auth-sanitizer/blob/v0.1.5/CHANGELOG.md
|
|
256
284
|
bug_tracker_uri: https://github.com/ruby-oauth/auth-sanitizer/issues
|
|
257
|
-
documentation_uri: https://www.rubydoc.info/gems/auth-sanitizer/0.1.
|
|
285
|
+
documentation_uri: https://www.rubydoc.info/gems/auth-sanitizer/0.1.5
|
|
258
286
|
funding_uri: https://github.com/sponsors/pboling
|
|
259
287
|
wiki_uri: https://github.com/ruby-oauth/auth-sanitizer/wiki
|
|
260
288
|
news_uri: https://www.railsbling.com/tags/auth-sanitizer
|
|
@@ -262,7 +290,7 @@ metadata:
|
|
|
262
290
|
rubygems_mfa_required: 'true'
|
|
263
291
|
rdoc_options:
|
|
264
292
|
- "--title"
|
|
265
|
-
- "auth-sanitizer - \
|
|
293
|
+
- "auth-sanitizer - \U0001F48E Configurable KV output redaction"
|
|
266
294
|
- "--main"
|
|
267
295
|
- README.md
|
|
268
296
|
- "--exclude"
|
|
@@ -283,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
283
311
|
- !ruby/object:Gem::Version
|
|
284
312
|
version: '0'
|
|
285
313
|
requirements: []
|
|
286
|
-
rubygems_version: 4.0.
|
|
314
|
+
rubygems_version: 4.0.10
|
|
287
315
|
specification_version: 4
|
|
288
|
-
summary: "\
|
|
316
|
+
summary: "\U0001F48E Configurable KV output redaction"
|
|
289
317
|
test_files: []
|
metadata.gz.sig
CHANGED
|
Binary file
|