verboten_keys 1.0.0 → 1.0.1
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
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +17 -17
- data/README.md +9 -9
- data/lib/verboten_keys/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c52ed1ed9e73caade0a8e5c853f9b3dd6c77da8638d8fd91898481e582472669
|
4
|
+
data.tar.gz: bfa901bb3430df012d1889f1f088da5405492fede5cc58cea19ae267f65ce42e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa3dd9b6736deae8bd3c02017cf8bf3c7fd30cac97363261a0f180bd0c367933c0d9cebb81131c07a8da20a9ce4173fadb12d93ba1b63529fb895170797ad698
|
7
|
+
data.tar.gz: 043f9bab13f99bfb969819be266330c0ce4e4376b65d3aaa6bf887ffe054854acf83ceefdb867200cb7e05873c1d04df2b2125d52f45e54ecddfd56e90328d3f
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.0.1 - August 28, 2021
|
4
|
+
|
5
|
+
- Update the `railties` dependency to protect against [CVE-2021-22942](https://discuss.rubyonrails.org/t/cve-2021-22942-possible-open-redirect-in-host-authorization-middleware/78722)
|
6
|
+
|
3
7
|
## 1.0.0 - May 11, 2021
|
4
8
|
|
5
9
|
- Initial release
|
data/Gemfile.lock
CHANGED
@@ -1,26 +1,26 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
verboten_keys (1.0.
|
4
|
+
verboten_keys (1.0.1)
|
5
5
|
rack (>= 1.0, < 3)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actionpack (6.1.
|
11
|
-
actionview (= 6.1.
|
12
|
-
activesupport (= 6.1.
|
10
|
+
actionpack (6.1.4.1)
|
11
|
+
actionview (= 6.1.4.1)
|
12
|
+
activesupport (= 6.1.4.1)
|
13
13
|
rack (~> 2.0, >= 2.0.9)
|
14
14
|
rack-test (>= 0.6.3)
|
15
15
|
rails-dom-testing (~> 2.0)
|
16
16
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
17
|
-
actionview (6.1.
|
18
|
-
activesupport (= 6.1.
|
17
|
+
actionview (6.1.4.1)
|
18
|
+
activesupport (= 6.1.4.1)
|
19
19
|
builder (~> 3.1)
|
20
20
|
erubi (~> 1.4)
|
21
21
|
rails-dom-testing (~> 2.0)
|
22
22
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
23
|
-
activesupport (6.1.
|
23
|
+
activesupport (6.1.4.1)
|
24
24
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
25
25
|
i18n (>= 1.6, < 2)
|
26
26
|
minitest (>= 5.1)
|
@@ -28,20 +28,20 @@ GEM
|
|
28
28
|
zeitwerk (~> 2.3)
|
29
29
|
ast (2.4.2)
|
30
30
|
builder (3.2.4)
|
31
|
-
concurrent-ruby (1.1.
|
31
|
+
concurrent-ruby (1.1.9)
|
32
32
|
crass (1.0.6)
|
33
33
|
diff-lcs (1.4.4)
|
34
34
|
erubi (1.10.0)
|
35
35
|
i18n (1.8.10)
|
36
36
|
concurrent-ruby (~> 1.0)
|
37
|
-
loofah (2.
|
37
|
+
loofah (2.12.0)
|
38
38
|
crass (~> 1.0.2)
|
39
39
|
nokogiri (>= 1.5.9)
|
40
40
|
method_source (1.0.0)
|
41
41
|
minitest (5.14.4)
|
42
|
-
nokogiri (1.
|
42
|
+
nokogiri (1.12.3-x86_64-darwin)
|
43
43
|
racc (~> 1.4)
|
44
|
-
nokogiri (1.
|
44
|
+
nokogiri (1.12.3-x86_64-linux)
|
45
45
|
racc (~> 1.4)
|
46
46
|
parallel (1.20.1)
|
47
47
|
parser (3.0.1.1)
|
@@ -53,16 +53,16 @@ GEM
|
|
53
53
|
rails-dom-testing (2.0.3)
|
54
54
|
activesupport (>= 4.2.0)
|
55
55
|
nokogiri (>= 1.6)
|
56
|
-
rails-html-sanitizer (1.
|
56
|
+
rails-html-sanitizer (1.4.2)
|
57
57
|
loofah (~> 2.3)
|
58
|
-
railties (6.1.
|
59
|
-
actionpack (= 6.1.
|
60
|
-
activesupport (= 6.1.
|
58
|
+
railties (6.1.4.1)
|
59
|
+
actionpack (= 6.1.4.1)
|
60
|
+
activesupport (= 6.1.4.1)
|
61
61
|
method_source
|
62
|
-
rake (>= 0.
|
62
|
+
rake (>= 0.13)
|
63
63
|
thor (~> 1.0)
|
64
64
|
rainbow (3.0.0)
|
65
|
-
rake (13.0.
|
65
|
+
rake (13.0.6)
|
66
66
|
regexp_parser (2.1.1)
|
67
67
|
rexml (3.2.5)
|
68
68
|
rspec (3.10.0)
|
data/README.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# Verboten Keys
|
2
2
|
|
3
|
-
Verboten Keys is a last line of defense to help prevent you and your team from accidentally leaking private information via your APIs. It's Rack middleware that seamlessly integrates into any Rails or Sinatra
|
3
|
+
Verboten Keys is a last line of defense to help prevent you and your team from accidentally leaking private information via your APIs. It's Rack middleware that seamlessly integrates into any Rails or Sinatra application (or really anything that's based on Rack) and strips out any data that matches your list of forbidden keys.
|
4
4
|
|
5
|
-
It's a quick, easy, set-it-and-forget-it way to have peace
|
5
|
+
It's a quick, easy, set-it-and-forget-it way to have the peace-of-mind that nothing's getting out of your API that shouldn't be.
|
6
6
|
|
7
7
|
## What it does
|
8
8
|
|
9
|
-
Imagine you've got an API endpoint that returns a user's profile, and you've accidentally serialized the user incorrectly
|
9
|
+
Imagine you've got an API endpoint that returns a user's profile, and you've accidentally serialized the user incorrectly and it's now returning your entire user object serialized as JSON:
|
10
10
|
|
11
11
|
```
|
12
12
|
GET /api/v1/users/123
|
@@ -31,14 +31,14 @@ GET /api/v1/users/123
|
|
31
31
|
}
|
32
32
|
```
|
33
33
|
|
34
|
-
Verboten Keys
|
34
|
+
Verboten Keys filtered out the leaking `password_digest` while leaving the rest of the request intact. When all else fails, we prevent you accidentally leaking sensitive data. Verboten Keys is your last line of defense.
|
35
35
|
|
36
36
|
## Installation
|
37
37
|
|
38
38
|
To install Verboten Keys in your app, simply add this line to your application's `Gemfile` and run `bundle install`:
|
39
39
|
|
40
40
|
```ruby
|
41
|
-
gem '
|
41
|
+
gem 'verboten_keys'
|
42
42
|
```
|
43
43
|
|
44
44
|
### Rails
|
@@ -51,13 +51,13 @@ If your application is using Sinatra, simply add the Verboten Keys middleware in
|
|
51
51
|
|
52
52
|
```ruby
|
53
53
|
require 'sinatra'
|
54
|
-
require '
|
54
|
+
require 'verboten_keys'
|
55
55
|
|
56
56
|
use Rack::Lint
|
57
57
|
use VerbotenKeys::Middleware
|
58
58
|
|
59
59
|
get '/hello' do
|
60
|
-
'Hello
|
60
|
+
{ greeting: 'Hello, world!' }
|
61
61
|
end
|
62
62
|
```
|
63
63
|
|
@@ -65,7 +65,7 @@ You should include it last, so nothing gets missed when the middleware parses an
|
|
65
65
|
|
66
66
|
## Configuration
|
67
67
|
|
68
|
-
Every application has its own security needs, and Verboten Keys is designed to be configurable, so you can get it just so. To configure Verboten Keys, simply call its `configure` method, which
|
68
|
+
Every application has its own security needs, and Verboten Keys is designed to be configurable, so you can get it just so. To configure Verboten Keys, simply call its `configure` method, which yields a block with the current configuration:
|
69
69
|
|
70
70
|
```ruby
|
71
71
|
VerbotenKeys.configure do |config|
|
@@ -74,7 +74,7 @@ VerbotenKeys.configure do |config|
|
|
74
74
|
end
|
75
75
|
```
|
76
76
|
|
77
|
-
The `forbidden_keys` option lets you set the keys that will be filtered out of the response. It takes an array of symbols, and will raise an error if it's not in the right format. You should include all of the columns and attributes you absolutely
|
77
|
+
The `forbidden_keys` option lets you set the keys that will be filtered out of the response. It takes an array of symbols, and will raise an error if it's not in the right format. You should include all of the columns and attributes you absolutely do not want to ever leak from your API. The default value is `[]`, which means you need to set this up otherwise Verboten Keys won't do anything.
|
78
78
|
|
79
79
|
The `strategy` option lets you pick how Verboten Keys should handle a forbidden key it finds. The default value is `:remove`. Acceptable options are `:remove` and `:nullify`:
|
80
80
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: verboten_keys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Pritchard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|