Skip to content

Commit 9de9b61

Browse files
authored
Merge pull request #771 from microsoft/Feature-35033
Network-35033: Custom Sensitive Information Types (SITs) Configured
2 parents 434e5be + 8b3eeaa commit 9de9b61

File tree

2 files changed

+159
-0
lines changed

2 files changed

+159
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Custom Sensitive Information Types (SITs) are organization-specific classification rules that detect patterns of sensitive data beyond the built-in SIT library. Custom SITs enable organizations to identify proprietary data formats, business-specific terminology, regulatory identifiers, or internal classification schemes that are unique to their industry or operations. By creating custom SITs, organizations can extend Microsoft Purview's data discovery capabilities to automatically detect and protect organization-specific sensitive information in auto-labeling policies, Data Loss Prevention (DLP) rules, and communication compliance monitoring. Custom SITs are particularly critical for organizations handling proprietary data formats, internal identifiers, specialized healthcare codes, financial account numbers, or regulatory compliance data that doesn't match standard built-in patterns. Without custom SITs, data protection mechanisms rely exclusively on generic patterns and may miss organization-specific sensitive information that requires targeted protection.
2+
3+
**Remediation action**
4+
5+
To create custom Sensitive Information Types:
6+
7+
1. Sign in as a Global Administrator or Compliance Administrator to the [Microsoft Purview portal](https://purview.microsoft.com)
8+
2. Navigate to Data Classification > Sensitive Info Types
9+
3. Select "+ Create sensitive info type" to create a new custom SIT
10+
4. Enter a name and description for your custom SIT
11+
5. Define detection patterns:
12+
- **Regex pattern**: Define a regular expression to match the data format
13+
- **Keyword list**: Create a list of specific terms or identifiers to match
14+
- **Supporting evidence**: Add additional patterns that provide confidence to the match
15+
6. Set confidence level (Low, Medium, High) based on pattern specificity
16+
7. Define character proximity for multi-pattern matching
17+
8. Test the pattern with sample data to verify accuracy
18+
9. Create and activate the custom SIT
19+
10. Use the custom SIT in auto-labeling policies or DLP rules
20+
21+
Example custom SIT patterns:
22+
- **Internal Project Codes**: Regex pattern matching "PROJ-[0-9]{6}" format
23+
- **Employee ID Numbers**: Regex pattern matching "EMP-[0-9]{8}" format
24+
- **Healthcare Record Numbers**: Regex pattern matching proprietary medical record identifiers
25+
- **Financial Account Numbers**: Regex pattern matching internal bank account formats
26+
- **Regulatory Reference Numbers**: Keyword lists or patterns specific to industry compliance codes
27+
28+
Alternatively, create via PowerShell:
29+
1. Connect to Compliance & Security PowerShell: `Connect-IPPSSession`
30+
2. Custom SITs cannot be created directly via PowerShell; use the portal for creation
31+
3. Verify creation: `Get-DlpSensitiveInformationType -Filter "IsBuiltIn -eq $false"`
32+
33+
- [Create and configure custom sensitive information types](https://learn.microsoft.com/en-us/purview/create-a-custom-sensitive-information-type)
34+
- [Sensitive information types (SITs) reference](https://learn.microsoft.com/en-us/purview/sit-learn-about-exact-data-match-based-sits)
35+
- [Regular expressions for custom SITs](https://learn.microsoft.com/en-us/purview/sensitive-information-type-entity-definitions)
36+
<!--- Results --->
37+
%TestResult%
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
<#
2+
.SYNOPSIS
3+
Validates that custom Sensitive Information Types (SITs) are configured in the organization.
4+
5+
.DESCRIPTION
6+
This test checks if custom Sensitive Information Types are configured, enabling detection of
7+
organization-specific sensitive data patterns beyond the built-in SIT library. Custom SITs are
8+
critical for protecting proprietary data formats and industry-specific information.
9+
10+
.NOTES
11+
Test ID: 35033
12+
Category: Advanced Classification
13+
Pillar: Data
14+
Required Module: ExchangeOnlineManagement
15+
Required Connection: Security & Compliance PowerShell
16+
#>
17+
18+
function Test-Assessment-35033 {
19+
[ZtTest(
20+
Category = 'Advanced Classification',
21+
ImplementationCost = 'High',
22+
MinimumLicense = ('Microsoft 365 E5 Compliance'),
23+
Pillar = 'Data',
24+
RiskLevel = 'High',
25+
SfiPillar = 'Protect tenants and production systems',
26+
TenantType = ('Workforce'),
27+
TestId = 35033,
28+
Title = 'Custom Sensitive Information Types (SITs) Configured',
29+
UserImpact = 'Medium'
30+
)]
31+
[CmdletBinding()]
32+
param()
33+
34+
#region Data Collection
35+
Write-PSFMessage '🟦 Start' -Tag Test -Level VeryVerbose
36+
37+
$activity = 'Checking Custom Sensitive Information Types Configuration'
38+
Write-ZtProgress -Activity $activity -Status 'Getting custom SIT configuration'
39+
40+
# Get all custom Sensitive Information Types
41+
$customSITs = $null
42+
$errorMsg = $null
43+
44+
try {
45+
$allSITs = Get-DlpSensitiveInformationType -ErrorAction Stop
46+
# Filter for custom SITs (Publisher is not "Microsoft Corporation")
47+
$customSITs = @($allSITs | Where-Object { $_.Publisher -ne 'Microsoft Corporation' })
48+
}
49+
catch {
50+
$errorMsg = $_
51+
Write-PSFMessage "Failed to retrieve custom SIT configuration: $_" -Tag Test -Level Warning
52+
}
53+
#endregion Data Collection
54+
55+
#region Assessment Logic
56+
$passed = $false
57+
$customStatus = $null
58+
59+
if ($errorMsg) {
60+
# Investigate: Cannot query custom SITs
61+
$passed = $false
62+
$customStatus = 'Investigate'
63+
}
64+
elseif ($null -eq $customSITs) {
65+
# Investigate: Cannot determine custom SIT status
66+
$passed = $false
67+
$customStatus = 'Investigate'
68+
}
69+
elseif ($customSITs.Count -ge 1) {
70+
# Pass: Custom SITs are configured
71+
$passed = $true
72+
}
73+
else {
74+
# Fail: No custom SITs configured
75+
$passed = $false
76+
}
77+
#endregion Assessment Logic
78+
79+
#region Report Generation
80+
$testResultMarkdown = ''
81+
82+
if ($customStatus -eq 'Investigate') {
83+
$testResultMarkdown = "### Investigate`n`n"
84+
$testResultMarkdown += "Unable to determine custom SIT status due to permissions issues or service connection failure."
85+
}
86+
elseif ($passed) {
87+
$testResultMarkdown = "✅ Custom Sensitive Information Types are configured, enabling detection of organization-specific sensitive data patterns.`n`n"
88+
}
89+
else {
90+
$testResultMarkdown = "❌ No custom Sensitive Information Types are configured; relying solely on built-in SIT patterns.`n`n"
91+
}
92+
93+
# Build detailed information if we have data
94+
if ($customSITs -and $customSITs.Count -gt 0) {
95+
$testResultMarkdown += "## [Custom Sensitive Information Types](https://purview.microsoft.com/informationprotection/dataclassification/sensinfoTypes)`n`n"
96+
$testResultMarkdown += "| Name | Description | Publisher |`n"
97+
$testResultMarkdown += "| :--- | :--- | :--- |`n"
98+
99+
foreach ($sit in $customSITs | Sort-Object Name) {
100+
$safeSITName = Get-SafeMarkdown $sit.Name
101+
$safeDescription = if ($sit.Description) { Get-SafeMarkdown $sit.Description } else { 'Not specified' }
102+
$safePublisher = if ($sit.Publisher) { Get-SafeMarkdown $sit.Publisher } else { 'Not specified' }
103+
104+
$testResultMarkdown += "| $safeSITName | $safeDescription | $safePublisher |`n"
105+
}
106+
107+
$testResultMarkdown += "`n**Summary:**`n"
108+
$testResultMarkdown += "* Total Custom SITs: $($customSITs.Count)`n"
109+
}
110+
#endregion Report Generation
111+
112+
$params = @{
113+
TestId = '35033'
114+
Title = 'Custom Sensitive Information Types (SITs) Configured'
115+
Status = $passed
116+
Result = $testResultMarkdown
117+
}
118+
if ($customStatus) {
119+
$params.CustomStatus = $customStatus
120+
}
121+
Add-ZtTestResultDetail @params
122+
}

0 commit comments

Comments
 (0)