Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Up to standards ✅🟢 Issues
|
Attribute reviewAttribute review: 42 tests need review, more than the limit of 25 for one run. Split the change, or ask a maintainer to review the attributes and apply the attribute-review-override label. |
|
In |
earbona23
left a comment
There was a problem hiding this comment.
This is the largest change open on the repository right now — 563 files, net about 10,600 lines removed — so I measured its shape before reading any of it, and there is one number I think needs answering before it merges.
Disclosure first: this PR rewrites tests/ad/domain/Test.AD-FOR-03.ps1, which is the subject of my own open #2699. I am an interested party on that one file, and I have put that part last and framed it as a decision for a maintainer rather than a request.
What it does, measured
AD check files under tests/ad: 270 on main -> 180 here
check IDs removed: 90
check IDs added: 0
Maester.LegacyTags.json: +559 / -194
Maester.LegacyIds.json: untouched
Maester.LegacyIds.json being untouched is correct, and I checked rather than assumed: it contains zero AD-* IDs, on main and here, so removing AD checks is not a trigger for Export-MtLegacyIdTable.ps1 and LegacyIds.Tests.ps1 has nothing to say about it. I had this down as a likely problem and it is not one.
The crosswalk is the right idea, and it covers a quarter of the removals
Where you do it, you do it properly. Test.AD-FOR-03.md:
AD-CFG-01 was consolidated into this check. […] Former AD-CFG-01 is covered here. The single primary
Featureremainsdirectory-configuration; forest context is linked through AD-FOR-01 and AD-FOR-04 rather than a second feature.
and the same crosswalk repeated in the result text itself, where an operator reading a report will see it. That makes a consolidation auditable, which is exactly what a 90-check removal needs.
But of the 90 removed IDs, only 23 are mentioned anywhere under tests/ad/ in this branch. 67 are removed with no note in any surviving check, including:
AD-CFG-14 AD-CFG-16 AD-CFG-17 AD-CFG-18 AD-CFG-19 AD-CFG-24
AD-COMP-09 AD-COMP-10 AD-DACL-04 AD-DACL-06 AD-DACL-08 AD-DACL-10
AD-DACL-12 AD-DACL-16 AD-DACL-18 AD-DC-06 AD-DC-08 AD-DCD-02 …
To be precise about what that does and does not mean: it is a statement about auditability, not about lost coverage. I spot-checked AD-DACL-08 ("DACL ACE distribution per identity should be investigated") and the branch still carries GenericAll / WriteDacl / WriteOwner logic in two files, so DACL coverage plainly survives in some form — I just cannot tell from the diff whether that particular inventory did. Neither can anyone else, and that is the problem with 67 of them: a reviewer cannot distinguish "folded into the family above" from "dropped as redundant" without re-deriving each one.
You already have the mechanism. Extending the crosswalk line to the other 67 — even as a single table in one place rather than per check — turns a 563-file diff from an act of faith into something a maintainer can approve in an afternoon. It is also what a user upgrading needs: an ID that disappears without a trace is a silent gap in whatever they had pinned to it.
Coordination: this conflicts with five other open PRs
#2734 <-> #2783 conflict (3 files) #2734 <-> #2785 conflict (1 file)
#2734 <-> #2784 conflict (1 file) #2734 <-> #2786 conflict (2 files)
#2734 <-> #2699 conflict (Test.AD-FOR-03.ps1)
And those four also conflict with each other (matrix on #2783). Five open PRs in tests/ad that pairwise collide is a scheduling decision for a maintainer, not something any one author can fix — but this PR is the one that should land first or last, never in the middle, because it is the one that moves 563 files.
The AD-FOR-03 collision is a decision, not a rebase
Two open PRs make opposite choices about the same check:
- this one: "It always reports Investigate when that inventory is available; advisory comparison does not create a retention pass/fail threshold."
- my #2699:
$testResult = $null -ne $tombstoneLifetime— a pass only when the forest actually returned a lifetime, and an explicit "not set" row when it did not, which is what #2468 was about for this check.
Both are defensible. They are not compatible, and whichever merges second silently replaces the other's model with no conflict marker in the result anyone reads. @merill has reviewed mine and asked for a narrower change, so there is a maintainer view in flight already.
I am not asking you to adopt mine. I am asking that this one file be settled deliberately — if the consolidation's "always Investigate" is the intended end state for AD-FOR-03, say so and I will close #2699 and move the $null handling into whatever shape this check ends up with. What I would rather avoid is finding out which model shipped by reading the merge order.
One thing I filed an hour ago that this PR touches
#2796: no check under tests/ad/ escapes directory data in its result markdown — 0 of 270, with 77 putting a name-like attribute into a table row. This PR rewrites most of that surface, so it is either the cheapest moment to fix the class or the moment that makes the sweep conflict with everything. Your call which, but worth knowing it exists before the rebase.
|
Heads-up: #2812 builds on this PR’s certificate inventory/parser to add offline NTAuth CA certificate-path validation. It is blocked on this PR merging and will be rebased afterward. No additional changes are requested here. |
Important
Draft: this is the first AD consolidation and correctness batch. Another set of AD test updates and live AD testing will follow. This is not a request to merge during the Maester 3.0 code freeze.
📑 Description
Consolidate overlapping Active Directory count/detail checks and correct misleading assessment outcomes, incomplete-data handling, collection gaps, and remediation guidance.
Changes
KeyInventoryReadAccessConfirmed(defaultfalse). Do not recommend provisioning another key from an unconfirmed partial inventory.Compatibility and scope
-ExcludeTag AD-GPOREP-19now excludes Critical AD-GPOREP-17, including both password checks. Upgrade guidance calls out the need to audit exclusions.Get-MtADGpoStatemetadata/report collection is represented by null fields, not an empty inventory. Custom tests must distinguish these cases. No new public command is exported.✅ Checks
/powershell/tests/pester.ps1locally.Validation
ℹ️ Additional Information
Pending before ready-for-review
TRUST-06 remains Investigate: safe LDAP does not provide a reliable last successful trust-validation timestamp. It does not substitute
whenChangedor retrieve protected trust authentication secrets. KDS visibility confirmation is an operator-attested prerequisite, not an automatic effective-permission probe.Offline passing tests are not evidence of live tenant behavior. No live AD validation or successful post-remediation Opus approval is claimed. The external Anthropic attribute-review workflow has not been run locally.