logstop 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +2 -2
- data/lib/logstop/version.rb +1 -1
- data/lib/logstop.rb +4 -4
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f363aee61c422ebd3952f9d57b56a9e90d466318e2d7a03d70fc4a515a58898a
|
4
|
+
data.tar.gz: 718cf3b34fee57865ca4e64a519598ab6de6fd9c69cf6a98c2c3e34a52a282b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1da38782b7f46a4a5227541ff6fdc64a686ea86d6b7e823c0554e91b840522f9880ec62721c6560a04d3437f5af9a222bfc1ddb14469f0e638c5f7de0365806e
|
7
|
+
data.tar.gz: db6efb3a306d26470a9d07f1f474a892274e597fc7869ff4747b949c00396815dd5dc142b801fb52ba3a538bbc8159c2883140729e66a4f0e8a826fd936b24e3
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -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 with plus encoding
|
25
25
|
|
26
|
-
[![Build Status](https://github.com/ankane/logstop/workflows/build/badge.svg
|
26
|
+
[![Build Status](https://github.com/ankane/logstop/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/logstop/actions)
|
27
27
|
|
28
28
|
## Installation
|
29
29
|
|
@@ -55,7 +55,7 @@ To scrub IP addresses (IPv4), use:
|
|
55
55
|
Logstop.guard(logger, ip: true)
|
56
56
|
```
|
57
57
|
|
58
|
-
To scrub MAC addresses, use:
|
58
|
+
To scrub MAC addresses, use:
|
59
59
|
|
60
60
|
```ruby
|
61
61
|
Logstop.guard(logger, mac: true)
|
data/lib/logstop/version.rb
CHANGED
data/lib/logstop.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
require_relative "logstop/formatter"
|
2
|
+
require_relative "logstop/railtie" if defined?(Rails)
|
3
|
+
require_relative "logstop/version"
|
4
4
|
|
5
5
|
module Logstop
|
6
6
|
FILTERED_STR = "[FILTERED]".freeze
|
@@ -13,7 +13,7 @@ module Logstop
|
|
13
13
|
PHONE_REGEX = /\b(?:\+\d{1,2}\s)?\(?\d{3}\)?[\s+.-]\d{3}[\s+.-]\d{4}\b/
|
14
14
|
E164_PHONE_REGEX = /(?:\+|%2B)[1-9]\d{6,14}\b/
|
15
15
|
SSN_REGEX = /\b\d{3}[\s+-]\d{2}[\s+-]\d{4}\b/
|
16
|
-
URL_PASSWORD_REGEX = /((?:\/\/|%2F%2F)
|
16
|
+
URL_PASSWORD_REGEX = /((?:\/\/|%2F%2F)[^\s\/]+(?::|%3A))[^\s\/]+(@|%40)/
|
17
17
|
MAC_REGEX = /\b[0-9a-f]{2}(?:(?::|%3A)[0-9a-f]{2}){5}\b/i
|
18
18
|
|
19
19
|
def self.scrub(msg, url_password: true, email: true, credit_card: true, phone: true, ssn: true, ip: false, mac: false, scrubber: nil)
|
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.
|
4
|
+
version: 0.4.0
|
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: 2024-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: andrew@ankane.org
|
@@ -35,14 +35,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
35
35
|
requirements:
|
36
36
|
- - ">="
|
37
37
|
- !ruby/object:Gem::Version
|
38
|
-
version: '
|
38
|
+
version: '3.1'
|
39
39
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '0'
|
44
44
|
requirements: []
|
45
|
-
rubygems_version: 3.
|
45
|
+
rubygems_version: 3.5.16
|
46
46
|
signing_key:
|
47
47
|
specification_version: 4
|
48
48
|
summary: Keep personal data out of your logs
|