logstop 0.2.5 → 0.2.6
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 +11 -7
- data/LICENSE.txt +1 -1
- data/README.md +2 -2
- data/lib/logstop.rb +9 -10
- data/lib/logstop/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93f5e4b3e017604cc89a5f5cbf9760c58fc620f07a212771604a1f7e87782457
|
4
|
+
data.tar.gz: 6f5e11712af3bf0fc6f8b38f2783ec9f9df2fb4efe415c726f8e64433ceacfc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc638ced43a86d26b3f777cd3e52d8cc22d42b1ed390c691751db88871aa618dba5df657909b328e6fbecbfcf0a424623d7ee544ec56879abeb93db4f8615f38
|
7
|
+
data.tar.gz: 9b32e7b7fce161e2b39c4c62f79f8a2efcb1bf4eab0d917df5e2a804e6419c2681ff21c22ca8d6819c1c83dbcfa5f0db17baa98a41506eb6436bd42a99963a2e
|
data/CHANGELOG.md
CHANGED
@@ -1,31 +1,35 @@
|
|
1
|
-
## 0.2.
|
1
|
+
## 0.2.6 (2020-04-10)
|
2
|
+
|
3
|
+
- Reduced allocations
|
4
|
+
|
5
|
+
## 0.2.5 (2019-10-27)
|
2
6
|
|
3
7
|
- Fixed filtering UUIDs
|
4
8
|
|
5
|
-
## 0.2.4
|
9
|
+
## 0.2.4 (2018-12-11)
|
6
10
|
|
7
11
|
- Added `scubber` option for custom rules
|
8
12
|
- Scrub URL-encoded data
|
9
13
|
|
10
|
-
## 0.2.3
|
14
|
+
## 0.2.3 (2018-05-16)
|
11
15
|
|
12
16
|
- Fixed tagged logging
|
13
17
|
|
14
|
-
## 0.2.2
|
18
|
+
## 0.2.2 (2018-05-15)
|
15
19
|
|
16
20
|
- Added `guard` method
|
17
21
|
|
18
|
-
## 0.2.1
|
22
|
+
## 0.2.1 (2018-05-15)
|
19
23
|
|
20
24
|
- Fix for log broadcaster in Rails console
|
21
25
|
- Fix for URL password filtering
|
22
26
|
|
23
|
-
## 0.2.0
|
27
|
+
## 0.2.0 (2018-04-03)
|
24
28
|
|
25
29
|
- Less aggressive filtering on numbers
|
26
30
|
- Filter passwords in URLs
|
27
31
|
- Added `Logstop.scrub` method
|
28
32
|
|
29
|
-
## 0.1.0
|
33
|
+
## 0.1.0 (2018-03-31)
|
30
34
|
|
31
35
|
- First release
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -102,11 +102,11 @@ Everyone is encouraged to help improve this project. Here are a few ways you can
|
|
102
102
|
- Write, clarify, or fix documentation
|
103
103
|
- Suggest or add new features
|
104
104
|
|
105
|
-
To get started with development
|
105
|
+
To get started with development:
|
106
106
|
|
107
107
|
```sh
|
108
108
|
git clone https://github.com/ankane/logstop.git
|
109
109
|
cd logstop
|
110
110
|
bundle install
|
111
|
-
rake test
|
111
|
+
bundle exec rake test
|
112
112
|
```
|
data/lib/logstop.rb
CHANGED
@@ -15,18 +15,17 @@ module Logstop
|
|
15
15
|
URL_PASSWORD_REGEX = /((\/\/|%2F%2F)\S+(:|%3A))\S+(@|%40)/
|
16
16
|
|
17
17
|
def self.scrub(msg, ip: false, scrubber: nil)
|
18
|
-
msg = msg.to_s
|
18
|
+
msg = msg.to_s.dup
|
19
19
|
|
20
20
|
# order filters are applied is important
|
21
|
-
msg
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
msg = msg.gsub(IP_REGEX, FILTERED_STR) if ip
|
21
|
+
msg.gsub!(URL_PASSWORD_REGEX, FILTERED_URL_STR)
|
22
|
+
msg.gsub!(EMAIL_REGEX, FILTERED_STR)
|
23
|
+
msg.gsub!(CREDIT_CARD_REGEX, FILTERED_STR)
|
24
|
+
msg.gsub!(CREDIT_CARD_REGEX_DELIMITERS, FILTERED_STR)
|
25
|
+
msg.gsub!(PHONE_REGEX, FILTERED_STR)
|
26
|
+
msg.gsub!(SSN_REGEX, FILTERED_STR)
|
27
|
+
|
28
|
+
msg.gsub!(IP_REGEX, FILTERED_STR) if ip
|
30
29
|
|
31
30
|
msg = scrubber.call(msg) if scrubber
|
32
31
|
|
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.6
|
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: 2020-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: '0'
|
128
128
|
requirements: []
|
129
|
-
rubygems_version: 3.
|
129
|
+
rubygems_version: 3.1.2
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: Keep personally identifiable information (PII) out of your logs
|