logstop 0.2.4 → 0.2.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
- data/CHANGELOG.md +5 -1
- data/LICENSE.txt +1 -1
- data/README.md +6 -4
- data/lib/logstop.rb +3 -1
- data/lib/logstop/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 507f5f0dacbcc84697ddf439ae337831de41afd79b759313016efbdd4a771eaf
|
4
|
+
data.tar.gz: 0d4e4d5410380c126a26bd58a7631ee31338d2ea1079ee16585b88310e5e4642
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9765f5a87b415c9033fca438bd38fb968f9f5584fc50811dd65da5f8336a5e573e961c8b48bf432dc0d5a482ec04b94c9d13ec3ef0f09509892696b7a6c36780
|
7
|
+
data.tar.gz: d160bbd129b8be46222fc6a52ff656628571e12fed0c54a431924a36461d406a3943234d84a4f2a2026830c9a1f64c2fbc508eb380e0481659acc35e8292cf22
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -55,7 +55,7 @@ To scrub IP addresses, use:
|
|
55
55
|
Logstop.guard(logger, ip: true)
|
56
56
|
```
|
57
57
|
|
58
|
-
Add custom rules with:
|
58
|
+
Add custom rules with:
|
59
59
|
|
60
60
|
```ruby
|
61
61
|
scrubber = lambda do |msg|
|
@@ -77,11 +77,13 @@ It supports the same options as `guard`.
|
|
77
77
|
|
78
78
|
This should be used in addition to `config.filtered_parameters`, not as a replacement.
|
79
79
|
|
80
|
-
|
80
|
+
Learn more about [securing sensitive data in Rails](https://ankane.org/sensitive-data-rails).
|
81
81
|
|
82
|
-
|
82
|
+
Also:
|
83
83
|
|
84
|
-
|
84
|
+
- To scrub existing log files, check out [scrubadub](https://github.com/datascopeanalytics/scrubadub)
|
85
|
+
- To anonymize IP addresses, check out [IP Anonymizer](https://github.com/ankane/ip_anonymizer)
|
86
|
+
- To scan for unencrypted personal data in your database, check out [pdscan](https://github.com/ankane/pdscan)
|
85
87
|
|
86
88
|
## Resources
|
87
89
|
|
data/lib/logstop.rb
CHANGED
@@ -6,7 +6,8 @@ module Logstop
|
|
6
6
|
FILTERED_STR = "[FILTERED]".freeze
|
7
7
|
FILTERED_URL_STR = "\\1[FILTERED]@".freeze
|
8
8
|
|
9
|
-
CREDIT_CARD_REGEX = /\b
|
9
|
+
CREDIT_CARD_REGEX = /\b[3456]\d{15}\b/
|
10
|
+
CREDIT_CARD_REGEX_DELIMITERS = /\b[3456]\d{3}[\s+-]\d{4}[\s+-]\d{4}[\s+-]\d{4}\b/
|
10
11
|
EMAIL_REGEX = /\b[\w][\w+.-]+(@|%40)[a-z\d-]+(\.[a-z\d-]+)*\.[a-z]+\b/i
|
11
12
|
IP_REGEX = /\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/
|
12
13
|
PHONE_REGEX = /\b(\+\d{1,2}\s)?\(?\d{3}\)?[\s+.-]\d{3}[\s+.-]\d{4}\b/
|
@@ -21,6 +22,7 @@ module Logstop
|
|
21
22
|
.gsub(URL_PASSWORD_REGEX, FILTERED_URL_STR)
|
22
23
|
.gsub(EMAIL_REGEX, FILTERED_STR)
|
23
24
|
.gsub(CREDIT_CARD_REGEX, FILTERED_STR)
|
25
|
+
.gsub(CREDIT_CARD_REGEX_DELIMITERS, FILTERED_STR)
|
24
26
|
.gsub(PHONE_REGEX, FILTERED_STR)
|
25
27
|
.gsub(SSN_REGEX, FILTERED_STR)
|
26
28
|
|
data/lib/logstop/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -126,8 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: '0'
|
128
128
|
requirements: []
|
129
|
-
|
130
|
-
rubygems_version: 2.7.6
|
129
|
+
rubygems_version: 3.0.3
|
131
130
|
signing_key:
|
132
131
|
specification_version: 4
|
133
132
|
summary: Keep personally identifiable information (PII) out of your logs
|