Skip to content

Sensitive Data Discovery

Sensitive Data Discovery scans your managed devices for files containing personally identifiable information (PII), payment card data (PCI), protected health information (PHI), credentials, and financial records. The system uses pattern-based detection to identify sensitive content, assigns risk scores and confidence levels to each finding, and provides remediation workflows to encrypt, quarantine, or securely delete the offending files. A centralized dashboard tracks open findings, risk distribution, and remediation progress across your fleet.

Scans can be triggered manually for specific devices or scheduled through scan policies. Each scan runs on the agent side, and results are reported back to the API where findings are stored, deduplicated across scans, and made available for reporting and remediation.


TypeDescription
piiPersonally identifiable information — names, addresses, phone numbers, email addresses, government IDs (SSN, passport numbers)
pciPayment card industry data — credit/debit card numbers, CVVs, cardholder data
phiProtected health information — medical records, insurance IDs, health conditions, prescription data
credentialStored credentials — API keys, passwords, tokens, private keys, connection strings
financialFinancial records — bank account numbers, routing numbers, tax documents, financial statements
RiskDescription
lowFinding has limited exposure potential — low match count, non-sensitive file location, or low confidence
mediumFinding warrants review — moderate match count or sensitive file type
highFinding requires attention — multiple matches in an accessible location or high-confidence detection
criticalFinding demands immediate action — credentials in plaintext, unprotected PCI data, or high match count with high confidence
StatusDescription
openActive finding that has not been addressed
remediatedFinding has been remediated (encrypted, quarantined, deleted, or manually marked)
acceptedRisk has been explicitly accepted by an administrator
false_positiveFinding has been determined to be a false positive
ActionDestructiveDescription
encryptYesEncrypt the file in place using the configured encryption key
quarantineYesMove the file to a quarantine directory on the device
secure_deleteYesPermanently and securely delete the file
accept_riskNoAcknowledge the finding and accept the risk
false_positiveNoMark the finding as a false positive
mark_remediatedNoManually mark the finding as remediated

Scan policies define the detection configuration, file scope, and schedule for sensitive data scans. Each policy is scoped to an organization and specifies which data types to detect, which paths to scan, and how often to run.

Terminal window
POST /sensitive-data/policies
Content-Type: application/json
Authorization: Bearer <token>
{
"orgId": "uuid",
"name": "Weekly PII & Credential Scan",
"scope": {
"includePaths": ["/Users", "/home", "C:\\Users"],
"excludePaths": ["/Users/*/Library", "C:\\Windows"],
"fileTypes": [".txt", ".csv", ".xlsx", ".json", ".env", ".conf"],
"maxFileSizeBytes": 104857600,
"workers": 4,
"timeoutSeconds": 600
},
"detectionClasses": ["pii", "credential"],
"schedule": {
"enabled": true,
"type": "interval",
"intervalMinutes": 10080,
"timezone": "America/Chicago"
},
"isActive": true
}
FieldTypeRequiredDescription
orgIdUUIDNoOrganization ID. Auto-resolved for org-scoped tokens
namestringYesPolicy name (max 200 chars)
scopeobjectNoScan scope configuration (see below)
detectionClassesstring[]YesData types to detect: pii, pci, phi, credential, financial (1-5)
scheduleobjectNoScan schedule configuration (see below)
isActivebooleanNoWhether the policy is active (default true)
FieldTypeDescription
includePathsstring[]Paths to scan (max 256, each up to 2,048 chars)
excludePathsstring[]Paths to exclude from scanning (max 256)
fileTypesstring[]File extensions to scan (max 128, each up to 32 chars)
maxFileSizeBytesintegerMaximum file size to scan (1 KB to 1 GB)
workersintegerConcurrent scan workers (1-32)
timeoutSecondsintegerScan timeout in seconds (5-1,800)
suppressPathsstring[]Paths to suppress in findings (max 256)
suppressPatternIdsstring[]Pattern IDs to suppress (max 200)
suppressFilePathRegexstring[]Regex patterns for file paths to suppress (max 80)
ruleTogglesobjectPer-rule enable/disable overrides (key: rule ID, value: boolean)
FieldTypeDescription
enabledbooleanWhether the schedule is active (default true)
typestringSchedule type: manual, interval, or cron
intervalMinutesintegerScan interval in minutes (5 to 10,080 / one week)
cronstringCron expression (when type is cron)
timezonestringTimezone for scheduled scans
deviceIdsUUID[]Specific devices to scan (max 1,000). If omitted, scans all devices in the org
Terminal window
PUT /sensitive-data/policies/:id
Content-Type: application/json
{
"name": "Updated Scan Policy",
"detectionClasses": ["pii", "credential", "pci"],
"isActive": true
}
Terminal window
DELETE /sensitive-data/policies/:id

