> For the complete documentation index, see [llms.txt](https://docs.docontrol.io/docontrol-user-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docontrol.io/docontrol-user-guide/workflows/define-workflow-settings/action-settings/query/data-scan.md).

# Data scan

DoControl's DLP data scan goes beyond basic PII and regex detection. To reduce the risk of data breaches and maintain regulatory compliance, you can scan your assets for sensitive data classifiers and regex patterns.

{% hint style="success" %}

* Data scans are leveraged as action steps in workflows, so only the triggering assets are scanned.&#x20;
* You need to give [consent](#consent-for-data-scanning) to enable the data scan action in workflows.
  {% endhint %}

With real-time data scanning you can automatically identify and classify files and messages that contain high-risk content. This proactive approach enables you to enforce access controls, prevent unauthorized sharing, and respond to incidents within minutes.

You can scan assets for:

* [Data classifiers](#data-classifiers) - Over 230 natural language terms categorize data based on sensitivity, type, or regulatory requirements. Classifiers are regulated by compliance standards that aim to protect your personal, banking or health data from exposure.
* [Regex patterns](#regex-patterns) - Strings that meet regular expression or pattern criteria, for example, a string that refers to a confidential topic, or a predefined regex pattern, such as a social security number.

## **Use cases**

Primary use cases for scanning files and messages for sensitive data classifiers and regex patterns include:

* **Regulatory compliance** - Organizations are required to proactively identify protected data types such as personally identifiable information (PII), payment card information (PCI), and protected health information (PHI). Data scans enable you to enforce policies aligned with GDPR, HIPAA, and SOC 2, reducing audit risks and penalties.
* **Data breach prevention** - You can detect accidental or malicious sharing of credentials, API keys, or financial data. Data scans enable you to intercept high-risk content in messages or files before external exposure, mitigating insider threats and external exfiltration attempts.
* **Intellectual property (IP) protection** - Monitor unauthorized sharing of trade secrets, proprietary code, or strategic documents. Regex patterns customized to internal IP formats, such as project codenames or patent references, can help to surface IP violations.

## Benefits of data scanning

DoControl's unified and scalable DLP data scan gives you:

* **230+ built-in data classifiers** - Detect sensitive file content, including source-code secrets, global IDs, financial, and health information
* **Intelligent match context** - Capture exact matches with offsets, masked snippets, and full context to point you straight to the leak
* **OCR for images and PDFs** – Scan contracts, passports, screenshots, and IDs for broader visibility
* **Categorized findings** – Flag issues by data type (security, PII, finance) for faster triage
* **Compliance drift detection** – Remediate any exposed assets to ensure compliance with relevant regulations, such as SOC 2, HIPAA, and ISO 27001
* **Custom regex and match logic –** Set thresholds, match limits, and fine-tune rules
* **Confidence scoring** – Leverage probability-based match scoring to reduce false positives and make  smarter decisions

## Supported file types

Data scans run in Google Drive, Slack and Slack Enterprise for these entities:

<table><thead><tr><th width="270.296875">App</th><th>Scanned entities</th></tr></thead><tbody><tr><td>Google Drive</td><td>Files</td></tr><tr><td>Slack</td><td>Files</td></tr><tr><td>Slack Enterprise</td><td>Files and conversations</td></tr></tbody></table>

DoControl supports these files types when scanning for data classifiers and regex patterns:

<table><thead><tr><th width="159">App</th><th valign="top">File type</th><th valign="top">MIME type</th></tr></thead><tbody><tr><td>General</td><td valign="top"><ul><li>TXT (text)</li><li>CSV (comma separated values)</li><li>TSV (tab separated values)</li><li>PDF (portable document format)</li><li>XML</li><li>HTML</li></ul></td><td valign="top"><ul><li>text/plain</li><li>text/csv</li><li>text/tab-separated-values</li><li>application/pdf</li><li>application/xml</li><li>text/html</li></ul></td></tr><tr><td>ODF (open document format)</td><td valign="top"><ul><li>ODT (text)</li><li>ODS (spreadsheets)</li><li>ODP (presentations)</li><li>ODG (drawings)</li><li>ODF (formulas)</li><li>ODC (charts)</li></ul></td><td valign="top"><ul><li>application/vnd.oasis.opendocument.text</li><li>application/vnd.oasis.opendocument.spreadsheet</li><li>application/vnd.oasis.opendocument.presentation</li><li>application/vnd.oasis.opendocument.graphics</li><li>application/vnd.oasis.opendocument.formula</li><li>application/vnd.oasis.opendocument.chart</li></ul></td></tr><tr><td>Image files</td><td valign="top"><ul><li>PNG</li><li>JPG</li><li>BMP</li><li>GIF</li></ul></td><td valign="top"><ul><li>image/png</li><li>image/jpeg</li><li>image/bmp or image/x-ms-bmp</li><li>image/gif</li></ul></td></tr><tr><td>Email format</td><td valign="top"><ul><li>MSG</li><li>EML</li></ul></td><td valign="top"><ul><li>application/vnd.ms-outlook</li><li>message/rfc822</li></ul></td></tr><tr><td>Compressed files</td><td valign="top"><ul><li>ZIP</li><li>RAR</li><li>GZIP</li><li>7ZIP</li></ul></td><td valign="top"><ul><li>application/zip</li><li>application/vnd.rar</li><li>application/gzip</li><li>application/x-7z-compressed</li></ul></td></tr><tr><td>Google Drive</td><td valign="top"><ul><li>GDOC (Google Docs)</li><li>GSLIDES (Google Slides)</li><li>GSHEET (Google Sheets)</li></ul></td><td valign="top"><ul><li>application/vnd.google-apps.document</li><li>application/vnd.google-apps.presentation</li><li>application/vnd.google-apps.spreadsheet</li></ul></td></tr><tr><td>Microsoft</td><td valign="top"><ul><li>DOC/DOCX (Word version 2007 and up)</li><li>XLS (Excel up to version 2003)</li><li>XLS/XLSX (Excel version 2007 and up), XLT</li><li>PPT/PPTX (Powerpoint version 2007 and up)</li></ul></td><td valign="top"><ul><li>application/vnd.ms-excel</li><li>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</li><li>application/vnd.openxmlformats-officedocument.wordprocessingml.document</li><li>application/vnd.openxmlformats-officedocument.presentationml.presentation</li></ul></td></tr></tbody></table>

## Data classifiers

Data classifiers categorize data based on [data categories](#data-categories) or [regulatory requirements](#compliance-standards). With classifiers, you can proactively identify and protect your personal, banking or health data from exposure.

If high-probability matches are found, you can remediate any exposed assets to ensure compliance with the relevant regulations.

<div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FQtbyinVecvkAnZ8YX1x2%2Fdata%20classifiers.png?alt=media&amp;token=30463ed4-b7dc-45cc-acc2-a9e17fcde9f5" alt=""><figcaption></figcaption></figure></div>

### Compliance standards

Depending on your business sector and customer region, different compliance standards apply. When scanning files for data classifiers, select the compliance standards that are most relevant to your organization.

<div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FIhdtiVugGVKnC3IsITQK%2Fdata%20scan%20compliance%20categories.png?alt=media&amp;token=cae60bd6-8d52-4d47-8971-8b48580c4a01" alt=""><figcaption></figcaption></figure></div>

Each compliance standard includes a number of relevant data classifiers. You can search for up to 50 data classifiers in one scan. See [Data classifier list](/docontrol-user-guide/workflows/define-workflow-settings/action-settings/query/data-scan/data-classifier-list.md) for the full list.

{% hint style="success" %}
For example: If you select the **HIPAA** category, all data classifiers related to US medical records and health information are scanned for.
{% endhint %}

<table><thead><tr><th width="187.546875" valign="top">Compliance standard</th><th>Description</th></tr></thead><tbody><tr><td valign="top">GDPR </td><td>The General Data Protection Regulation (GDPR) governs how companies collect, process, and store personal data pertaining to individuals in the European Union and European Economic Area</td></tr><tr><td valign="top">HIPAA</td><td>The Health Insurance Portability and Accountability Act (HIPAA) is a US regulation that safeguards patients' protected health information to ensure privacy and security</td></tr><tr><td valign="top">PCI</td><td>The Payment Card Industry Data Security Standard (PCI DSS) is a global standard mandating security practices for organizations that handle payment card transactions. It aims to protect cardholder data and prevent fraud.</td></tr><tr><td valign="top">FERPA</td><td>The Family Educational Rights and Privacy Act (FERPA) is a US federal law governing access to and disclosure of student educational records. This regulation protects student privacy in educational institutions that receive federal funding.</td></tr><tr><td valign="top">LGPD</td><td>The Lei Geral de Proteção de Dados Pessoais (LGPD) is Brazil’s general data protection law that establishes rules for processing the personal data of individuals in Brazil to ensure privacy protection</td></tr><tr><td valign="top">CCPA</td><td>The California Consumer Privacy Act (CCPA) is a California state law that grants residents rights over their personal information held by businesses, including the right to know, delete, and opt out of its sale</td></tr><tr><td valign="top">POPI</td><td>The Protection of Personal Information Act (POPI) is South Africa’s data protection law. It requires organizations to secure and govern the processing of personal information to protect individual privacy rights.</td></tr><tr><td valign="top">PDPO</td><td>The Personal Data (Privacy) Ordinance (PDPO) is Hong Kong’s principal data protection law. It regulates the collection, use, and handling of personal data by both public and private sector organizations</td></tr><tr><td valign="top">GLBA</td><td>The Gramm-Leach-Bliley Act (GLBA) is a US federal law requiring financial institutions to protect consumer financial data and explain their information-sharing practices to customers</td></tr></tbody></table>

### Data categories

Depending on your business sector and customer population, different data categories apply. When scanning files for data classifiers, select the data categories that are most relevant to your organization.

<div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FYghV7R7TbbsDMylIdlbu%2Fdata%20scan%20category.png?alt=media&amp;token=65695b48-fbae-4651-b7a2-40e0fb957d5c" alt=""><figcaption></figcaption></figure></div>

Each data category includes a number of relevant data classifiers. You can search for up to 50 data classifiers in one scan. See [Data classifier list](/docontrol-user-guide/workflows/define-workflow-settings/action-settings/query/data-scan/data-classifier-list.md) for the full list.

{% hint style="success" %}
For example: If you select the **Financial** category, all data classifiers related to banking, payments and investments are scanned for.
{% endhint %}

<table><thead><tr><th width="144.37890625" valign="top">Data category</th><th>Description</th></tr></thead><tbody><tr><td valign="top">Government</td><td>Information managed by government bodies, including classified materials or data subject to public sector disclosure rules</td></tr><tr><td valign="top">Financial</td><td>Data related to banking, payments, investments, transactions, or other financial activities. Exposing this data can lead to fraud.</td></tr><tr><td valign="top">PII</td><td>Data that directly or indirectly identifies an individual, such as names, addresses, or national identification numbers. This data is protected due to the risk of identity theft.</td></tr><tr><td valign="top">Cryptocurrency</td><td>Digital wallet details, cryptographic keys, and transaction information for digital assets, where unauthorized access can lead to loss of funds</td></tr><tr><td valign="top">Credentials</td><td>Authentication details such as passwords, API keys, or tokens that, if compromised, allow access to protected systems or information</td></tr><tr><td valign="top">Medical</td><td>Healthcare records or information about diagnoses, treatments, insurance, or prescriptions. This data is highly regulated to protect individual privacy.</td></tr><tr><td valign="top">Logistics</td><td>Supply chain, delivery, and transport data. Disclosing this data could impact operations or business competitiveness.</td></tr><tr><td valign="top">Business</td><td>Proprietary corporate data, including trade secrets, internal strategies, or confidential plans. This data is essential to maintaining a business advantage.</td></tr><tr><td valign="top">Cryptographic</td><td>Encryption keys and digital certificates vital for securing communications and data. Exposing this data undermines all protected information.</td></tr><tr><td valign="top">Networking</td><td>Details about IT infrastructure, including IP addresses, network diagrams, or configurations that could enable cyberattacks if leaked</td></tr><tr><td valign="top">Educational</td><td>Academic records, grades, or research data pertaining to students or staff. This data is protected to comply with privacy laws and maintain trust.</td></tr></tbody></table>

## Regex patterns

Regex (regular expression) is a string or pattern sequence of symbols and characters that is searched for in documents. Regular expressions are a powerful and flexible way of matching all characters or portions of text in a string. With the Data scan action, you can scan for customized patterns that are specific to your organization, such as customer data and sensitive company information.

Common use cases for running a regex scan include references to salary, internal documents, executives in the company, or specific confidential topics.

An example of a regex string is:

`(\W|^)[\w.-]{0,25}@(yahoo|hotmail|gmail).com(\W|$)`

The results return any email address match from these domains: yahoo.com, hotmail.com, and gmail.com, such as johndoe\@gmail, <jane@hotmail.com>.

A regex example to match any email address from a specific domain can be found [here](<https://support.google.com/a/answer/1371417?hl=en#Match-Any-Email-Address-from-a-Spec >).

### What does a Regex pattern look for?

A regex scan uses a deterministic scanning algorithm to detect a specific expression, string or pattern in a file. If you accurately configure a regular expression, the regex scan will find any relevant results in the file and display them in the step output.&#x20;

### **When to use a Regex** patter&#x6E;**?**

We recommend using a regex pattern when you know the textual structure, or pattern, of the keywords you are looking for and would like to view clear, unequivocal results. Alternatively, use a regex pattern when you're looking for proprietary sensitive information that is not considered as personally identifiable information (PII). This could include sensitive internal company items, budget data, or unique customer data.

### Regex syntax limitations

When using syntax in the regex scan, be aware of these limitations.

* DoControl uses [RE2 syntax ](https://cran.r-project.org/web/packages/re2/vignettes/re2_syntax.html)for regular expressions.
* You can enter between 5-1000 characters in the regex expression; otherwise it might return too many results
* The file size is limited to 10MB.
* If the result is greater than 70 characters, the `Expression too wide` error is returned.
* If it takes more than two minutes to run the regex scan, the `Expression too wide` error is returned.

## Consent for data scanning

You need to enable data scanning in workflows before using the Data scan action.

Workflows with data, PII and regex scan actions will scan assets for sensitive data (PII, financial and health information) across all supported SaaS apps.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.docontrol.io/docontrol-user-guide/workflows/define-workflow-settings/action-settings/query/data-scan.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
