Skip to content

Commit 3f3420d

Browse files
committed
Tune pre-push security patterns to allow placeholders
1 parent 0e10726 commit 3f3420d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Scripts/security/pre-push-security-check.ps1

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ $patterns = @(
3535
'(?i)api[_-]?key\s*[:=]\s*"[A-Za-z0-9_\-]{16,}"',
3636
'(?i)client[_-]?secret\s*[:=]\s*"[^"]+"',
3737
'(?i)password\s*[:=]\s*"[^"]+"',
38-
'(?i)Server=[^;]+;Database=',
39-
'(?i)[A-Za-z0-9\-]+\.openai\.azure\.com',
40-
'(?i)[A-Za-z0-9\-]+\.services\.ai\.azure\.com'
38+
'(?i)Server=DBAFGLSQLP12;Database=',
39+
'(?i)dbadashai\.openai\.azure\.com',
40+
'(?i)kmxdapeaihubmsmodels\.services\.ai\.azure\.com'
4141
)
4242

4343
$allowedPlaceholders = @(
@@ -46,7 +46,11 @@ $allowedPlaceholders = @(
4646
'<your-foundry-resource>.services.ai.azure.com',
4747
'<your-azure-openai-api-key>',
4848
'<your-deployment-name>',
49-
'<your-anthropic-model-deployment>'
49+
'<your-anthropic-model-deployment>',
50+
'YOUR_SQL_SERVER',
51+
'YOUR_AOAI_RESOURCE.openai.azure.com',
52+
'YOUR_FOUNDRY_RESOURCE.services.ai.azure.com',
53+
'Server=<server>;Database=<db>'
5054
)
5155

5256
$violations = New-Object System.Collections.Generic.List[string]

0 commit comments

Comments
 (0)