Skip to content

Fix security report findings; add one-click procedure tuning with a before/after benchmark - #13

Merged
TanmayS0406 merged 1 commit into
mainfrom
security-fixes-and-procedure-tuning
Nov 9, 2026
Merged

TanmayS0406 merged 1 commit into
mainfrom
security-fixes-and-procedure-tuning

Conversation

@TanmayS0406

Copy link
Copy Markdown
Owner

Security (from the 8 Nov scan)

  • Installer scan "Failed": not a detection. Syft's download from GitHub releases returned HTTP 502, so the scans never ran. security.yml now retries the SBOM and Grype steps once after a pause.
  • Vulnerable libraries: pinned patched MessagePack 2.5.303 (compile-time only, ExcludeAssets="runtime", not in the VSIX) and System.Security.Cryptography.Pkcs 10.0.13; both lock files refreshed. dotnet list package --vulnerable --include-transitive is clean for both projects.
  • DS112266: the saved connection string is now DPAPI-protected with extension-specific entropy; values from earlier versions are re-protected on first load (14 checks against a temp settings folder).
  • DS162092: loopback address notes reworded / suppressed with a justification.

Feature: Tune procedures

  • New toolbar button: pick several stored procedures (plan-cache cost stats, "Slowest 5", limit 10), Claude writes <name>_Optimized copies and calls the new create_benchmark_plan MCP tool.
  • The tool opens a before/after test plan in a new query window (nothing runs until the user executes it): elapsed, CPU and logical reads per run; mean, SD, speed-up, Welch t, 95% CI; a result-equality check; runs rolled back by default; cleanup block. Copies must be named *_Optimized.
  • Generated script verified against SQL Server 2022 Express (improved, control, wrong-result, failing, non-compiling, cold-cache and re-run cases).

Not verified

  • The button inside SSMS itself (the dialog was hosted in a test window).
  • The retry steps in security.yml (YAML validated locally only; this PR's Security run is the first real test).

🤖 Generated with Claude Code

…efore/after benchmark

Security (from the 8 Nov scan):
- Pin patched MessagePack 2.5.303 (compile-time only, ExcludeAssets=runtime) and
  System.Security.Cryptography.Pkcs 10.0.13; refresh both packages.lock.json files.
- Protect the saved connection string with DPAPI entropy (DS112266); values written by
  earlier versions are re-protected on first load.
- Reword / suppress the loopback address notes (DS162092).
- security.yml: retry the Syft and Grype downloads once after a pause. The installer scan
  failed on a GitHub release download returning HTTP 502, before any scan ran.

Feature:
- "Tune procedures" button: pick several stored procedures (with plan-cache cost stats and a
  "Slowest 5" shortcut), Claude writes <name>_Optimized copies and calls the new
  create_benchmark_plan MCP tool.
- BenchmarkPlan generates a before/after test plan for a query window: elapsed, CPU and
  logical reads per run; mean, SD, speed-up, Welch t and 95% CI; a result-equality check;
  runs rolled back by default; cleanup block. Optimized copies must be named *_Optimized.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@TanmayS0406
TanmayS0406 merged commit 7936d65 into main Nov 9, 2026
10 checks passed
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.

1 participant