sentry-sanitize 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +3 -0
- data/.travis.yml +6 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +34 -0
- data/LICENSE.txt +21 -0
- data/README.md +65 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/sentry/.DS_Store +0 -0
- data/lib/sentry/README +6 -0
- data/lib/sentry/sanitize/processor/custom_sanitize_data.rb +15 -0
- data/lib/sentry/sanitize/processor/sanitize_data.rb +136 -0
- data/lib/sentry/sanitize/processor/utf8conversion.rb +54 -0
- data/lib/sentry/sanitize/processor.rb +15 -0
- data/lib/sentry/sanitize/version.rb +5 -0
- data/lib/sentry/sanitize.rb +8 -0
- data/sentry-sanitize.gemspec +26 -0
- metadata +67 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f15481201515e0e87778ada1e44fd5851379d7ae4e8897a0b23a28892ac500ac
|
4
|
+
data.tar.gz: 0f0af15d52b8894b5ba4ec9a37f3fd8134c721dab38009a888ce32a14d1c363f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f4c5f936a5e0e4d3a08461ba2ce0db9b56668266f850f541a6a6c769238a04382ce7f9bf2e4070874b1b9bb3374c3abeba393788e216788bc67662449ec352f3
|
7
|
+
data.tar.gz: 911aa9c502d8fcef4fe2e9457ce1028148d282c3d99d514bffe8cd54c72ddf383a14cc9298a3029732e20b9566a2e6564365c389a6c5560bd1c8be55691dbd20
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at niko@tasboa.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [https://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: https://contributor-covenant.org
|
74
|
+
[version]: https://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
sentry-sanitize (0.3.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
diff-lcs (1.5.0)
|
10
|
+
rake (12.3.3)
|
11
|
+
rspec (3.11.0)
|
12
|
+
rspec-core (~> 3.11.0)
|
13
|
+
rspec-expectations (~> 3.11.0)
|
14
|
+
rspec-mocks (~> 3.11.0)
|
15
|
+
rspec-core (3.11.0)
|
16
|
+
rspec-support (~> 3.11.0)
|
17
|
+
rspec-expectations (3.11.0)
|
18
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
19
|
+
rspec-support (~> 3.11.0)
|
20
|
+
rspec-mocks (3.11.1)
|
21
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
22
|
+
rspec-support (~> 3.11.0)
|
23
|
+
rspec-support (3.11.0)
|
24
|
+
|
25
|
+
PLATFORMS
|
26
|
+
ruby
|
27
|
+
|
28
|
+
DEPENDENCIES
|
29
|
+
rake (~> 12.0)
|
30
|
+
rspec (~> 3.0)
|
31
|
+
sentry-sanitize!
|
32
|
+
|
33
|
+
BUNDLED WITH
|
34
|
+
2.1.4
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2022 Niko Roberts
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
# Sentry::Sanitize
|
2
|
+
|
3
|
+
This gem is extracting the old Raven client side sanitization helpers that existed pre-4.0 of the `sentry-ruby` gem.
|
4
|
+
|
5
|
+
https://github.com/getsentry/sentry-ruby/issues/1140
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'sentry-sanitize'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle install
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install sentry-sanitize
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
Inside your Sentry initializer you should add this:
|
26
|
+
|
27
|
+
```
|
28
|
+
Sentry.init do |config|
|
29
|
+
# your other Sentry config options go here
|
30
|
+
|
31
|
+
sanitizer = Sentry::Sanitize::Processor::CustomSanitizeData.new(Rails.application.config.filter_parameters.map(&:to_s))
|
32
|
+
|
33
|
+
config.before_send = lambda do |event, hint|
|
34
|
+
# Overrides the event level with custom level based on exception raised
|
35
|
+
event.level = ErrorReporting.level(hint[:exception], event.level)
|
36
|
+
|
37
|
+
event.to_hash.tap do |event_hash| # event needs to be a Hash for sanitizer to work
|
38
|
+
if (request = event_hash[:request]).present?
|
39
|
+
request[:cookies] = nil
|
40
|
+
sanitizer.process(request)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
|
48
|
+
## Development
|
49
|
+
|
50
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
51
|
+
|
52
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
53
|
+
|
54
|
+
## Contributing
|
55
|
+
|
56
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/airtasker/sentry-sanitize. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/airtasker/sentry-sanitize/blob/master/CODE_OF_CONDUCT.md).
|
57
|
+
|
58
|
+
|
59
|
+
## License
|
60
|
+
|
61
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
62
|
+
|
63
|
+
## Code of Conduct
|
64
|
+
|
65
|
+
Everyone interacting in the Sentry::Sanitize project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/airtasker/sentry-sanitize/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "sentry/sanitize"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
Binary file
|
data/lib/sentry/README
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
In a major version upgrade of the Sentry gem they removed out-of-the-box
|
2
|
+
support for sanitizing fields client-side.
|
3
|
+
|
4
|
+
The files contained in this directory were downloaded from the Raven gem (except for custom_sanitize_data.rb)
|
5
|
+
https://github.com/getsentry/sentry-ruby/tree/82e1ffe711af287ddc23e8517bdb8275beff94d5/sentry-raven/lib/raven/processor
|
6
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'sentry/sanitize/processor'
|
4
|
+
require 'sentry/sanitize/processor/sanitize_data'
|
5
|
+
require 'sentry/sanitize/processor/utf8conversion'
|
6
|
+
|
7
|
+
module Sentry
|
8
|
+
class Processor::CustomSanitizeData < Processor::SanitizeData
|
9
|
+
def initialize(sanitize_fields)
|
10
|
+
self.sanitize_fields = sanitize_fields
|
11
|
+
self.sanitize_credit_cards = true
|
12
|
+
self.sanitize_fields_excluded = []
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,136 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'json'
|
4
|
+
|
5
|
+
module Sentry
|
6
|
+
class Processor::SanitizeData < Processor
|
7
|
+
DEFAULT_FIELDS = %w(authorization password passwd secret ssn social(.*)?sec).freeze
|
8
|
+
CREDIT_CARD_RE = /\b(?:3[47]\d|(?:4\d|5[1-5]|65)\d{2}|6011)\d{12}\b/.freeze
|
9
|
+
QUERY_STRING = ['query_string', :query_string].freeze
|
10
|
+
JSON_STARTS_WITH = ["[", "{"].freeze
|
11
|
+
|
12
|
+
attr_accessor :sanitize_fields, :sanitize_credit_cards, :sanitize_fields_excluded
|
13
|
+
|
14
|
+
def initialize(client)
|
15
|
+
super
|
16
|
+
self.sanitize_fields = client.configuration.sanitize_fields
|
17
|
+
self.sanitize_credit_cards = client.configuration.sanitize_credit_cards
|
18
|
+
self.sanitize_fields_excluded = client.configuration.sanitize_fields_excluded
|
19
|
+
end
|
20
|
+
|
21
|
+
def process(value, key = nil)
|
22
|
+
case value
|
23
|
+
when Hash
|
24
|
+
sanitize_hash_value(key, value)
|
25
|
+
when Array
|
26
|
+
sanitize_array_value(key, value)
|
27
|
+
when Integer
|
28
|
+
matches_regexes?(key, value.to_s) ? INT_MASK : value
|
29
|
+
when String
|
30
|
+
sanitize_string_value(key, value)
|
31
|
+
else
|
32
|
+
value
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
# CGI.parse takes our nice UTF-8 strings and converts them back to ASCII,
|
39
|
+
# so we have to convert them back, again.
|
40
|
+
def utf8_processor
|
41
|
+
@utf8_processor ||= Processor::UTF8Conversion.new
|
42
|
+
end
|
43
|
+
|
44
|
+
def sanitize_hash_value(key, value)
|
45
|
+
if key =~ sensitive_fields
|
46
|
+
STRING_MASK
|
47
|
+
elsif value.frozen?
|
48
|
+
value.merge(value) { |k, v| process v, k }
|
49
|
+
else
|
50
|
+
value.merge!(value) { |k, v| process v, k }
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def sanitize_array_value(key, value)
|
55
|
+
if value.frozen?
|
56
|
+
value.map { |v| process v, key }
|
57
|
+
else
|
58
|
+
value.map! { |v| process v, key }
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def sanitize_string_value(key, value)
|
63
|
+
if value =~ sensitive_fields && (json = parse_json_or_nil(value))
|
64
|
+
# if this string is actually a json obj, convert and sanitize
|
65
|
+
process(json).to_json
|
66
|
+
elsif matches_regexes?(key, value)
|
67
|
+
STRING_MASK
|
68
|
+
elsif QUERY_STRING.include?(key)
|
69
|
+
sanitize_query_string(value)
|
70
|
+
elsif value =~ sensitive_fields
|
71
|
+
sanitize_sensitive_string_content(value)
|
72
|
+
else
|
73
|
+
value
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def sanitize_query_string(query_string)
|
78
|
+
query_hash = CGI.parse(query_string)
|
79
|
+
sanitized = utf8_processor.process(query_hash)
|
80
|
+
processed_query_hash = process(sanitized)
|
81
|
+
URI.encode_www_form(processed_query_hash)
|
82
|
+
end
|
83
|
+
|
84
|
+
# this scrubs some sensitive info from the string content. for example:
|
85
|
+
#
|
86
|
+
# ```
|
87
|
+
# unexpected token at '{
|
88
|
+
# "role": "admin","password": "Abc@123","foo": "bar"
|
89
|
+
# }'
|
90
|
+
# ```
|
91
|
+
#
|
92
|
+
# will become
|
93
|
+
#
|
94
|
+
# ```
|
95
|
+
# unexpected token at '{
|
96
|
+
# "role": "admin","password": *******,"foo": "bar"
|
97
|
+
# }'
|
98
|
+
# ```
|
99
|
+
#
|
100
|
+
# it's particularly useful in hash or param-parsing related errors
|
101
|
+
def sanitize_sensitive_string_content(value)
|
102
|
+
value.gsub(/(#{sensitive_fields}['":]\s?(:|=>)?\s?)(".*?"|'.*?')/, '\1' + STRING_MASK)
|
103
|
+
end
|
104
|
+
|
105
|
+
def matches_regexes?(k, v)
|
106
|
+
(sanitize_credit_cards && v =~ CREDIT_CARD_RE) ||
|
107
|
+
k =~ sensitive_fields
|
108
|
+
end
|
109
|
+
|
110
|
+
def sensitive_fields
|
111
|
+
return @sensitive_fields if instance_variable_defined?(:@sensitive_fields)
|
112
|
+
|
113
|
+
fields = DEFAULT_FIELDS | sanitize_fields
|
114
|
+
fields -= sanitize_fields_excluded
|
115
|
+
@sensitive_fields = /#{fields.map do |f|
|
116
|
+
use_boundary?(f) ? "\\b#{f}\\b" : f
|
117
|
+
end.join("|")}/i
|
118
|
+
end
|
119
|
+
|
120
|
+
def use_boundary?(string)
|
121
|
+
!DEFAULT_FIELDS.include?(string) && !special_characters?(string)
|
122
|
+
end
|
123
|
+
|
124
|
+
def special_characters?(string)
|
125
|
+
REGEX_SPECIAL_CHARACTERS.select { |r| string.include?(r) }.any?
|
126
|
+
end
|
127
|
+
|
128
|
+
def parse_json_or_nil(string)
|
129
|
+
return unless string.start_with?(*JSON_STARTS_WITH)
|
130
|
+
|
131
|
+
JSON.parse(string)
|
132
|
+
rescue JSON::ParserError, NoMethodError
|
133
|
+
nil
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module Sentry
|
2
|
+
class Processor::UTF8Conversion < Processor
|
3
|
+
# Slightly misnamed - actually just removes any bytes with invalid encoding
|
4
|
+
# Previously, our JSON backend required UTF-8. Since we now use the built-in
|
5
|
+
# JSON, we can use any encoding, but it must be valid anyway so we can do
|
6
|
+
# things like call #match and #slice on strings
|
7
|
+
REPLACE = "".freeze
|
8
|
+
|
9
|
+
def process(value)
|
10
|
+
case value
|
11
|
+
when Hash
|
12
|
+
!value.frozen? ? value.merge!(value) { |_, v| process v } : value.merge(value) { |_, v| process v }
|
13
|
+
when Array
|
14
|
+
!value.frozen? ? value.map! { |v| process v } : value.map { |v| process v }
|
15
|
+
when Exception
|
16
|
+
return value if value.message.valid_encoding?
|
17
|
+
|
18
|
+
clean_exc = value.class.new(remove_invalid_bytes(value.message))
|
19
|
+
clean_exc.set_backtrace(value.backtrace)
|
20
|
+
clean_exc
|
21
|
+
when String
|
22
|
+
# Encoding::BINARY / Encoding::ASCII_8BIT is a special binary encoding.
|
23
|
+
# valid_encoding? will always return true because it contains all codepoints,
|
24
|
+
# so instead we check if it only contains actual ASCII codepoints, and if
|
25
|
+
# not we assume it's actually just UTF8 and scrub accordingly.
|
26
|
+
if value.encoding == Encoding::BINARY && !value.ascii_only?
|
27
|
+
value = value.dup
|
28
|
+
value.force_encoding(Encoding::UTF_8)
|
29
|
+
end
|
30
|
+
return value if value.valid_encoding?
|
31
|
+
|
32
|
+
remove_invalid_bytes(value)
|
33
|
+
else
|
34
|
+
value
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
private
|
39
|
+
|
40
|
+
# Stolen from RSpec
|
41
|
+
# https://github.com/rspec/rspec-support/blob/f0af3fd74a94ff7bb700f6ba06dbdc67bba17fbf/lib/rspec/support/encoded_string.rb#L120-L139
|
42
|
+
if String.method_defined?(:scrub) # 2.1+
|
43
|
+
def remove_invalid_bytes(string)
|
44
|
+
string.scrub(REPLACE)
|
45
|
+
end
|
46
|
+
else
|
47
|
+
def remove_invalid_bytes(string)
|
48
|
+
string.chars.map do |char|
|
49
|
+
char.valid_encoding? ? char : REPLACE
|
50
|
+
end.join
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Raven
|
2
|
+
class Processor
|
3
|
+
STRING_MASK = '********'.freeze
|
4
|
+
INT_MASK = 0
|
5
|
+
REGEX_SPECIAL_CHARACTERS = %w(. $ ^ { [ ( | ) * + ?).freeze
|
6
|
+
|
7
|
+
def initialize(client = nil)
|
8
|
+
@client = client
|
9
|
+
end
|
10
|
+
|
11
|
+
def process(_data)
|
12
|
+
raise NotImplementedError
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require_relative 'lib/sentry/sanitize/version'
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = "sentry-sanitize"
|
5
|
+
spec.version = Sentry::Sanitize::VERSION
|
6
|
+
spec.authors = ["Niko Roberts"]
|
7
|
+
spec.email = ["niko@tasboa.com"]
|
8
|
+
|
9
|
+
spec.summary = "Client side sanitizer for Sentry"
|
10
|
+
spec.description = "Client side sanitizer for Sentry. Replicating the Raven sanitization from pre 4.0"
|
11
|
+
spec.license = "MIT"
|
12
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
13
|
+
|
14
|
+
spec.metadata["homepage_uri"] = "https://github.com/airtasker/sentry-sanitize/"
|
15
|
+
spec.metadata["source_code_uri"] = "https://github.com/airtasker/sentry-sanitize/"
|
16
|
+
spec.metadata["changelog_uri"] = "https://github.com/airtasker/sentry-sanitize/blob/master/CHANGELOG.md"
|
17
|
+
|
18
|
+
# Specify which files should be added to the gem when it is released.
|
19
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
20
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
21
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
22
|
+
end
|
23
|
+
spec.bindir = "exe"
|
24
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
|
+
spec.require_paths = ["lib"]
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sentry-sanitize
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Niko Roberts
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-04-11 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Client side sanitizer for Sentry. Replicating the Raven sanitization
|
14
|
+
from pre 4.0
|
15
|
+
email:
|
16
|
+
- niko@tasboa.com
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- ".gitignore"
|
22
|
+
- ".rspec"
|
23
|
+
- ".travis.yml"
|
24
|
+
- CODE_OF_CONDUCT.md
|
25
|
+
- Gemfile
|
26
|
+
- Gemfile.lock
|
27
|
+
- LICENSE.txt
|
28
|
+
- README.md
|
29
|
+
- Rakefile
|
30
|
+
- bin/console
|
31
|
+
- bin/setup
|
32
|
+
- lib/sentry/.DS_Store
|
33
|
+
- lib/sentry/README
|
34
|
+
- lib/sentry/sanitize.rb
|
35
|
+
- lib/sentry/sanitize/processor.rb
|
36
|
+
- lib/sentry/sanitize/processor/custom_sanitize_data.rb
|
37
|
+
- lib/sentry/sanitize/processor/sanitize_data.rb
|
38
|
+
- lib/sentry/sanitize/processor/utf8conversion.rb
|
39
|
+
- lib/sentry/sanitize/version.rb
|
40
|
+
- sentry-sanitize.gemspec
|
41
|
+
homepage:
|
42
|
+
licenses:
|
43
|
+
- MIT
|
44
|
+
metadata:
|
45
|
+
homepage_uri: https://github.com/airtasker/sentry-sanitize/
|
46
|
+
source_code_uri: https://github.com/airtasker/sentry-sanitize/
|
47
|
+
changelog_uri: https://github.com/airtasker/sentry-sanitize/blob/master/CHANGELOG.md
|
48
|
+
post_install_message:
|
49
|
+
rdoc_options: []
|
50
|
+
require_paths:
|
51
|
+
- lib
|
52
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 2.3.0
|
57
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
requirements: []
|
63
|
+
rubygems_version: 3.1.6
|
64
|
+
signing_key:
|
65
|
+
specification_version: 4
|
66
|
+
summary: Client side sanitizer for Sentry
|
67
|
+
test_files: []
|