File tree Expand file tree Collapse file tree 4 files changed +18
-1
lines changed
templates/AppLockerProject Expand file tree Collapse file tree 4 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -17,5 +17,5 @@ foreach ($policy in (Get-ChildItem -Path (Join-Path -Path $OutputPath -ChildPath
17
17
18
18
$policyFound = $searcher.FindOne ()
19
19
20
- Set-AppLockerPolicy - XmlPolicy ( Get-Content - Path $policy.FullName ) - Ldap $policyFound.Path
20
+ Set-AppLockerPolicy - XmlPolicy $policy.FullName - Ldap $policyFound.Path
21
21
}
Original file line number Diff line number Diff line change @@ -44,4 +44,5 @@ RuleCollections:
44
44
- Name : Prohibit PowerShell 2 unsigned JIT
45
45
Description : Explicitly deny signed DLLs needed for PowerShell v2
46
46
Action : Deny
47
+ UserOrGroupSid : S-1-1-0
47
48
Path : ' %WINDIR%\assembly\NativeImages_v2.0.50727_32\System.Management.A#\*'
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ RuleCollections:
16
16
LowSection : " *"
17
17
HighSection : 9.9.9.9
18
18
- Name : Prohibit PowerShell 2 unsigned JIT
19
+ UserOrGroupSid : S-1-1-0
19
20
Description : Explicitly deny signed DLLs needed for PowerShell v2
20
21
Action : Deny
21
22
Path : ' %WINDIR%\assembly\NativeImages_v2.0.50727_32\System.Management.A#\*'
Original file line number Diff line number Diff line change
1
+ BeforeDiscovery {
2
+ if (Get-DatumRsopCache )
3
+ {
4
+ Clear-DatumRsopCache
5
+ }
6
+
7
+ $datum = New-DatumStructure - DefinitionFile (Join-Path " $global :testroot \..\configurationdata" Datum.yml)
8
+ [hashtable []] $rsops = (Get-DatumRsop $datum (Get-DatumNodesRecursive - AllDatumNodes $Datum.AllNodes )).RuleCollections.Values.Rules
9
+ }
10
+
11
+ Describe " RSOP correctness" {
12
+ It " <Name> Policy rule has SID" - TestCases $rsops {
13
+ $UserOrGroupSid | Should -Not - BeNullOrEmpty
14
+ }
15
+ }
You can’t perform that action at this time.
0 commit comments