Terminal window
POST /sensitive-data/scan
Content-Type: application/json
Authorization: Bearer <token>
{
"deviceIds": ["device-uuid-1", "device-uuid-2"],
"policyId": "policy-uuid",
"detectionClasses": ["pii", "credential"],
"scope": {
"includePaths": ["/home"],
"fileTypes": [".txt", ".csv", ".env"],
"maxFileSizeBytes": 52428800
},
"idempotencyKey": "scan-2026-02-15-batch-1"
}
FieldTypeRequiredDescription
deviceIdsUUID[]YesDevices to scan (1-200)
policyIdUUIDNoUse an existing policy’s scope and detection classes
scopeobjectNoOverride the scan scope (takes precedence over policy scope)
detectionClassesstring[]NoOverride detection classes (takes precedence over policy)
idempotencyKeystringNoClient-provided idempotency key (8-128 chars). Also accepted via Idempotency-Key header

The API creates one scan record per device and enqueues each scan through BullMQ. Decommissioned devices are excluded. The response includes the created scans, the count of successfully queued jobs, and any skipped device IDs.

StatusDescription
queuedScan created and enqueued for the agent
runningAgent is actively scanning the device
completedScan finished — results include findings summary
failedScan encountered an error
Terminal window
GET /sensitive-data/scans?limit=50

Returns recent scans ordered by creation time, with device hostname, policy reference, status, and timing information.

Terminal window
GET /sensitive-data/scans/:id

Returns full scan details including a findings summary with counts by risk level and status. If the scan has pre-computed summary counters in its summary JSONB, those are returned directly. Otherwise, findings are aggregated on the fly.


Terminal window
GET /sensitive-data/report?status=open&risk=critical&dataType=credential&page=1&limit=50
ParameterTypeDescription
statusstringFilter by status: open, remediated, accepted, false_positive
riskstringFilter by risk level: low, medium, high, critical
dataTypestringFilter by data type: pii, pci, phi, credential, financial
deviceIdUUIDFilter findings for a specific device
scanIdUUIDFilter findings from a specific scan
pageintegerPage number for pagination
limitintegerResults per page (default 200)
FieldTypeDescription
idUUIDUnique finding identifier
orgIdUUIDOrganization ID
deviceIdUUIDDevice where the file was found
deviceNamestringHostname of the device
scanIdUUIDScan that discovered the finding
filePathstringFull path to the file containing sensitive data
dataTypestringClassification type: pii, pci, phi, credential, financial
patternIdstringIdentifier of the detection pattern that matched
matchCountintegerNumber of matches found in the file
riskstringRisk level: low, medium, high, critical
confidencefloatDetection confidence score (0.0 to 1.0)
fileOwnerstringFile owner on the device
fileModifiedAtISO 8601When the file was last modified
firstSeenAtISO 8601When this finding was first detected
lastSeenAtISO 8601When this finding was last confirmed
occurrenceCountintegerNumber of scans that have found this file
statusstringCurrent status: open, remediated, accepted, false_positive
remediationActionstringAction taken (if any)
remediatedAtISO 8601When remediation occurred

The dashboard endpoint aggregates all findings data into a single response for the sensitive data overview:

Terminal window
GET /sensitive-data/dashboard
{
"data": {
"totals": {
"findings": 1250,
"open": 842,
"criticalOpen": 23,
"remediated24h": 45,
"averageOpenAgeHours": 168.5
},
"byDataType": {
"pii": 520,
"credential": 380,
"pci": 200,
"phi": 100,
"financial": 50
},
"byRisk": {
"low": 600,
"medium": 350,
"high": 200,
"critical": 100
}
}
}
FieldDescription
totals.findingsTotal number of findings across all statuses
totals.openNumber of findings in open status
totals.criticalOpenNumber of critical-risk findings that are still open
totals.remediated24hNumber of findings remediated in the last 24 hours
totals.averageOpenAgeHoursAverage age of open findings in hours
byDataTypeFinding count broken down by data classification
byRiskFinding count broken down by risk level

