Configure Regular Expressions
Table of Contents
Expand all | Collapse all
-
-
- What’s Data Security?
- Navigate To Data Security in Cloud Management Console
- Activate Data Security on the Hub
- Access Data Security for Standalone SaaS Security
-
- Allowed List of IP Addresses
-
- Begin Scanning an Amazon Web Services App
- Begin Scanning a Bitbucket Cloud App
- Begin Scanning a Box App
- Begin Scanning a Cisco Webex Teams App
- Begin Scanning a Citrix ShareFile App
- Begin Scanning a Confluence App
- Begin Scanning a Confluence Data Center App
- Begin Scanning a Dropbox App
- Begin Scanning a GitHub App
- Begin Scanning a GitHub V2 App
- Begin Scanning a Gmail App
- Begin Scanning a Google Cloud Storage App
- Begin Scanning a Google Drive App
- Begin Scanning a Jira Cloud App
- Begin Scanning a Jira Data Center App
- Begin Scanning a Microsoft Azure Storage App
- Begin Scanning a Microsoft Exchange App
- Begin Scanning Microsoft Office 365 Apps
- Begin Scanning a Microsoft Teams App
- Begin Scanning a Salesforce App
- Begin Scanning a ServiceNow App
- Begin Scanning a Slack for Enterprise Grid App
- Begin Scanning a Slack Enterprise App
- Begin Scanning a Slack for Pro and Business App
- Begin Scanning a Workday App (Beta)
- Begin Scanning a Yammer App
- Begin Scanning a Zendesk App
- Begin Scanning a Zoom App
- Reauthenticate to a Cloud App
- Verify Permissions on Cloud Apps
- Start Scanning a Cloud App
- Stop Scanning a Cloud App
- Rescan a Managed Cloud App
- Delete Cloud Apps Managed by Data Security
- API Throttling
- Configure Classification Labels
-
-
-
- SaaS Security with Enterprise DLP
- Predefined Data Patterns on Data Security
- Proximity Keywords
- Confidence Levels
- Shared Data Profiles and Data Patterns
- Modify a Predefined Data Pattern
- Create a Custom Data Profile
- Add a File Property Data Pattern
- Create a Custom Data Pattern
- Use Exact Data Matching (EDM)
- Enable or Disable a Machine Learning Data Pattern
- Configure WildFire Analysis
- Configure Regular Expressions
- Enable or Disable a Data Pattern
- View and Filter Data Pattern Match Results
-
-
-
- What is an Incident?
- Assess New Incidents on Data Security
- View Asset Details
- Filter Incidents
- Security Controls Incident Details
- Track Down Threats with WildFire Report
- Track Down Threats with AutoFocus
- Customize the Incident Categories
- Close Incidents
- Download Assets for Incidents
- View Asset Snippets for Incidents
- Analyze Inherited Exposure
- Email Asset Owners
- Modify Incident Status
-
- What is a Data Violation?
- Assess New Data Violations on Data Security
- Configure Data Violation Alerts on Data Security
- Filter Data Violations on Data Security
- View Asset Snippets for Data Violations on Data Security
- View Data Violation Metrics on Data Security
- Modify Data Violation Status on Data Security
-
-
-
-
- What’s SaaS Security Inline?
- Navigate To SaaS Security Inline
- SaaS Visibility for NGFW
- SaaS Visibility and Controls for NGFW
- SaaS Visibility for Prisma Access
- SaaS Visibility and Controls for Panorama Managed Prisma Access
- SaaS Visibility and Controls for Cloud Managed Prisma Access
- Activate SaaS Security Inline for NGFW
- Activate SaaS Security Inline for VM-Series Firewalls with Software NGFW Credits
- Activate SaaS Security Inline for Prisma Access
- Connect SaaS Security Inline and Cortex Data Lake
- Integrate with Azure Active Directory
-
-
- SaaS Policy Rule Recommendations
- App-ID Cloud Engine
- Guidelines for SaaS Policy Rule Recommendations
- Predefined SaaS Policy Rule Recommendations
- Apply Predefined SaaS Policy Rule Recommendations
- Create SaaS Policy Rule Recommendations
- Delete SaaS Policy Rule Recommendations
- Enable SaaS Policy Rule Recommendations
- Modify Active SaaS Policy Rule Recommendations
- Monitor SaaS Policy Rule Recommendations
-
- Enable Automatic Updates for SaaS Policy Rule Recommendations on Cloud Managed Prisma Access
- Import New SaaS Policy Rule Recommendations on Cloud Managed Prisma Access
- Update Imported SaaS Policy Rule Recommendations on Cloud Managed Prisma Access
- Remove Deleted SaaS Policy Rule Recommendations on Cloud Managed Prisma Access
- Manage Enforcement of Rule Recommendations on NGFW
- Manage Enforcement of Rule Recommendations on Panorama Managed Prisma Access
- Change Risk Score for Discovered SaaS Apps
-
-
-
-
- Onboarding Overview for Supported SaaS Apps
- Onboard an Aha.io App to SSPM
- Onboard an Alteryx Designer Cloud App to SSPM
- Onboard an Aptible App to SSPM
- Onboard an ArcGIS App to SSPM
- Onboard an Articulate Global App to SSPM
- Onboard an Atlassian App to SSPM
- Onboard a BambooHR App to SSPM
- Onboard a Basecamp App to SSPM
- Onboard a Bitbucket App to SSPM
- Onboard a BlueJeans App to SSPM
- Onboard a Box App to SSPM
- Onboard a Bright Security App to SSPM
- Onboard a Celonis App to SSPM
- Onboard a Cisco Meraki App to SSPM
- Onboard a ClickUp App to SSPM
- Onboard a Confluence App to SSPM
- Onboard a Contentful App to SSPM
- Onboard a Convo App to SSPM
- Onboard a Couchbase App to SSPM
- Onboard a Coveo App to SSPM
- Onboard a Crowdin Enterprise App to SSPM
- Onboard a Customer.io App to SSPM
- Onboard a Databricks App to SSPM
- Onboard a Datadog App to SSPM
- Onboard a DocHub App to SSPM
- Onboard a DocuSign App to SSPM
- Onboard a Dropbox Business App to SSPM
- Onboard an Envoy App to SSPM
- Onboard an Expiration Reminder App to SSPM
- Onboard a Gainsight PX App to SSPM
- Onboard a GitHub Enterprise App to SSPM
- Onboard a GitLab App to SSPM
- Onboard a Google Analytics App to SSPM
- Onboard a Google Workspace App to SSPM
- Onboard a GoTo Meeting App to SSPM
- Onboard a Grammarly App to SSPM
- Onboard a Harness App to SSPM
- Onboard a Hellonext App to SSPM
- Onboard an IDrive App to SSPM
- Onboard an Intercom App to SSPM
- Onboard a Jira App to SSPM
- Onboard a Kanbanize App to SSPM
- Onboard a Kanban Tool App to SSPM
- Onboard a Kustomer App to SSPM
- Onboard a Lokalise App to SSPM
- Onboard a Microsoft Azure AD App to SSPM
- Onboard a Microsoft Exchange App to SSPM
- Onboard a Microsoft OneDrive App to SSPM
- Onboard a Microsoft Outlook App to SSPM
- Onboard a Microsoft Power BI App to SSPM
- Onboard a Microsoft SharePoint App to SSPM
- Onboard a Microsoft Teams App to SSPM
- Onboard a Miro App to SSPM
- Onboard a monday.com App to SSPM
- Onboard a MongoDB Atlas App to SSPM
- Onboard a MuleSoft App to SSPM
- Onboard a Mural App to SSPM
- Onboard an Office 365 App to SSPM
- Onboard Office 365 Productivity Apps to SSPM
- Onboard an Okta App to SSPM
- Onboard a PagerDuty App to SSPM
- Onboard a RingCentral App to SSPM
- Onboard a Salesforce App to SSPM
- Onboard an SAP Ariba App to SSPM
- Onboard a ServiceNow App to SSPM
- Onboard a Slack Enterprise App to SSPM
- Onboard a Snowflake App to SSPM
- Onboard a SparkPost App to SSPM
- Onboard a Tableau Cloud App to SSPM
- Onboard a Webex App to SSPM
- Onboard a Workday App to SSPM
- Onboard a Wrike App to SSPM
- Onboard a YouTrack App to SSPM
- Onboard a Zendesk App to SSPM
- Onboard a Zoom App to SSPM
- Onboarding an App Using Azure AD Credentials
- Onboarding an App Using Okta Credentials
- Delete SaaS Apps Managed by SSPM
Configure Regular Expressions
Use the
Data Security
regex builder to create expressions
that make content matching easy.See Configure Regular Expressions if you have
purchased Enterprise DLP or opted in for a trial.
The regular expression builder in
Data Security
provides an easy mechanism to configure regular expressions
(regex for short), which you define when you create a custom data
pattern.
You can use the regular expression builder to construct a data pattern
expression, view matches, filter occurrences and weight thresholds,
and assess match results to determine if the content poses a risk
to your organization.There are two types of regular expressions:
- basic expression—searches for a specific text pattern. When a pattern match is found, the service displays the match occurrences.
- weighted expression—assigns a score to a text entry. When the score threshold is exceeded, such as enough expressions from a pattern match an asset, the service returns a match for the pattern.To reduce false-positives and maximize the search performance of your regular expressions, you can assign scores using the weighted regular expression builder inData Securityto find and calculate scores for the information that is important to you. Scoring applies a match threshold, and when a threshold is exceeded, such as enough words from a pattern are found in a document, the document will be indicated as a match for the pattern.
Use
Case: Calculating and Scoring a weighted regular expression
For
example, Joe is an employee at a water treatment plant and needs
to compile user data on a proprietary pH additive that is used when
source water arrives at the plant. If Joe initiated a regular expression
search with just the term "tap water" thousands of match results
display, as the matched tap water documents list the additive, but
Joe is really searching for the first use of the additive, not every
document the additive is listed in, making it difficult for Joe
to find the usage data he needs.
To get more accurate results,
Joe can initiate a weighted regular expression to assign weight
and occurrence scores to the expression, or indicate the information
to exclude by assigning a negative weight value.
Joe enters
a negative weight value to exclude tap water and higher values to
source water and the proprietary water additive. The results are
filtered and counted to a more manageable list, meaning that a document
containing 10 occurrences of water counts as one when all files
and folders are scanned. This enables Joe to view the match results,
adjust the totals for weight and occurrences, and calculate an adjusted
score to determine if the content poses a risk to his organization.
Weighted Regex Item | Occurrence | Adjusted Occurrence Score | Adjusted Total |
---|---|---|---|
Water; 1 | 50 | 50 (1 Occurrence X 1) | 110 minus 100 for tap water
= 10 regex weight |
IP pH; 2 | 30 | 60 (30 occurrences X 2) | |
Tap Water; -10 | 10 | -100 (10 occurrences x -10) |
- Consider the best practices for using regular expression matches.
- Use predefined data patterns instead of regular expressions. UseData Securitypredefined data patterns instead of regular expressions where possible. Data patterns are more efficient than regular expressions because the predefined data patterns are tuned for accuracy and the data is validated. For example, if you want to search for social security numbers, use the US Social Security Number (SSN) data pattern instead of a regular expression.
- Use regular expressions sparingly. Regular expressions can be computationally expensive. If you add a regular expression condition, observe the system for one hour for efficient performance. Make sure that the system does not slow down and there are no false positives.
- Test regular expressions. If you implement regular expression matching, consider using a third-party tool to test the regular expressions before you enable the policy rules. The recommended tool is RegexBuddy. Another good tool for testing your regular expressions is RegExr. If your expression is incorrect, the service cannot match or will match incorrectly.
- Understand expression terminology.Expression Terminology:TermDescriptionLiteralA literal is any character you use in a search or matching expression, for example, to find dlp inData Security, "dlp" is a literal string - each character plays a part in the search, it is literally the string we want to find.MetacharacterA metacharacter is one or more special characters that have a unique meaning and are NOT used as literals in the search expression, for example, the character < > (caret) is a metacharacter.Regular ExpressionThis term describes the search expression data pattern that you will be using to search inData Security.Escape SequenceAn escape sequence is a way of indicating that you want to use one of the metacharacters as a literal. In a regular expression an escape sequence involves placing the metacharacter \ (backslash) in front of the metacharacter that you use as a literal, for example, if you want to find (dlp) inData Securitythen use the search expression \(dlp\), and if you want to find \\file in the target string c:\\file then you would need to use the search expression \\\\file (each \ to search for a literal (there are 2) that is preceded by an escape sequence \).
- Understand expression constructs.Data Securityimplements the Java regular syntax for policy condition matching.Data Securityprovides some common reference constructs for writing regular expressions to match or exclude characters in content.Regular expression constructs:ConstructDescription.A dot, any single character, except newline (line ending, end of line, or line break) characters.\Escape the next character (the character becomes a normal/literal character.)\dAny digit (0-9.)\sAny white space.\WAny word character (a-z, A-Z, 0-9.)\DAnything other than a digit.\SAnything other than a white space.[ ]Elements inside brackets are a character class (for example, [abc] matches 1 character [a. b. or c.]^At the beginning of a character class, negates it (for example, [^abc] matches anything except (a, b, or c.)$At the end of a character class, or before newline at the end.+Following a regular expression means 1 or more (for example, \d+ means 1 more digit.)?Following a regular expression means 0 or 1 (for example, \d? means 1 or no digit.)*Following a regular expression means any number (for example \d* means 0, 1, or more digits.)(?i)At the beginning of a regular expression makes it case-insensitive (regular expressions are case-sensitive by default.)( )Groups regular expressions together.(?u)Makes a period ( . ) match to even newline characters.|Means OR (for example, A|B means regular expression A or regular expression B.)
- Understand expression qualifiers.Quantifiers can be used to specify the number or length that part of a pattern should match or repeat. A quantifier will bind to the expression group to its immediate left.Regular expression quantifiers:QuantifierDescription*Match 0 or more times.+Match 1 or more times.?Match 1 or 0 times.{n}Match exactly n times.{n, }Match at least n times.{n, m}Match at least n but not more than m times.
- Enter one regular expression per line, up to 100 lines of expressions.There is no limit to the number of regular expressions you can add to a data pattern. Add as many lines of regular expressions as needed.
- (Weighted expressions only): Assign a regular expression for each line entry between-9999(lowest importance) to9999(highest importance) by entering the regular expression, the delimiter, and the weight score. You must enter a weight threshold score of one (1) of more.
- (Optional) Customize your delimiter.By default, the delimiter for all weighted regular expressions is semicolon ( ; ). You can customize your delimiter to copy and paste existing expressions instead of entering them manually. A delimiter is used to specify separate strings of data when configuring regular expressions. For example, you can configure a weighted regular expression using a delimiter to separate the string of text you are matching from the weight threshold value. If you have large amounts of existing expressions to match, you can customize your delimiter to copy and paste the expressions instead of entering them manually. A delimiter can be any non-alphanumeric, non-backslash, non-whitespace character.Regular expression delimiters:DelimiterNote;Semicolon — If the delimiter is not customized, the semicolon is the default delimiter inData Security.:Colon.|Pipe./Forward Slash — If the delimiter needs to be matched inside the pattern it must be escaped using a backslash ( \ ). If the delimiter appears often inside the pattern, it is a good idea to choose another delimiter to increase readability.+Plus — Include phrase for matching.-Minus — Ignore phrase for matching.#Hash — Can be used to denote a number.~Tilde{ } CurlyBrackets are used to find a range of characters. Bracket style delimiters do not need to be escaped when they are used as meta characters within the pattern, but they must be escaped when they are used as literal characters.[ ] Square( ) Parenthesis< > Caret