shield-checkSecurity (via Regex)

Add regular expressions (REGEX) to BetterBugs.io for it to automatically redact/remove sensitive data from your bug reports.

Redact data with regex patterns

The "Redact Data with Regex" function lets you add custom regex patterns to devtools data captured in bug reports, allowing you to hide or redact sensitive information from bug reports before it gets uploaded.

Read All About Redact with Regex

Steps to Add Custom Regex Patterns

Adding custom regex patterns is super easy. Here’s how to do it:

1

Go to Workspace Settings > Security (Regex)

Click on BetterBugs Workspace name at the top left side. Now, click the gear icon to open Workspace Settings > Security (Regex)

2

Click "Add New Pattern"

Click "Add New Pattern" button to start adding your perferred Regex patterns.

3

Enter Regex name and Regex Pattern

Enter the desired “Regex Name” and its “Regex Pattern”.

4

Save

Hit "Add Pattern" button to save it.

You're good to go.

Default Regex Patterns that Come with BetterBugs.io

By default, BetterBugs.io comes bundled with 10 pre-added regex patterns that you might commonly use. This helps you get started with using the redaction feature right off the bat.

Saved Patterns

List of data points redacted by default (pre-added by BetterBugs.io):

Password

Regex

/(?<=["`']?(?:password|passwd|pwd)["`']?\s*[:=]\s*["`'])([^"`']+)(?=["`'])/gi

This regex looks for the keywords password, passwd, or pwd, optionally enclosed in quotes (", ', or `), followed by an assignment operator (= or :), and captures the text representing the password inside quotes.

API Key

Regex

This regex matches API keys or similar tokens assigned to terms like api_key, access_token, or client_secret. The key must be alphanumeric, optionally include _, -, or ., and be 16–64 characters long.

Credit Card

Regex

Matches valid credit card numbers from providers like Visa, Mastercard, Amex, Discover, etc., while excluding invalid numbers (e.g., 0000000000000000). It recognizes formats with spaces or dashes.

CVV

Regex

Identifies 3–4 digit CVV codes assigned to terms like cvv, cvc, or cid, ensuring the code isn’t 000 or 999.

Email

Regex

Matches standard email addresses, allowing for +, %, or dots in local parts of the address.

Authorization Header

Regex

Captures Bearer tokens from Authorization headers. These tokens must follow the JSON Web Token (JWT) structure with three dot-separated Base64-encoded segments.

JWT Token

Regex

Matches JSON Web Tokens (JWT), which have three segments separated by dots. Each segment is Base64-encoded.

Client ID

Regex

Extracts client_id values that are 32+ alphanumeric characters long, assigned to terms like client_id or clientId.

IPv6

Regex

Matches valid IPv6 addresses, which are represented in hexadecimal and separated by colons.

IPv4

Regex

Matches valid IPv4 addresses, ensuring they are not browser version strings (e.g., Chrome/98.0.0.0).

Last updated