New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fluent-plugin-email-obfuscate

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluent-plugin-email-obfuscate

  • 0.0.6
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

fluent-plugin-email-obfuscate

Fluentd filter plugin obfuscate email addresses.

CodeFactor Gem Version Travis CI

This filter attempts to parse each field in the record, and will obfuscate all or part of any email addresses it finds, by replacing with the same number of asterisks.

For example:

Record Input:
{
  "f1": "myEmail@example.net",
  "list1": [
    "user1@example.com",
    "user2@example.org"
  ],
  "a": {
    "nested": {
      "field": "name3@example.museum"
    }
  },
  "email_string": "Jane Doe <jane@example.name>, John Smith <john@example.name>"
}
Record Output:
 {
  "f1": "myEmail@*******.***",
  "list1": [
    "user1@*******.***",
    "user2@*******.***"
  ],
  "a": {
    "nested": {
      "field": "name3@*******.******"
    }
  },
  "email_string": "jane@*******.****, john@*******.****"
}

Installation

RubyGems

$ gem install fluent-plugin-email-obfuscate

Bundler

Add following line to your Gemfile:

gem "fluent-plugin-email-obfuscate"

And then execute:

$ bundle

Configuration

Use email_obfuscate filter.

    <filter **>
        @type email_obfuscate
        mode <mode>
        suffix_whitelist <list>
    </filter>

mode (default: partial_name)

modeActionExample
domain_onlyOnly replace all characters in the domain parttestuser@*******.***
partial_nameReplace all characters in domain and partially in the nametestu***@*******.***
name_substringReplace all characters in name and maintain surrounding contextMy old email address ********@example.com does not work any more
fullReplace all characters in name and domain part of address********@*******.***

Note: . and @ are never replaced

suffix_whitelist (optional)

A list of suffixes not to obfuscate. For example, with config suffix_whitelist [".example.com", "@example.com"] the result would be:

InputAction
user@example.comno change
user@subdomain.example.comno change
user@example.museumobfuscated

Todo

  • Support configuration of which fields to act upon
  • Fine grained configuration of email delimiters
  • . . .
  • Copyright(c) 2018-2019 JamesJJ
  • License
    • Apache License, Version 2.0

FAQs

Package last updated on 11 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc