Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions eng/pipelines/pr-validation-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ trigger:
- main

jobs:
# Shift-left secret scanning: run the 1ES Secret Scanning (SEC101 / SPMI) engine
# on every PR so credential leaks (e.g. SEC101/037 SqlLegacyCredentials) are caught
# pre-merge, instead of surfacing later at the GitHub->ADO sync push-protection gate.
- job: SecretScan
displayName: 'Secret Scan (shift-left SEC101)'
pool:
vmImage: 'windows-latest'
steps:
- task: 1ESSecretScanning@1
displayName: 'Run 1ES Secret Scanning'
inputs:
Action: 'analyze'
Target: '$(Build.SourcesDirectory)\*'
Rules: 'GetClean'
Recurse: true
- task: PostAnalysis@2
displayName: 'Fail build if secrets detected'
inputs:
GdnBreakAllTools: true

- job: CodeQLAnalysis
displayName: 'CodeQL Security Analysis'
pool:
Expand Down
9 changes: 9 additions & 0 deletions tests/_secretscan_probe.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
SECRET-SCAN PROBE — NOT A REAL CREDENTIAL. DELETE BEFORE MERGE.

This file exists only to verify that the shift-left secret-scanning stage in the
PR-validation pipeline catches the SEC101/037 "SqlLegacyCredentials" pattern
(realistic Azure SQL hostname + UID + PWD) at PR time, pre-sync.

The value below is fabricated and points at a non-existent host:

Server=tcp:contoso-probe-doesnotexist.database.windows.net,1433;Database=probe;UID=probeuser;PWD=Fake_NotARealSecret_2026;Encrypt=yes;TrustServerCertificate=no;
Loading