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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ac4acd49c15d9cc5eaaf632ab3550c3b5e148e4b4fd07c5a40375ba39ca86ff
4
- data.tar.gz: 9e3427aeb3921f9be61fbfb1d9e27f949ff1b9c9d4d023e01696397a34aeb06c
3
+ metadata.gz: 507f5f0dacbcc84697ddf439ae337831de41afd79b759313016efbdd4a771eaf
4
+ data.tar.gz: 0d4e4d5410380c126a26bd58a7631ee31338d2ea1079ee16585b88310e5e4642
5
5
  SHA512:
6
- metadata.gz: 5b9c8532cec3764daaaf4fb159db1df4c33961510984336e33f93fc3817fedd02f9082e384857e0c61b29b0f025679eee52b1d2911bca3f0b4e13f2322ffef48
7
- data.tar.gz: e6e84e9b97efba86d7b2f879522bae3289662e4fe637337b04b95d36d420e69735147185a64c6bfd305fd3368c758148fa0cdc87a06b50f613cbb8f2902f05d1
6
+ metadata.gz: 9765f5a87b415c9033fca438bd38fb968f9f5584fc50811dd65da5f8336a5e573e961c8b48bf432dc0d5a482ec04b94c9d13ec3ef0f09509892696b7a6c36780
7
+ data.tar.gz: d160bbd129b8be46222fc6a52ff656628571e12fed0c54a431924a36461d406a3943234d84a4f2a2026830c9a1f64c2fbc508eb380e0481659acc35e8292cf22
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- ## 0.2.4 [unreleased]
1
+ ## 0.2.5
2
+
3
+ - Fixed filtering UUIDs
4
+
5
+ ## 0.2.4
2
6
 
3
7
  - Added `scubber` option for custom rules
4
8
  - Scrub URL-encoded data
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2018 Andrew Kane
3
+ Copyright (c) 2018-2019 Andrew Kane
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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: [master]
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
- To scrub existing log files, check out [scrubadub](https://github.com/datascopeanalytics/scrubadub).
80
+ Learn more about [securing sensitive data in Rails](https://ankane.org/sensitive-data-rails).
81
81
 
82
- To anonymize IP addresses, check out [IP Anonymizer](https://github.com/ankane/ip_anonymizer).
82
+ Also:
83
83
 
84
- Learn more about [securing sensitive data in Rails](https://ankane.org/sensitive-data-rails).
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\d{4}[\s+-]?\d{4}[\s+-]?\d{4}[\s+-]?\d{4}\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
 
@@ -1,3 +1,3 @@
1
1
  module Logstop
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
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
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: 2018-12-11 00:00:00.000000000 Z
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
- rubyforge_project:
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