Skip to content

Commit 61e5d54

Browse files
ngtanthanh-qcclaude
andcommitted
Fix Permission denied when auto-opening HTML report on macOS/Linux
Start-Process with a file argument on non-Windows PowerShell tries to execute the file as a binary instead of using the OS file association, so an .html report (no +x bit) fails with "Permission denied" and the script exits with a fatal error after the assessment otherwise succeeds. Use the platform-native opener at the end of the script: - macOS: & open $htmlReportPath - Linux: & xdg-open $htmlReportPath - Windows: Start-Process $htmlReportPath (unchanged) $IsMacOS / $IsLinux are PowerShell 6+ automatic variables, so this is a no-op on Windows PowerShell 5.1 where neither evaluates true. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b663b86 commit 61e5d54

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to Semantic Versioning.
1212
- Top navigation now includes an Extensions anchor placed before Run Comparison for faster access to extension findings.
1313

1414
### Fixed
15+
- Auto-opening the executive HTML report at the end of a run now uses the platform-native opener (`open` on macOS, `xdg-open` on Linux, `Start-Process` on Windows) instead of `Start-Process` for all platforms, which raised `Permission denied` on macOS/Linux because PowerShell tried to execute the `.html` file as a binary.
1516
- Pipeline Authorization Scope checks now evaluate effective scope using project/org pipeline settings (`enforceJobAuthScope` and `enforceJobAuthScopeForReleases`) before pipeline-level values, preventing false positives when scope is enforced at project level.
1617
- Organization policy checks now evaluate policy `value` (with safe casing/boolean normalization) and include the new helper functions in parallel runspace serialization, fixing false results for `OAUTH-02` (SSH Access Disabled) and aligning `OAUTH-01` with the actual policy state.
1718

invoke-adoqr.ps1

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6238,7 +6238,15 @@ Write-Host ""
62386238

62396239
Write-Progress -Activity "Assessment" -Completed
62406240

6241-
# Auto-open the executive report in the default browser
6242-
Start-Process $htmlReportPath
6241+
# Auto-open the executive report in the default browser (cross-platform)
6242+
if ($IsMacOS) {
6243+
& open $htmlReportPath
6244+
}
6245+
elseif ($IsLinux) {
6246+
& xdg-open $htmlReportPath
6247+
}
6248+
else {
6249+
Start-Process $htmlReportPath
6250+
}
62436251

62446252
#endregion

0 commit comments

Comments
 (0)