diff --git a/Gemfile b/Gemfile index e4bc8f8e8..f43395d9b 100644 --- a/Gemfile +++ b/Gemfile @@ -54,6 +54,7 @@ gem "honeycomb-beeline", "~> 1.3.0" # Monitoring and Observability gem gem "html_truncator", "~> 0.4" # Truncate an HTML string properly gem "htmlentities", "~> 4.3", ">= 4.3.4" # A module for encoding and decoding (X)HTML entities gem "httparty", "~> 0.18" # Makes http fun! Also, makes consuming restful web services dead easy +gem "hypershield", "~> 0.1" # Shields sensitive production data when viewed by admins gem "inline_svg", "~> 1.7" # Embed SVG documents in your Rails views and style them with CSS gem "jbuilder", "~> 2.10" # Create JSON structures via a Builder-style DSL gem "jquery-rails", "~> 4.3" # A gem to automate using jQuery with Rails diff --git a/Gemfile.lock b/Gemfile.lock index 3d27ad336..0f2501476 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -417,6 +417,8 @@ GEM mime-types (~> 3.0) multi_xml (>= 0.5.2) httpclient (2.8.3) + hypershield (0.1.1) + activerecord (>= 5) i18n (1.8.2) concurrent-ruby (~> 1.0) ice_nine (0.11.2) @@ -921,6 +923,7 @@ DEPENDENCIES html_truncator (~> 0.4) htmlentities (~> 4.3, >= 4.3.4) httparty (~> 0.18) + hypershield (~> 0.1) inline_svg (~> 1.7) jbuilder (~> 2.10) jquery-rails (~> 4.3) diff --git a/config/initializers/hypershield.rb b/config/initializers/hypershield.rb new file mode 100644 index 000000000..fb0c0eda3 --- /dev/null +++ b/config/initializers/hypershield.rb @@ -0,0 +1,18 @@ +Hypershield.schemas = { + hypershield: { + hide: %w[ + auth_data_dump + email + encrypted + encrypted_password + message + message_html + message_markdown + password + previous_refresh_token + refresh_token + secret + token + ] + } +}