From 87b8f20d8da3855c504f8da19d2533b011606b5d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 May 2026 09:10:49 +0000 Subject: [PATCH 1/2] Initial plan From d1228aa7fb8812b6fa9d2fa0c7e29a8688a0430d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 May 2026 09:12:10 +0000 Subject: [PATCH 2/2] fix: replace brittle HtmlAgilityPack.dll search with PSParseHTML import; remove duplicate request/parse block Agent-Logs-Url: https://github.com/DevClate/EntraFIDOFinder/sessions/7ecb517c-bbc6-4d57-950b-bc7051393d02 Co-authored-by: DevClate <107187714+DevClate@users.noreply.github.com> --- .github/workflows/GHMerge.yml | 5 ++++- Scripts/Export-GHEntraFido.ps1 | 17 ++--------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/GHMerge.yml b/.github/workflows/GHMerge.yml index e3d4e1e..8e2a3ca 100644 --- a/.github/workflows/GHMerge.yml +++ b/.github/workflows/GHMerge.yml @@ -24,7 +24,10 @@ jobs: - name: Install PSParseHTML Module shell: pwsh - run: Install-Module -Name PSParseHTML -Force -Scope CurrentUser + run: | + Set-PSRepository PSGallery -InstallationPolicy Trusted + Install-Module -Name PSParseHTML -Force -Scope CurrentUser + Import-Module PSParseHTML -Force - name: Run Merge-GHFidoData Script id: merge_script diff --git a/Scripts/Export-GHEntraFido.ps1 b/Scripts/Export-GHEntraFido.ps1 index 73282ed..4d91895 100644 --- a/Scripts/Export-GHEntraFido.ps1 +++ b/Scripts/Export-GHEntraFido.ps1 @@ -23,23 +23,10 @@ Function Export-GHEntraFido { [string]$Url ) - if (-not ('HtmlAgilityPack.HtmlDocument' -as [type])) { - $dll = Get-ChildItem -Path $HOME -Recurse -Filter HtmlAgilityPack.dll -ErrorAction SilentlyContinue | - Select-Object -First 1 - - if (-not $dll) { - throw "HtmlAgilityPack.dll not found. Ensure the dependency is installed before running Export-GHEntraFido." + if (-not (Get-Module -Name PSParseHTML)) { + Import-Module PSParseHTML -ErrorAction Stop } - Add-Type -Path $dll.FullName -} - - $response = Invoke-WebRequest -Uri $Url -UseBasicParsing - $htmlContent = $response.Content - - $htmlDocument = New-Object HtmlAgilityPack.HtmlDocument - $htmlDocument.LoadHtml($htmlContent) - # Fetch the webpage content $response = Invoke-WebRequest -Uri $Url -UseBasicParsing $htmlContent = $response.Content