Skip to content

Commit 51f77c0

Browse files
committed
Enhance auditpol workflow to include WELA integration and upload artifacts
1 parent d098967 commit 51f77c0

File tree

1 file changed

+46
-6
lines changed

1 file changed

+46
-6
lines changed

.github/workflows/check-auditpol.yml

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ jobs:
1818
auditpol /get /category:* | Out-File -FilePath $auditFile -Encoding utf8
1919
Get-Content $auditFile | Write-Host
2020
21+
- name: Upload auditpol artifact
22+
uses: actions/upload-artifact@v4
23+
with:
24+
name: auditpol-${{ matrix.os }}-${{ github.run_number }}
25+
path: AuditpolOutput-${{ matrix.os }}.txt
26+
retention-days: 10
27+
2128
- name: Run registry check script
2229
shell: pwsh
2330
run: |
@@ -64,16 +71,49 @@ jobs:
6471
$results | Export-Csv -Path $regFile -NoTypeInformation -Encoding UTF8
6572
$results | Format-Table -AutoSize
6673
67-
- name: Upload auditpol artifact
74+
- name: Upload CSV artifact
6875
uses: actions/upload-artifact@v4
6976
with:
70-
name: auditpol-${{ matrix.os }}-${{ github.run_number }}
71-
path: AuditpolOutput-${{ matrix.os }}.txt
77+
name: registry-settings-${{ matrix.os }}-${{ github.run_number }}
78+
path: RegistrySettings-${{ matrix.os }}.csv
7279
retention-days: 10
7380

74-
- name: Upload CSV artifact
81+
- name: Checkout repository
82+
uses: actions/checkout@v4
83+
with:
84+
fetch-depth: 0
85+
86+
- name: Checkout WELA repository
87+
uses: actions/checkout@v4
88+
with:
89+
repository: Yamato-Security/WELA
90+
path: WELA
91+
92+
- name: Run WELA.ps1 audit-settings
93+
run: |
94+
cd WELA
95+
./WELA.ps1 audit-settings -Baseline YamatoSecurity
96+
97+
- name: Run WELA.ps1 audit-filesize
98+
run: |
99+
cd WELA
100+
./WELA.ps1 audit-filesize -Baseline YamatoSecurity
101+
102+
- name: Rename WELA output files
103+
run: |
104+
$os = '${{ matrix.os }}'
105+
Get-ChildItem -Path WELA -Filter *.csv | ForEach-Object {
106+
Rename-Item -Path $_.FullName -NewName "$os`_$($_.Name)"
107+
}
108+
Get-ChildItem -Path WELA -Filter *.json | ForEach-Object {
109+
Rename-Item -Path $_.FullName -NewName "$os`_$($_.Name)"
110+
}
111+
112+
- name: Upload WELA artifacts
75113
uses: actions/upload-artifact@v4
76114
with:
77-
name: registry-settings-${{ matrix.os }}-${{ github.run_number }}
78-
path: RegistrySettings-${{ matrix.os }}.csv
115+
name: wela-reports-${{ matrix.os }}-${{ github.run_number }}
116+
path: |
117+
WELA/${{ matrix.os }}_*.csv
118+
WELA/${{ matrix.os }}_*.json
79119
retention-days: 10

0 commit comments

Comments
 (0)