Changelog¶
All notable changes to this project are documented here. The format follows Keep a Changelog and the project adheres to Semantic Versioning.
Unreleased¶
0.2.0 - 2026-06-10¶
Added¶
- Unattached rules are surfaced instead of silently dropped: rules whose
ParentPolicyNamematches no exported policy land in the view'sUnattachedRulescollection and render as a warning line in the overview, a dedicated detail section, and<unattached: name>rows in the CSV matrix. Compress-EnumCollisionnow fails loudly, naming the offending JSON fragment, when an enum-collision pair escapes the flatten patterns (previously an obscureConvertFrom-Jsonduplicated-keys crash on Windows PowerShell 5.1).tests/Inventory.Tests.ps1- coversGet-DlpInventoryagainst mocked Purview cmdlets (bulk fetch, name resolution, orphan handling, failure propagation).- Windows PowerShell 5.1 support: replaced
ConvertFrom-Json -AsHashtable(PS 6+ only) with a 5.1-safe ordered-tree deep-sort helper. Version gate and manifest floor lowered to 5.1. PSScriptAnalyzer compatibility rules added as a static safety net. ConvertTo-DlpViewinsrc/PurviewDlpRender.psm1- pure view-model builder that resolves workload tokens, mode strings, and advanced-rule confidence/instance-counts into a single presentation model shared by all three emitters.Export-DlpOverviewMarkdown- writesbaseline-YYYYMMDD-<tenant>-overview.md: a header with policy/rule counts and one Markdown table row per policy.Export-DlpDetailMarkdown- writesbaseline-YYYYMMDD-<tenant>-detail.md: a full per-policy/per-rule narrative with conditions, actions, and exceptions in plain English.Export-DlpMatrixCsv- writesbaseline-YYYYMMDD-<tenant>-matrix.csv: one row per rule, RFC-4180 quoted, for sorting and filtering in Excel.- Entrypoint now imports
PurviewDlpRender.psm1, builds the view model once, and writes all five output files (.json,.meta.json,-overview.md,-detail.md,-matrix.csv).
Changed¶
Get-DlpInventoryresolves referenced SIT/label names by bulk-fetching each catalogue once instead of one remote call per ID. A catalogue fetch failure now aborts the run; previously a transient failure was silently recorded as an orphan, changing the baseline bytes.ReferencedSits/ReferencedLabelssort byName, Idso null-named orphan references order deterministically across runs.- The JSON body and meta sidecar are written with LF line endings on every OS, matching the three rendered outputs. On Windows this changes the baseline once (CRLF to LF); re-runs are stable thereafter.
- The output filename date stamp is pinned to the invariant culture so locale calendars (e.g. Buddhist era) cannot change filenames.
Fixed¶
Expand-AdvancedRuleReferenceno longer throws under StrictMode on heterogeneousAdvancedRuleshapes (flat items with no ID, Groups labels missingName/Type); references without an ID are skipped.Format-InstanceCountno longer fabricates0-N instances/N-0 instancesfrom empty-string min/max values.
Removed¶
Export-DlpBaselineMarkdownand its private helpersFormat-RuleCondition/Format-RuleAction- superseded by the three layered emitters above.
0.1.0 - 2026-05-22¶
Initial release.
Added¶
Connect-PurviewDlpSession- interactive auth wrapper aroundConnect-IPPSSession.Get-DlpInventory- reads policies, rules, and resolves referenced SIT/label names. ParsesAdvancedRuleJSON for the canonical condition representation.ConvertTo-NormalisedBaseline- pure normalisation: strips volatile fields, sorts keys deeply, backfills SIT/label names fromAdvancedRule, annotates orphan references, flattens Purview enum-collision pairs to byte-stable JSON.Export-DlpBaselineJson- writes the JSON body plus a.meta.jsonaudit sidecar (UTF-8, no BOM).Export-DlpBaselineMarkdown- writes a per-policy/per-rule narrative Markdown summary with LF line endings.- Entrypoint script
scripts/Export-PurviewDlp.ps1with PowerShell version + module pre-flight checks and fail-closed error handling. - 47 Pester tests covering the pure pipeline against synthetic and realistic-shape fixtures.
- CI: Pester matrix across
ubuntu-latest,macos-latest,windows-latest; super-linter viaLukeEvansTech/shared-workflows.