Is there a JIRA plugin for comment/description filtering for potentially sensitive data?

Rick White May 20, 2016

Occasionally our users will file a JIRA ticket or add a comment containing sensitive information, such as AWS IAM credentials, private keys, etc.  It's the classic "GitHub" problem.

I'm looking for a plugin that will:

  1. Automatically obfuscate text matching given regex patterns on incoming tickets (mostly via email)
  2. Warn the user when submitting a comment that matches any regex patterns, highlight the offending section(s), and make them hit a "Are you sure?" button

Does something like this exist?

2 answers

0 votes
Rick White June 2, 2016

Super neat!  We'll give this a shot as we build out our new project.

0 votes
Fidel Castro
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 27, 2016

Hi Rick,

I think that you can implement first behavior and a workaround for the second one using JIRA Workflow Toolbox add-on:

1) Automatically obfuscate text matching given regex patterns on incoming tickets:

You can replace each substring in description or last comment matching certain regular expression using "Copy a parsed text to a field" post-function with the following configuration:

Captura de pantalla 2016-05-27 a las 17.49.41.png

Note that:

  • %{00001} is field code for Description
  • "regexp" is a string literal containing the regular expression you want to use for detecting sensitive data. You should escape \ characters using another \ character, e.g., you should use "[A-Za-z]+\\.txt" instead of "[A-Za-z]+\.txt", or  "\\{[0-9]{5,10}\\}" instead of "\{[0-9]{5,10}\}".
  • "replacemente_value" is a string value that will replace all the matches of the regular expression.
  • Use (?s) non-capturing group in your regular expression in order to activate DOTALL mode, otherwise regular expression matchings will be found only in the first line of Description. Example: use "(?s)[A-Za-z]+\\.txt" for searching for .txt filenames in the Description of your issues, instead of "[A-Za-z]+\\.txt".

Next version of the plugin provides a new function called findModify(string, regexp, text_expression) that will allow you to apply an actual obfuscation operation, for example leaving only first and last character of original value, and replacing inner character with dots. You can try a beta version if you want to. In this case you should use the following text to be parsed:

findModify(%{00001}, "regexp", substring(^%, 0, 1) + substring(replaceAll(^%, ".", "."), 1, length(^%) - 1) + substring(^%, length(^%) - 1, length(^%)))

2) Apply a validator to transitions in order to reject comments with sensible information:

You can use "Boolean validator with math, date-time or text-string terms" with the following configuration:

Captura de pantalla 2016-05-27 a las 18.35.55.png

Boolean expression is:

!matches(%{00127}, "regexp")

Note that:

  • %{00127} is field code for "Transition's comment".
  • You should precede your regular expression with (?s) in order to activate DOTALL mode.

Suggest an answer

Log in or Sign up to answer