mirror of https://github.com/raandree/NTFSSecurity
Tree:
7535c0865e
master
4.2.6
4.2.4
4.2.3
5.0.0-rc9
5.0.0-rc8
5.0.0-rc7
5.0.0-rc6
5.0.0-rc5
5.0.0-rc4
5.0.0-rc3
5.0.0-rc2
5.0.0-rc1
${ noResults }
3 Commits (7535c0865ec67fd6f3978872bbc695734dafee84)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
404cecad33 |
test(inheritance): close budget gaps for no-op, OpenError category, and unchanged-section pins
Adds 15 It blocks (25 instances, Tests\ParameterSets.Inheritance.Tests.ps1) closing the budget items of worklist-inheritance.md rows 1-16: - The documented no-op / current-location behavior without -Path, pinned with Push-Location into a dedicated sandbox folder, for Disable/Enable-NTFSAccessInheritance, Disable/Enable- NTFSAuditInheritance, Set-NTFSInheritance, Get-NTFSOwner, Set-NTFSOwner, and Get-NTFSSecurityDescriptor. - The OpenError category for a path that does not exist, for Disable/Enable-NTFSAccessInheritance and Set-NTFSInheritance. - Owner unchanged after Disable-NTFSAccessInheritance -SecurityDescriptor protects the DACL; an independent Get-Acl -Audit oracle for Set-NTFSInheritance; the -RemoveInheritedAuditRules / -RemoveExplicitAuditRules switches on a -SecurityDescriptor with the owner and DACL confirmed unchanged after the write. - The Name property and a DACL protected without the module for Get-NTFSInheritance (-Path and -SecurityDescriptor); Get-NTFSOwner on a descriptor read without its Owner section; the SACL unchanged after Set-NTFSOwner changes the owner; the DACL unchanged and the -PassThru type for Set-NTFSOwner -SecurityDescriptor. - The by-property-name pipeline and the category/target of the -PassThru ReadSecurityError for Set-NTFSSecurityDescriptor. Every assertion reads state with an independent .NET oracle (Get-Acl, Get-Acl -Audit) or asserts an ErrorId/category/target triple; none repeats an existing test. Items marked Limit, would-pin, or lab in the worklist are out of scope and untouched. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: AI Assistant <ai@example.com> |
2 weeks ago |
|
|
f1f3d8f078 |
test(inheritance): read the SACL alone where a test asserts the audit protection flag
Get-Acl -Audit reads the SACL together with the other sections. On a domain member (Windows Server 2019, 2022, and 2025 of the operating-system matrix) that read reports the SACL of an item without audit entries as protected from inheritance, where the read of the SACL alone and Get-NTFSInheritance report it as not protected (FileSystemSecurity2 documents the same difference). The test 'Disable-NTFSAuditInheritance -SecurityDescriptor should take two piped descriptors ...' asserted the on-disk flag of a fresh file with Get-Acl -Audit, and failed in all six elevated configurations of the three file servers. Diagnostic runs on 2019 and 2025 show both reads side by side. Four more assertions read the flag of an item that ends without audit entries and expect "protected"; there they could not tell a written flag from none. The five assertions now read the SACL alone through .NET, as the module does. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: AI Assistant <ai@example.com> |
3 weeks ago |
|
|
35a929ac66 |
test(inheritance): assert the parameter sets that the judged matrix found untested
Close the TestNeeded gaps of judged-inheritance.csv for the inheritance, owner, and security-descriptor cmdlets (Disable/Enable-NTFSAccessInheritance, Disable/Enable-NTFSAuditInheritance, Get/Set-NTFSInheritance, Get/Set-NTFSOwner, Get-NTFSSecurityDescriptor) in one new file, Tests\ParameterSets.Inheritance.Tests.ps1. 20 new It blocks (48 data rows) assert, in the matrix's priority order: - State: independent Get-Acl/Get-Acl -Audit oracles for access and audit inheritance transitions, the -RemoveInherited/-RemoveExplicit switches with a -SecurityDescriptor, Set-NTFSInheritance setting both flags in one call, and Set-NTFSOwner leaving the Access entries and group unchanged. - Error: ErrorId/category/target triples for a denied write, a missing path, a denied read, and a refused owner, each continuing to the next item; RestoreOwnerError for the three Path cmdlets that protect or set access inheritance, which had none before. - Pipeline: every -Path and -SecurityDescriptor set that no existing test piped, including the direct, named Get-NTFSOwner -SecurityDescriptor call the scan could not classify, and the documented Set-NTFSInheritance round trip. No existing test file, helper, or production source changed. Validated test-first (each new assertion checked for a real, failable precondition) and proven with 10 one-statement C# mutations in a separate, discarded worktree: 9 detected, 1 honestly undetected (ValueFromPipelineByPropertyName alone still binds Get-ChildItem2 output through its native FullName property, so removing ValueFromPipeline from -Path is invisible to an object-only pipeline test). All four configurations (elevated/basic user x Windows PowerShell 5.1/PowerShell 7) pass with zero failures; audit- and Restore-privilege-dependent rows skip in basic user and run elevated. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: AI Assistant <ai@example.com> |
3 weeks ago |