Terminal window
POST /sensitive-data/remediate
Content-Type: application/json
Authorization: Bearer <token>
{
"findingIds": ["finding-uuid-1", "finding-uuid-2"],
"action": "quarantine",
"confirm": true,
"quarantineDir": "/var/lib/breeze/quarantine/sensitive",
"dryRun": false
}
FieldTypeRequiredDescription
findingIdsUUID[]YesFindings to remediate (1-250)
actionstringYesencrypt, quarantine, secure_delete, accept_risk, false_positive, mark_remediated
confirmbooleanConditionalRequired for destructive actions (encrypt, quarantine, secure_delete)
dryRunbooleanNoPreview which findings would be affected without making changes (default false)
secondApprovalTokenstringConditionalRequired for secure_delete when second approval is enabled
encryptionKeyRefstringNoReference to the encryption key (for encrypt action)
encryptionKeyVersionstringNoVersion of the encryption key
quarantineDirstringNoCustom quarantine directory path on the device
  1. Non-destructive actions (accept_risk, false_positive, mark_remediated) update the finding status directly in the database. No command is sent to the agent.

  2. Destructive actions (encrypt, quarantine, secure_delete) queue a command to the target device’s agent via the command queue. Each finding becomes a separate command targeting the specific file path.

  3. Dry run mode returns the list of eligible findings and their file paths without making any changes, allowing you to preview the impact before committing.

  4. Second approval can be required for secure_delete operations by setting the SENSITIVE_DATA_REQUIRE_SECOND_APPROVAL environment variable. When enabled, a valid secondApprovalToken must be provided.

For destructive actions, the response includes queued commands and any failures:

{
"data": {
"queued": [
{ "findingId": "uuid", "commandId": "uuid" }
],
"failed": [
{ "findingId": "uuid", "error": "Device is offline" }
],
"updated": 5
}
}

MethodPathDescription
POST/sensitive-data/scanTrigger a manual scan on one or more devices
GET/sensitive-data/scansList recent scans with status and summary
GET/sensitive-data/scans/:idGet scan details with findings breakdown
MethodPathDescription
GET/sensitive-data/reportQuery findings with filtering and pagination
GET/sensitive-data/dashboardAggregated dashboard with totals, risk, and data type distribution
MethodPathDescription
POST/sensitive-data/remediateRemediate findings (destructive or non-destructive)
MethodPathDescription
GET/sensitive-data/policiesList all scan policies for the organization
POST/sensitive-data/policiesCreate a new scan policy
PUT/sensitive-data/policies/:idUpdate an existing policy
DELETE/sensitive-data/policies/:idDelete a policy

Scan stuck in queued status. The scan was created but the agent has not started processing it. Verify that the target device is online and the agent is connected. Check that BullMQ workers are running and processing the sensitive data scan queue. If the scan enqueue failed, the creation response includes an enqueueFailures count greater than zero.

No findings returned after a completed scan. The scan completed but did not detect any sensitive data matching the configured detection classes and scope. Verify the detectionClasses include the types you expect to find. Check the scope.includePaths to ensure the correct directories are being scanned. Review scope.excludePaths and suppressPaths to make sure the target files are not being excluded. Also check scope.maxFileSizeBytes — files larger than the limit are skipped.

Duplicate scan created despite idempotency key. Idempotency checks match on both the key and the request fingerprint (a SHA-256 hash of device IDs, policy, scope, and detection classes). If any of these values differ between requests, the fingerprint will not match and a new scan will be created. Idempotency protection also only applies to scans created within the last 24 hours.

Destructive remediation rejected with confirm=true error. Destructive actions (encrypt, quarantine, secure_delete) require confirm: true in the request body. If the secure_delete action is rejected despite confirmation, check whether the SENSITIVE_DATA_REQUIRE_SECOND_APPROVAL environment variable is enabled — if so, a valid secondApprovalToken must also be provided.

Remediation command failed to queue for a device. When a destructive remediation command fails to queue, the finding ID appears in the failed array of the response with an error message. Common causes include the device being offline or the command queue being unavailable. The finding’s remediationAction and remediationMetadata are still updated to reflect the attempted action, but the agent will not receive the command until it is re-queued.

Dashboard shows stale totals. The dashboard computes totals by scanning all findings in real time. If the finding count is large, the response may take a moment to compute. The averageOpenAgeHours is calculated from each open finding’s lastSeenAt timestamp. If scans are not running regularly, the age values may appear inflated.