mirror of https://github.com/raandree/NTFSSecurity
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.7 KiB
2.7 KiB
status: current
last-verified: 2026-10-10
owner: software-engineer
source: Handoff 5 (the coverage unknowns): probes, red and green runs, and the independent review
Culture-sensitive comparison (
Debugging insights
Recurring defect classes and how to find them. Evidence is in
Tests/Coverage/Quality-Gate-Unknowns-2026-10-10.md; a fix needs a test that
fails without it (Decision 16).
Culture-sensitive comparison (tr-TR)
- With
tr-TR,Iandiare different letters, so a comparison that takes the culture of the thread drops or misses items:string.Equalswithout a comparer, a case-insensitiveRegex, aWildcardPatternwithoutCultureInvariant. Handoff 5 found two defects of this class:IdentityReference2.Equals(object)called with a name (nowOrdinalIgnoreCase) andGet-ChildItem2 -Filter(index*did not listIndex.txt). - A scan of the C# is not enough: AlphaFS 2.2 builds a culture-sensitive regex
from a search pattern.
Get-ChildItem2therefore enumerates underInvariantCultureScope(around the creation of the enumerator and eachMoveNext, never across aWriteObject) and its ownWildcardPatternhasCultureInvariant. Check any new library call that takes a user pattern. - PowerShell
-eq,-contains, and-indo not take the thread culture; only the .NET method call failed. Probe a claim before it enters the changelog or a report (the first wording named-eqand was wrong). - A test sets the culture of the thread, restores it in
finally, names the rows that differ (index*,*.INI), keeps a control (INDEX*), and is proved red on the previous build and green on the new one in all four configurations (Tests/ItemCmdlets.Tests.ps1,Tests/ObjectApis.Tests.ps1).
A test oracle that is wrong on a domain member
Get-Acl -Auditreads the SACL with the other sections and reports an item without audit entries as protected (Windows Server 2019, 2022, and 2025 domain members, Windows 11); the module andGet-NTFSInheritanceread the SACL alone. Tests read the flag with .NETGetAccessControl(Audit)(Get-TestAuditAcl). A suite that is green on the host proves nothing about an oracle: run a new test on a domain member before calling it done.
A piped property and the parameter set
- An object with a property
AppliesTo, piped intoAdd-orRemove-NTFSAccessor-NTFSAuditwith a path, binds the defaultPathComplexset and drops the property; with a descriptor it bindsSDSimple. A test that means the Simple set names-AppliesToand asserts the scope it gets (a probe that tells the sets uses an entry of the default scope: removingThisFolderOnlyfrom it leaves theInheritOnlypart).