Skip to content

Commit bb0fff9

Browse files
committed
Update build template
1 parent 49cab44 commit bb0fff9

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

templates/AppLockerProject/build/build.ps1

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,25 @@
22
param
33
(
44
[string]
5-
$SourcePath = (Resolve-Path "$PSScriptRoot\..\configurationdata").Path,
5+
$SourcePath = "$PSScriptRoot\..\configurationdata",
66

77
[string]
8-
$OutputPath = (Resolve-Path "$PSScriptRoot\..\output").Path,
8+
$OutputPath = "$PSScriptRoot\..\output",
99

1010
[switch]
1111
$IncludeRsop
1212
)
1313

14+
$SourcePath = Resolve-Path -Path $SourcePath -ErrorAction Stop
15+
$OutputPath = if (-not (Resolve-Path -Path $OutputPath -ErrorAction SilentlyContinue))
16+
{
17+
(New-Item -Path $OutputPath -ItemType Directory -Force).FullName
18+
}
19+
else
20+
{
21+
Resolve-Path -Path $OutputPath
22+
}
23+
1424
$rsopPath = Join-Path -Path $OutputPath -ChildPath rsop
1525
$policyPath = Join-Path -Path $OutputPath -ChildPath policies
1626
if (-not (Test-Path -Path $rsopPath))
@@ -23,6 +33,11 @@ if (-not (Test-Path -Path $policyPath))
2333
$null = New-Item -Path $policyPath -ItemType Directory -Force
2434
}
2535

36+
if (Get-DatumRsopCache)
37+
{
38+
Clear-DatumRsopCache
39+
}
40+
2641
$datum = New-DatumStructure -DefinitionFile (Join-Path $SourcePath Datum.yml)
2742
$rsops = Get-DatumRsop $datum (Get-DatumNodesRecursive -AllDatumNodes $Datum.AllNodes)
2843
$rsops | Export-AlfXml -Path $policyPath

templates/AppLockerProject/configurationdata/Datum.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,44 @@ lookup_options:
2424
merge_options:
2525
tuple_keys:
2626
- Name
27+
RuleCollections\Exe\Rules\Exceptions:
28+
merge_basetype_array: Unique
2729
RuleCollections\Msi:
2830
merge_hash: deep
2931
RuleCollections\Msi\Rules:
3032
merge_hash_array: UniqueKeyValTuples
3133
merge_options:
3234
tuple_keys:
3335
- Name
36+
RuleCollections\Msi\Rules\Exceptions:
37+
merge_basetype_array: Unique
3438
RuleCollections\Dll:
3539
merge_hash: deep
3640
RuleCollections\Dll\Rules:
3741
merge_hash_array: UniqueKeyValTuples
3842
merge_options:
3943
tuple_keys:
4044
- Name
45+
RuleCollections\Dll\Rules\Exceptions:
46+
merge_basetype_array: Unique
47+
RuleCollections\Script:
48+
merge_hash: deep
49+
RuleCollections\Script\Rules:
50+
merge_hash_array: UniqueKeyValTuples
51+
merge_options:
52+
tuple_keys:
53+
- Name
54+
RuleCollections\Script\Rules\Exceptions:
55+
merge_basetype_array: Unique
56+
RuleCollections\Appx:
57+
merge_hash: deep
58+
RuleCollections\Appx\Rules:
59+
merge_hash_array: UniqueKeyValTuples
60+
merge_options:
61+
tuple_keys:
62+
- Name
63+
RuleCollections\Appx\Rules\Exceptions:
64+
merge_basetype_array: Unique
4165

4266
DatumStructure:
4367
- StoreName: AllNodes

0 commit comments

Comments
 (0)