Skip to content

CHORE: add shift-left secret scanning to PR validation (test)#674

Draft
bewithgaurav wants to merge 1 commit into
mainfrom
bewithgaurav/test-secret-scan-shift-left
Draft

CHORE: add shift-left secret scanning to PR validation (test)#674
bewithgaurav wants to merge 1 commit into
mainfrom
bewithgaurav/test-secret-scan-shift-left

Conversation

@bewithgaurav

Copy link
Copy Markdown
Collaborator

Work Item / Issue Reference

ADO Work Item: Fixed AB#<WORK_ITEM_ID>


Summary

draft / test — do not merge. proving shift-left secret scanning on PR validation.

adds a SecretScan job to eng/pipelines/pr-validation-pipeline.yml that runs 1ESSecretScanning@1 (the SEC101 / SPMI engine, same family as the ADO push-protection SEC101/037 SqlLegacyCredentials signal) + PostAnalysis@2 to fail the build on any finding. goal: catch credential leaks at PR time, pre-merge, instead of surfacing later at the GitHub→ADO sync push-protection gate.

tests/_secretscan_probe.txt is a clearly-fake, non-live Azure-SQL-cred-shaped string planted only to verify detection end-to-end. expected result: the Secret Scan leg fails on this probe. once detection is confirmed, the probe file is removed and the scan should pass.

both the probe and the placement of the job are test scaffolding for evaluation.

adds a SecretScan job to the pr-validation pipeline that runs the 1ES Secret Scanning (SEC101/SPMI) engine on every PR, so credential leaks like SEC101/037 SqlLegacyCredentials are caught pre-merge instead of at the GitHub->ADO sync. includes a clearly-fake planted probe fixture to verify detection end-to-end; both the fixture and (pending decision) the job are test scaffolding.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

📊 Code Coverage Report

🔥 Diff Coverage

100%


🎯 Overall Coverage

80%


📈 Total Lines Covered: 6743 out of 8343
📁 Project: mssql-python


Diff Coverage

Diff: main...HEAD, staged and unstaged changes

No lines with coverage information in this diff.


📋 Files Needing Attention

📉 Files with overall lowest coverage (click to expand)
mssql_python.pybind.logger_bridge.cpp: 59.2%
mssql_python.pybind.ddbc_bindings.h: 59.9%
mssql_python.pybind.logger_bridge.hpp: 70.8%
mssql_python.pybind.connection.connection.cpp: 76.2%
mssql_python.pybind.ddbc_bindings.cpp: 76.2%
mssql_python.__init__.py: 77.3%
mssql_python.row.py: 77.6%
mssql_python.ddbc_bindings.py: 79.6%
mssql_python.connection.py: 83.6%
mssql_python.logging.py: 85.5%

🔗 Quick Links

⚙️ Build Summary 📋 Coverage Details

View Azure DevOps Build

Browse Full Coverage Report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants