Skip to content

Trusted Baseline Onboarding & Package Trust Support - #14

Merged
Hefaistos68 merged 2 commits into
masterfrom
feature/onboarding
Jun 14, 2026
Merged

Hefaistos68 merged 2 commits into
masterfrom
feature/onboarding

Conversation

@Hefaistos68

Copy link
Copy Markdown
Owner

Adds onboarding workflow to both VS and VS Code extensions, providing reputation-based trust suggestions for NuGet packages and signers. Implements onboarding dialogs, new UI for managing package trusts, and core support for package-level trust decisions via directory hash. Updates scan flows to prompt onboarding for new solutions, adds configuration options, and documents the new features. Includes extensive unit tests and refactors trust management logic for clarity and maintainability.

Also fixes #13

Adds onboarding workflow to both VS and VS Code extensions, providing reputation-based trust suggestions for NuGet packages and signers. Implements onboarding dialogs, new UI for managing package trusts, and core support for package-level trust decisions via directory hash. Updates scan flows to prompt onboarding for new solutions, adds configuration options, and documents the new features. Includes extensive unit tests and refactors trust management logic for clarity and maintainability.
Copilot AI review requested due to automatic review settings June 13, 2026 21:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a “Trusted Baseline Onboarding” workflow across the Visual Studio and VS Code extensions and adds package-level trust (NuGet package directory hash) alongside existing finding/assembly/signer trust, while also addressing issue #13 by making build enforcement project-aware.

Changes:

  • Add onboarding suggestion retrieval and implement NuGet reputation + signature–based trust suggestions (including opt-in handling for unverified packages).
  • Add package-level trust decisions (directory hash) and integrate package trust into trust evaluation and UI workflows.
  • Update build enforcement flows (VS + VS Code) to evaluate findings per-project to ensure build-breaking triggers for the actual project being built.

Reviewed changes

