Searching for sensitive data in a bucket
You can search for sensitive data, such as passwords, credit/debit card details, email addresses, and more, in the bucket using Data Security Posture Management. You can create a bucket scan and manage the results in Object Storage via the management console
Warning
Searching for sensitive data in a bucket is a paid operation. A scan initiated from the Object Storage UI is performed by the Data Security Posture Management module (DSPM) of Yandex Security Deck. The cost of scanning is calculated in line with the Security Deck pricing policy and is attributed to this service in the usage details.
Getting started
Make sure the service account you will use to scan a bucket and work with scan results has the following roles:
dspm.editoror higher: Required to create scans.dspm.adminordspm.vieweror higher: Required to view scan results with masked or public data, respectively.dspm.vieweror higher: Required to download scan results.dspm.vieweror higher: Required to export results. Also the service account that will perform the export must have write permissions for the target bucket.
Creating a scan
Tip
The Object Storage UI allows you to scan individual buckets for sensitive data. To monitor data in multiple buckets at the folder, cloud, or organization level, use the DSPM module inside Yandex Security Deck.
-
In the management console
, select the folder. -
Navigate to Object Storage.
-
Click the name of the bucket you want to create a scan for.
-
Navigate to the Security tab, then to Sensitive data search.
-
Click New scan.
Note
If access to the bucket is controlled by a policy, allow access to Security Deck IP addresses in the bucket policy settings. For a list of addresses, see Public IP address ranges.
-
Under Sensitive data search, select the data categories to scan for. You can select all the available categories at once or any combination of them.
-
Optionally, under Include files into the scope, specify the object keys or prefixes to include in the scan. By default, the scan targets all supported file formats.
Note
Currently, you cannot scan objects encrypted with a KMS key.
-
Click Create scan.
The scan will start automatically. To repeat the scan, click Repeat scan.
Viewing scan results
-
In the management console
, select the folder. -
Navigate to Object Storage.
-
Click the name of the bucket in question.
-
Navigate to the Security tab, then to Sensitive data search.
-
Sensitive data found during the scan, if any, will be displayed on the Results tab. The information about each detected object is presented in the following columns:
Data type: Search category of the data, e.g.,FULL-NAME-RU-ML: Full name.Found occurrence: Sensitive data found.Object: Path to the file the data was found in.
Downloading scan results
As you download, a CSV file with the scan results is saved locally on your computer.
Note
The file can contain a maximum of 10,000 sensitive data records. To export a larger number of records, use export to Object Storage.
- In the management console
, select the folder. - Navigate to Object Storage.
- Click the name of the bucket in question.
- Navigate to the Security tab, then to Sensitive data search.
- Click More
and select Download results. - In the window that opens, specify how to display names, contact information, and other personal data, then click Download file.
Exporting scan results
When exporting, the file with scan results is saved to the bucket you select.
-
In the management console
, select the folder. -
Navigate to Object Storage.
-
Click the name of the bucket in question.
-
Navigate to the Security tab, then to Sensitive data search.
-
Click More
and select Export to bucket. -
In the window that opens, set the export settings:
- In the Bucket field, select the bucket to save the results to.
- In the Path to bucket field, set the prefix of the object to save the results to.
- In the File name field, specify the name of the file to save the results to. The file will automatically get the
.csvextension. - In the Service account field, select the service account with the
storage.uploaderrole for the selected bucket andkms.keys.encrypterfor the encryption key, if the bucket is encrypted. - Under Display sensitive data, specify how to display names, contact information, and other personal data.
- Click Export to export the parameter check results.
Viewing scan errors
- In the management console
, select the folder. - Navigate to Object Storage.
- Click the name of the bucket in question.
- Navigate to the Security tab, then to Sensitive data search, and then to Messages and errors.
For more information about scanning errors, see Troubleshooting Data Security Posture Management (DSPM).
Useful links
- Sensitive data search in Object Storage
- Data Security Posture Management (DSPM)
- Preparing data for scanning in DSPM
An object key is the full name of a file within a bucket, often formatted as a filesystem path. Here are some examples of keys: docs/reports/2026/april.pdf, photos/trips/paris/img001.jpg.
A prefix is the initial part of a key displayed in the UI as a folder. Here are some examples of prefixes: photos/, photos/trips/, photos/trips/paris/.