Skip to content

feat: one tenant read for several -Baseline, and documents show every configured setting (1.1.0) - #54

Merged
royklo merged 8 commits into
mainfrom
fix/doc-readability
Nov 16, 2026
Merged

royklo merged 8 commits into
mainfrom
fix/doc-readability

Conversation

@royklo

@royklo royklo commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Summary of changes

Release 1.1.0. Found by reading every per-baseline document of the inforcer Blueprint Library, and checked against that tenant.

Feature: several baselines, one tenant read

Export-InforcerTenantDocumentation -Baseline now takes several baselines. The policy list is the slow call (20 to 40 s on this tenant), and each -Baseline call used to repeat it. A baseline's membership takes a fraction of a second.

  • Measured: 22 Blueprint baselines in 48 s, against about 34 min before. The policy counts per baseline are unchanged.
  • Output: one DocModel per baseline, or one {TenantName}-{Baseline}-Documentation file per baseline. A single baseline keeps its old file name.
  • Errors: a baseline that does not resolve is BaselineFilterFailed, and the others are still exported. A file -OutputPath with several baselines is refused.
  • Graph names and the Settings Catalog are resolved once for all of them.

Bug fixes

What the document showed Cause Now
Change Response's only policy (passkey migration opt-out) had no settings. CA device filter rules and guest types were empty. Objects deeper than two levels fell through to ToString(), which is empty for a PSCustomObject. Rendered. The depth limit is 10, as a recursion guard only.
"Users may register their devices" had no settings. The setting is stored as azureADRegistration.allowedToRegister.@odata.type, and all @odata keys were skipped. "Allowed To Register = All Device Registration Membership". Other @odata keys are still skipped.
"Include Targets: 1 items", and nothing under it. Items without a name were dropped, and item fields were never shown. "Item 1", "Target Type = group", "ID = all_users". An id is never a label, so Graph resolution can still reach it.
"…Push, password, Software OATH Token, password…" Combination items such as password,softwareOath were joined with commas and split again. "Password + Software OATH Token; Password + Microsoft Authenticator".

Testing

  • Tests/Fix.DocReadability.Tests.ps1: 14 tests. On main, 12 fail for the reason they name; the other 2 guard existing behaviour.
  • Full suite: 863 passed, 1 failed. The failure is the environment-dependent Settings Catalog test, which fails identically on main.
  • PSScriptAnalyzer: 199 findings, the same as main. Test-AllCmdlets.ps1: 21/21.
  • Live (UK, Blueprint Library): 22 baselines in one call, 48 s. Counts per baseline match the single-baseline exports. Data Governance (E5) gives BaselineFilterFailed and the rest continue. Change Response shows "Passkey Dynamic Migration = True".

After merge

Run Publish PowerShell Module in Powershell-Module-Automation (it tags v1.1.0 and creates the release).

Related issue

None.

🤖 Generated with Claude Code

… configured setting

Export-InforcerTenantDocumentation -Baseline takes several baselines and reads
the tenant once; 22 Blueprint baselines took 48 s instead of about 34 min.

Readability fixes, found by reading every per-baseline document of the inforcer
Blueprint Library:
- settings nested more than two objects deep rendered as empty rows (CA device
  filter rules, guest user types, passkey migration opt-out);
- a dotted @odata.type setting was dropped (Entra device registration);
- list items showed only "N items" (authentication method Include Targets);
- authentication strength combinations were split into single methods.

Release 1.1.0 (MINOR: new capability). Tests: Fix.DocReadability.Tests.ps1, 14
tests; 12 fail on main for the reason they name, 2 guard existing behaviour.
Full suite 863 passed, 1 environment-dependent failure also on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 16, 2026 16:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Baseline filename collisions can silently overwrite exported documents, while setting conversion and nested-item handling can alter configuration values or omit data and identifying context.

4 open issues
What changed in this PR

This PR prepares InforcerCommunity 1.1.0 with faster multi-baseline documentation exports and improved rendering of policy settings.

Changes:

  • Accept multiple baselines while sharing tenant collection, Graph enrichment and Settings Catalog loading, producing a separate document for each baseline.
  • Expand nested-setting and list-item rendering, preserve dotted @odata.type settings, and format authentication-strength combinations.
  • Add regression tests and update release metadata and cmdlet documentation.
File Description
Tests/​Fix.DocReadability.Tests.ps1 Adds setting-readability and multi-baseline export tests.
module/​Public/​Export-InforcerTenantDocumentation.ps1 Shares tenant data across baseline exports and adds per-baseline output handling.
module/​Private/​ConvertTo-InforcerSettingRows.ps1 Expands nested settings, list fields and dotted-type handling.
module/​Private/​ConvertTo-InforcerDocModel.ps1 Adds semicolon-separated authentication-combination formatting.
module/​InforcerCommunity.psd1 Updates the module version and release notes to 1.1.0.
docs/​CMDLET-REFERENCE.md Documents the multi-value Baseline parameter and export behavior.
CHANGELOG.md Records the 1.1.0 feature and readability fixes.