Copilot reviewed 78 out of 79 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
README.md Documents the new onboarding workflow and links VS Code docs.
MSBuildGuard.Worker/WorkerProcessor.cs Adds onboarding suggestions RPC, noscan bypass, package trust add, and package trust evaluation.
MSBuildGuard.Worker/ProtocolModels.cs Adds worker protocol method constant for onboarding suggestions.
MSBuildGuard.Worker.Tests/WorkerProcessorTests.cs Adds tests for onboarding invalid path and noscan marker behavior.
MSBuildGuard.VSCode/src/views/trustStoreView.ts Adds UI rendering/styling for package trust entries in the trust store view.
MSBuildGuard.VSCode/src/views/securityReviewView.ts Adds “Trust NuGet Package” action and worker call wiring for package scope.
MSBuildGuard.VSCode/src/services/workerClient.ts Adds worker client API for onboarding suggestions retrieval.
MSBuildGuard.VSCode/src/services/buildEnforcer.ts Implements project-aware filtering of findings to fix enforcement gaps (issue #13).
MSBuildGuard.VSCode/src/extension.ts Triggers onboarding panel for new solutions based on trust/baseline presence and config.
MSBuildGuard.VSCode/README.md Documents onboarding UX and new VS Code setting.
MSBuildGuard.VSCode/package.json Adds enableBaselineOnboarding setting and bumps extension version.
MSBuildGuard.VSCode/package-lock.json Updates lockfile (but currently version fields don’t match package.json).
MSBuildGuard.VisualStudio/ToolWindows/TrustPackageDialog.xaml.cs Adds dialog logic to compute/display package directory hash and capture trust metadata.
MSBuildGuard.VisualStudio/ToolWindows/TrustPackageDialog.xaml Adds WPF dialog UI for package trust confirmation.
MSBuildGuard.VisualStudio/ToolWindows/SolutionSecurityReviewViewModel.cs Adds package trust scope reporting and adds risk level display per project option.
MSBuildGuard.VisualStudio/ToolWindows/SolutionSecurityReviewControl.xaml.cs Adds handler for “Trust NuGet Package” context menu and improves XML docs.
MSBuildGuard.VisualStudio/ToolWindows/SolutionSecurityReviewControl.xaml Adds project risk indicator UI and package trust context menu entry.
MSBuildGuard.VisualStudio/ToolWindows/PolicyEditorControl.xaml.cs Improves XML documentation for async save and navigation.
MSBuildGuard.VisualStudio/ToolWindows/ManageSignerTrustsHelper.cs Adds helper for managing signer trusts (new dialog backend).
MSBuildGuard.VisualStudio/ToolWindows/ManagePackageTrustsHelper.cs Adds helper for managing package trusts (new dialog backend).
MSBuildGuard.VisualStudio/ToolWindows/ManagePackageTrustsDialog.xaml.cs Adds UI logic for managing package trusts (add/remove/move/save).
MSBuildGuard.VisualStudio/ToolWindows/ManagePackageTrustsDialog.xaml Adds WPF dialog UI for managing package trusts.
MSBuildGuard.VisualStudio/ToolWindows/BuildBlockDialogViewModel.cs Refactors build-block evaluation; adds per-project filtering and package trust handling.
MSBuildGuard.VisualStudio/ToolWindows/BuildBlockDialog.xaml.cs Adds XML docs for dialog button handlers.
MSBuildGuard.VisualStudio/ToolWindows/BuildBlockDialog.xaml Adds red border styling and refactors layout structure.
MSBuildGuard.VisualStudio/ToolWindows/BaselineOnboardingViewModel.cs Adds onboarding view model for displaying and selecting trust suggestions.
MSBuildGuard.VisualStudio/ToolWindows/BaselineOnboardingDialog.xaml.cs Adds onboarding dialog shell and apply/skip handling.
MSBuildGuard.VisualStudio/ToolWindows/BaselineOnboardingDialog.xaml Adds onboarding dialog UI for suggestions and setup options.
MSBuildGuard.VisualStudio/source.extension.vsixmanifest Bumps VSIX version.
MSBuildGuard.VisualStudio/Services/VisualStudioUiFeedbackService.cs Adds XML docs and clarifies disposal/output pane behavior.
MSBuildGuard.VisualStudio/Services/VisualStudioTrustDecisionService.cs Adds TrustPackageAsync and trust store path resolution for package scope.
MSBuildGuard.VisualStudio/Services/VisualStudioScannerService.cs Adds noscan marker bypass for solution scanning and improves docs.
MSBuildGuard.VisualStudio/Services/ThemeHelper.cs Adds XML docs for DWM theming helper.
MSBuildGuard.VisualStudio/Services/StatusBarInjector.cs Adds XML docs and clarifies retry behavior.
MSBuildGuard.VisualStudio/Services/SolutionMonitorService.cs Improves scan gating logic and adds XML docs; adjusts rescan behavior.
MSBuildGuard.VisualStudio/Services/ShieldStatusBarControl.Support.cs Adds XML docs for security level enum values.
MSBuildGuard.VisualStudio/Services/ShieldStatusBarControl.cs Adds XML docs for security level derivation and click handler.
MSBuildGuard.VisualStudio/Services/PolicyStatusService.cs Adds XML docs for project path detection.
MSBuildGuard.VisualStudio/Services/PathRedactionService.cs Adds XML docs and clarifies redaction helpers.
MSBuildGuard.VisualStudio/Services/GitIgnoreTrustSharingService.cs Adds XML docs for managed .gitignore entries.
MSBuildGuard.VisualStudio/Services/BuildEnforcementService.cs Implements per-project build enforcement path (IVsUpdateSolutionEvents2) to address issue #13.
MSBuildGuard.VisualStudio/PackageIds.cs Adds command ID for managing package trusts.
MSBuildGuard.VisualStudio/Options/UnifiedSettingsOptionsProvider.cs Adds settings snapshot support for onboarding enablement.
MSBuildGuard.VisualStudio/Options/SettingsNames.cs Adds settings key metadata for onboarding option.
MSBuildGuard.VisualStudio/Options/MSBuildGuardOptionsSnapshot.cs Adds onboarding option to settings snapshot model.
MSBuildGuard.VisualStudio/Options/MSBuildGuardOptionsPage.cs Adds onboarding option to VS options UI.
MSBuildGuard.VisualStudio/MSBuildGuard.VisualStudio.csproj Adjusts DeployExtension behavior based on MSBuild runtime; bumps version.
MSBuildGuard.VisualStudio/Models/SolutionProjectOptionViewModel.cs Adds per-project risk level property.
MSBuildGuard.VisualStudio/Models/ScanSummaryViewModel.cs Adds XML docs for property change helpers.
MSBuildGuard.VisualStudio/Models/FindingViewModel.cs Adds CanTrustPackage capability flag.
MSBuildGuard.VisualStudio/Menus.vsct Adds “Manage Package Trusts…” command and symbol.
MSBuildGuard.VisualStudio/Commands/TrustCurrentProjectVersionCommand.cs Adds XML docs for query status handler.
MSBuildGuard.VisualStudio/Commands/ScanSolutionCommand.cs Adds XML docs for query status handler.
MSBuildGuard.VisualStudio/Commands/OpenSolutionSecurityReviewCommand.cs Adds XML docs and clarifies execution flow.
MSBuildGuard.VisualStudio/Commands/ManageSignerTrustsCommand.cs Adds XML docs for query status handler.
MSBuildGuard.VisualStudio/Commands/ManagePackageTrustsCommand.cs Adds new command to open Manage Package Trusts dialog.
MSBuildGuard.VisualStudio/Commands/ManageAssemblyTrustsCommand.cs Adds XML docs for query status handler.
MSBuildGuard.VisualStudio/Commands/EditPolicyCommand.cs Adds XML docs for query status handler.
MSBuildGuard.VisualStudio/Commands/CreateBaselineCommand.cs Adds XML docs for baseline workflow.
MSBuildGuard.VisualStudio.Tests/ToolWindows/ManageSignerTrustsHelperTests.cs Adds unit tests for signer trust helper.
MSBuildGuard.VisualStudio.Tests/ToolWindows/ManagePackageTrustsHelperTests.cs Adds unit tests for package trust helper.
MSBuildGuard.VisualStudio.Tests/ToolWindows/ManageAssemblyTrustsHelperTests.cs Adds unit tests for assembly trust helper.
MSBuildGuard.VisualStudio.Tests/ToolWindows/BaselineOnboardingViewModelTests.cs Adds unit tests for onboarding view model defaults/notifications.
MSBuildGuard.VisualStudio.Tests/MSBuildGuard.VisualStudio.Tests.csproj Adds new Visual Studio tests project.
MSBuildGuard.Core/Trust/TrustStoreService.cs Adds package trust persistence, package approval check, and directory hash computation.
MSBuildGuard.Core/Trust/TrustStoreModels.cs Adds Package trust scope kind.
MSBuildGuard.Core/MSBuildGuard.Core.csproj Bumps core version.
MSBuildGuard.Core/Baseline/NugetReputationService.cs Adds NuGet.org reputation lookup service.
MSBuildGuard.Core/Baseline/BaselineOnboardingService.cs Adds onboarding suggestion generation logic (reputation + signature analysis).
MSBuildGuard.Core.Tests/Trust/TrustStoreServiceTests.cs Adds tests for package directory hashing and package approval checks.
MSBuildGuard.Core.Tests/Baseline/NugetReputationServiceTests.cs Adds tests for NuGet reputation service (currently live-network dependent).
MSBuildGuard.Core.Tests/Baseline/BaselineOnboardingServiceTests.cs Adds tests for onboarding suggestion generation (currently environment/network dependent).
MSBuildGuard-public.slnx Adds Visual Studio tests project to solution.
documentation/VisualStudioExtension.md Documents onboarding workflow and new onboarding setting for VS extension.
Files not reviewed (1)
  • MSBuildGuard.VSCode/package-lock.json: Generated file

Comment thread MSBuildGuard.VSCode/package-lock.json
Comment thread MSBuildGuard.VSCode/package-lock.json
Comment thread MSBuildGuard.VSCode/src/services/buildEnforcer.ts
Comment thread MSBuildGuard.VisualStudio/ToolWindows/BuildBlockDialogViewModel.cs
Comment thread MSBuildGuard.VisualStudio/ToolWindows/BuildBlockDialog.xaml
Comment thread MSBuildGuard.Core.Tests/Baseline/NugetReputationServiceTests.cs
Comment thread MSBuildGuard.Core.Tests/Baseline/BaselineOnboardingServiceTests.cs
Comment thread MSBuildGuard.Core.Tests/Baseline/BaselineOnboardingServiceTests.cs
Comment thread MSBuildGuard.Worker/WorkerProcessor.cs
- Replace README.md with detailed VScodeExtension.md
- Add onboarding dialog docs and screenshots
- Bump extension version to 0.0.5 in package files
- Mark internet-dependent tests as [Explicit]
- Add package directory hash caching in TrustStoreService
- Improve BuildEnforcer argument parsing for quotes
- Fix relative path resolution in Visual Studio integration
- Update/add binary images for documentation
- Minor test assertion and documentation improvements
@Hefaistos68
Hefaistos68 merged commit fae05d9 into master Jun 14, 2026
1 check passed
@Hefaistos68
Hefaistos68 deleted the feature/onboarding branch June 14, 2026 12:41
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.

[BUG] Buildbreaker does not activate when a dependency project is safe but the depent is not.

2 participants