Files

50 lines
1.8 KiB
YAML

name: Native WMI descendant safeguards
on:
push:
branches: ['**']
paths:
- 'scripts/WmiNamespaceAuditing.ps1'
- 'scripts/WmiNamespaceDescendants.ps1'
- 'tests/WmiNamespaceDescendants*'
- '.github/workflows/wmi-descendants.yml'
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
wmi-descendants:
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
os: [windows-2022, windows-2025]
shell: [powershell, pwsh]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Native tree validation in Windows PowerShell
if: matrix.shell == 'powershell'
shell: powershell
run: |
./tests/WmiNamespaceAuditing.Tests.ps1
./tests/WmiNamespaceDescendants.Tests.ps1
./tests/WmiNamespaceDescendants.Cli.Tests.ps1
./tests/WmiNamespaceDescendants.Windows.Tests.ps1 -AllowDisposableNamespaceWrite -EvidencePath wmi-descendants-native.json
- name: Native tree validation in PowerShell 7
if: matrix.shell == 'pwsh'
shell: pwsh
run: |
./tests/WmiNamespaceAuditing.Tests.ps1
./tests/WmiNamespaceDescendants.Tests.ps1
./tests/WmiNamespaceDescendants.Cli.Tests.ps1
./tests/WmiNamespaceDescendants.Windows.Tests.ps1 -AllowDisposableNamespaceWrite -EvidencePath wmi-descendants-native.json
- name: Retain complete native observations
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: wmi-descendants-${{ matrix.os }}-${{ matrix.shell }}
path: |
wmi-descendants-native.json
wmi-descendants-native.json.journals
if-no-files-found: error