Review effort: Balanced

- Authentication combinations are resolved only on Allowed Combinations. Any
  value with a semicolon was rewritten, so a Chrome extension list or a script
  holding ";" and a method name ("sms") was changed in the document.
- Baselines whose names make the same file name (Tier 1, Tier-1) get their own
  file instead of overwriting each other.
- A list and an item label with fields under it are headers (IsConfigured
  $false), so comparisons keep them in the setting path, and the module's HTML
  shows an empty header instead of hiding it as an empty setting. A name-only
  item stays a setting.
- Objects and lists nested inside a list item are rendered (a passkey
  profile's Key Restrictions).

Each fix has a test that fails without it. Full suite 868 passed, 1
environment-dependent failure also on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 16, 2026 16:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

List-item scalar fields bypass guarded decoding, exposing base64 content, while shared dotted-parent deduplication drops headers and creates false comparison differences when items are reordered.

2 open issues
4 resolved since last review

Review effort: Balanced

- List item fields go through ConvertTo-FlatSettingRows like any setting, so an
  encoded payload or script inside an item is decoded and marked as code. The
  item's id (when it has no label) and description are added explicitly, since
  the renderer skips both as policy metadata; empty fields and app version
  hashes no longer render.
- Dotted-parent deduplication is per object instead of per policy, so two list
  items with the same dotted keys each keep the parent row in their path.

Checked over all 293 policies of the Blueprint Library: no configured value is
lost, only empty rows and MAM app version hashes. Full suite 871 passed, 1
environment-dependent failure also on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 16, 2026 16:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

List-item preprocessing removes dotted @odata.type settings before the recursive renderer can preserve them, causing configured settings to be lost.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Preserve dotted @​odata.type settings in list items

module/​Private/​ConvertTo-InforcerSettingRows.ps1:341

This removes dotted @odata.type settings from list items before the recursive renderer can apply the new exception at lines 263–265. For example, an item containing azureADRegistration.allowedToRegister.@odata.type still loses that configured setting entirely. Let the recursive renderer filter OData metadata so the dotted-setting exception works inside items as well.

2 resolved since last review

Review effort: Balanced

Copilot's verdict on 82c0e7e: the list-item path dropped every @OData key
before the renderer saw it, so a dotted @odata.type setting (the shape this PR
makes visible at policy level) was still lost inside an item. The renderer
already keeps that shape and skips the rest; the item path now leaves @OData
keys to it. No change on the Blueprint Library's 293 policies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 16, 2026 17:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

A minor release-note metadata finding was omitted from the published review, so human assessment is needed to determine its significance.

No open issues 🎉

Review effort: Balanced

Headers stay visible in the HTML, list item objects/payloads/descriptions,
list headers in Compare paths, and the -2 suffix for colliding file names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 16, 2026 17:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Human assessment is needed because a blank baseline entry can bypass filtering and unexpectedly export the entire tenant.

No open issues 🎉

Review effort: Balanced

Copilot's verdict on f24f541: -Baseline 'A', '' ran the blank entry without a
filter and wrote a whole-tenant document beside A. Blank entries are skipped;
only an omitted or all-blank -Baseline documents the whole tenant, as before.
The test failed before the fix (3 documents for 1 baseline).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 16, 2026 17:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Human assessment is needed to weigh a minor module release-note metadata finding that was omitted from the published review.

No open issues 🎉

Review effort: Balanced

…ne row again

Red/blue/green on #54. Defender's custom indicators (492 Shadow AI domains)
repeated twelve identical fields per domain: one policy went from 495 to
8,400 rows (Markdown 17 KB to 358 KB). A top-level field with the same value
on every item now shows once under 'All items', and a field repeating the
item's label is left out: 1,983 rows, 89 KB. A MAM app labelled from
mobileAppIdentifier no longer repeats its package id under itself.

Mutation testing found four behaviours nothing asserted (empty item fields
dropped, empty unlabelled items skipped, unknown combination methods joined
with +, HTML header left blank); the tests now cover them. 41/41 mutations
caught.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 16, 2026 19:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Shared-field hoisting causes false additions and removals in environment comparisons and can incorrectly show settings as applying to items that lack them.

2 open issues

Review effort: Balanced

…er-item fields

Copilot on 05f0729. An item without the field was left out of the
intersection, so All items could claim Block for an item that does not
block; every entry now takes part, and a list with a name/value item is
never hoisted. Compare-InforcerEnvironments builds its models with
-ComparisonMode, which now reaches ConvertTo-FlatSettingRows and keeps each
item's fields under it: with hoisting, one changed item moved the shared
fields of the others and turned unchanged items into additions and removals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 16, 2026 19:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Human assessment is needed because row filtering, hoisting, and compaction can hide configured items and produce spurious comparison changes.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@royklo
royklo merged commit 6b4a50f into main Nov 16, 2026
4 checks passed
@royklo
royklo deleted the fix/doc-readability branch November 16, 2026 19:44
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