logstop 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/LICENSE.txt +1 -1
- data/README.md +3 -3
- data/lib/logstop.rb +4 -4
- data/lib/logstop/version.rb +1 -1
- metadata +9 -93
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06f0dd3d6fdaab9b3b43855f0cfca8d282be00b92b7ca0cce0fca78563e15942
|
4
|
+
data.tar.gz: f6c531bedfc8fff417f150c81ea3c16b0fffcfa2d11a322113f4e46f34061c28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf0546107ba926046989f0962817ddfcd9f5f1b43ed569bdd50982702388a4c4f76ef41bcb74515973a7b4346e11c49c7727a5468c8bf1baabdadbf259284c5c
|
7
|
+
data.tar.gz: ff895c82dd97a3c7977fd30ed360185c05e78cf0db601c548cf39733b37a8367a1934870d2144acf40829896da38bc46a747fc9c1957ff3b635be3a5975d8d43
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -15,7 +15,7 @@ By default, scrubs:
|
|
15
15
|
- Social Security numbers (SSNs)
|
16
16
|
- passwords in URLs
|
17
17
|
|
18
|
-
Works with all types of logging - Ruby,
|
18
|
+
Works with all types of logging - Ruby, Active Record, Active Job, and more
|
19
19
|
|
20
20
|
```
|
21
21
|
User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? [["email", "[FILTERED]"]]
|
@@ -23,7 +23,7 @@ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? [["e
|
|
23
23
|
|
24
24
|
Works even when sensitive data is URL-encoded
|
25
25
|
|
26
|
-
[![Build Status](https://
|
26
|
+
[![Build Status](https://github.com/ankane/logstop/workflows/build/badge.svg?branch=master)](https://github.com/ankane/logstop/actions)
|
27
27
|
|
28
28
|
## Installation
|
29
29
|
|
@@ -75,7 +75,7 @@ It supports the same options as `guard`.
|
|
75
75
|
|
76
76
|
## Notes
|
77
77
|
|
78
|
-
This should be used in addition to `config.
|
78
|
+
This should be used in addition to `config.filter_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
|
|
data/lib/logstop.rb
CHANGED
@@ -4,15 +4,15 @@ require "logstop/version"
|
|
4
4
|
|
5
5
|
module Logstop
|
6
6
|
FILTERED_STR = "[FILTERED]".freeze
|
7
|
-
FILTERED_URL_STR = "\\1[FILTERED]
|
7
|
+
FILTERED_URL_STR = "\\1[FILTERED]\\2".freeze
|
8
8
|
|
9
9
|
CREDIT_CARD_REGEX = /\b[3456]\d{15}\b/
|
10
10
|
CREDIT_CARD_REGEX_DELIMITERS = /\b[3456]\d{3}[\s+-]\d{4}[\s+-]\d{4}[\s+-]\d{4}\b/
|
11
|
-
EMAIL_REGEX = /\b[\w][\w+.-]+(
|
11
|
+
EMAIL_REGEX = /\b[\w]([\w+.-]|%2B)+(?:@|%40)[a-z\d-]+(?:\.[a-z\d-]+)*\.[a-z]+\b/i
|
12
12
|
IP_REGEX = /\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/
|
13
|
-
PHONE_REGEX = /\b(
|
13
|
+
PHONE_REGEX = /\b(?:\+\d{1,2}\s)?\(?\d{3}\)?[\s+.-]\d{3}[\s+.-]\d{4}\b/
|
14
14
|
SSN_REGEX = /\b\d{3}[\s+-]\d{2}[\s+-]\d{4}\b/
|
15
|
-
URL_PASSWORD_REGEX = /((
|
15
|
+
URL_PASSWORD_REGEX = /((?:\/\/|%2F%2F)\S+(?::|%3A))\S+(@|%40)/
|
16
16
|
|
17
17
|
def self.scrub(msg, ip: false, scrubber: nil)
|
18
18
|
msg = msg.to_s.dup
|
data/lib/logstop/version.rb
CHANGED
metadata
CHANGED
@@ -1,101 +1,17 @@
|
|
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.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
|
14
|
-
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: benchmark-ips
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: bundler
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: memory_profiler
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: minitest
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rake
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
description:
|
98
|
-
email: andrew@chartkick.com
|
11
|
+
date: 2021-02-08 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description:
|
14
|
+
email: andrew@ankane.org
|
99
15
|
executables: []
|
100
16
|
extensions: []
|
101
17
|
extra_rdoc_files: []
|
@@ -111,7 +27,7 @@ homepage: https://github.com/ankane/logstop
|
|
111
27
|
licenses:
|
112
28
|
- MIT
|
113
29
|
metadata: {}
|
114
|
-
post_install_message:
|
30
|
+
post_install_message:
|
115
31
|
rdoc_options: []
|
116
32
|
require_paths:
|
117
33
|
- lib
|
@@ -126,8 +42,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
42
|
- !ruby/object:Gem::Version
|
127
43
|
version: '0'
|
128
44
|
requirements: []
|
129
|
-
rubygems_version: 3.
|
130
|
-
signing_key:
|
45
|
+
rubygems_version: 3.2.3
|
46
|
+
signing_key:
|
131
47
|
specification_version: 4
|
132
48
|
summary: Keep personally identifiable information (PII) out of your logs
|
133
49
|
test_files: []
|