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.9 KiB
2.9 KiB
| status | date | last-verified | owner | source |
|---|---|---|---|---|
| accepted | 2026-10-11 | 2026-10-11 | shared | maintainer decision of 2026-10-11 |
Decision 26: Add and Remove for access and audit declare no default parameter set
- Choice:
Add-NTFSAccess,Remove-NTFSAccess,Add-NTFSAudit, andRemove-NTFSAuditdeclare noDefaultParameterSetName(maintainer, 2026-10-11;93ed2c7). An object piped with a path bindsPathSimplewhen it hasAppliesTo, andPathComplexwhen it hasInheritanceFlags,PropagationFlags, or neither (the default scope). An object that hasAppliesToand one of the flags fails withAmbiguousParameterSet, like the same named parameters. - Rationale: With
PathComplexas the default, an object that satisfied its mandatory parameters made the binder settle on it, and a pipedAppliesTowas dropped without a message (a silent change of the scope).4b1abc9had madeAppliesTomandatory in the Simple sets, so the default no longer decided any named call. - Consequence: a script that piped objects with
AppliesToand the flags together got the flags before and gets an error now; so does an object that has bothPathandSecurityDescriptor, where the path won. AnAppliesTothat is$nullfails to bind for that object (a CSV row with fewer fields than its header has$nullthere); a call with neither-Pathnor-SecurityDescriptorfails withAmbiguousParameterSetinstead of a missing-parameter error (CHANGELOG, Fixed). A value that PowerShell cannot convert to a scope (the blank cell thatImport-Csvreads, a typo) is ignored silently, and the object is handled as one withoutAppliesTo: its own flags, or the default scope when it has none. The binder swallows a value that it cannot convert, so failing loudly needs a design change (report, open item 3). Named calls,-SecurityDescriptorcalls withoutAppliesTo, andGet-NTFSAccess | Add-NTFSAccess -Pathdo not change. The syntax listsPathSimplefirst, because PowerShell orders the sets by declaration. - Follow-up: the third independent review found that
ProcessRecordwrote the scope converted fromAppliesTointo the fields behind the flag parameters, which PowerShell does not reset between piped objects. The flags of a record are locals since9783d2a; rc7 had the defect for piped-SecurityDescriptorobjects. The reviewer's checks found that "an emptyAppliesTofails to bind" was true for$nullonly (7bc7925), and that the sentence about unconvertible values was too narrow (2112ee3). - Evidence: report
Tests/Coverage/Quality-Gate-Unknowns-2026-10-10.md(decision 23; the section on the fix of the pipedAppliesTo), the tests inTests/ParameterSets.Access.Tests.ps1andTests/ParameterSets.Audit.Tests.ps1(red before, green after, in four configurations), and.memory-bank/debugging-insights.md.