Skip to content

Fix summary for Folder Scan output. Bug with "Policy-relevant binarie…#536

Open
chlaplan wants to merge 1 commit into
MicrosoftDocs:mainfrom
chlaplan:Fix-Folder-Scan-Summary
Open

Fix summary for Folder Scan output. Bug with "Policy-relevant binarie…#536
chlaplan wants to merge 1 commit into
MicrosoftDocs:mainfrom
chlaplan:Fix-Folder-Scan-Summary

Conversation

@chlaplan

Copy link
Copy Markdown
Contributor

#535

This pull request significantly improves the accuracy and diagnostic value of folder scan reporting in the WDAC Policy Wizard. The main enhancements include more precise counting of policy-relevant binaries, detailed classification and logging of hash rule "flavors" emitted per binary, and improved terminology for duplicate hashes. These changes help clarify the relationship between scanned files and generated hash rules, making it easier to diagnose issues and understand policy outputs.

Scan statistics and reporting improvements:

  • The calculation of "policy-relevant files" now counts unique binaries (using parsed FriendlyName values) rather than simply counting hash rules, providing a more accurate representation of distinct files scanned. [1] [2]
  • The summary label for duplicate hashes has been clarified to "Duplicate hashes (collisions)" to better reflect its meaning. [1] [2]

Hash rule flavor analysis and logging:

  • Introduced logic to parse and classify the "flavor" of each hash rule (e.g., "Hash Sha1", "Hash Page Sha256") from the rule's FriendlyName, with robust handling for future variations. [1] [2]
  • Added a detailed breakdown log that groups scanned binaries by their unique set of hash flavors and indicates when multiple rules of the same flavor are emitted for a single binary. This log is written for diagnostics but not shown in the UI. [1] [2]

Code structure and maintainability:

  • Refactored and encapsulated the flavor extraction, normalization, and logging logic within the FolderScanStats class, improving code clarity and maintainability.

Dependency and import updates:

  • Added System.Linq and System.Text.RegularExpressions imports to support new logic for flavor parsing and breakdown reporting.

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