Skip to content

-SaveDscDependency does not work on Microsoft-hosted 'ubuntu-latest' agents #2096

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ferike86 opened this issue Apr 22, 2025 · 0 comments
Open

Comments

@ferike86
Copy link

Steps to reproduce

Invoke-ScriptAnalyzer -Path . -Recurse -ReportSummary -SaveDscDependency -EnableExit

We have some new scripts which rely on DSC modules (for example 'nxtools', 'PSDscResources' and 'SecurityPolicyDSC'). RestrictRDPForLocalAccounts.ps1 is one of the PowerShell script files that used DSC modules. While executing the PSScriptAnalyzer scan with the -SaveDscDependency option on the Microsoft-hosted 'ubuntu-latest' agents in our CI/CD pipeline, the DSC modules are not saved:

Image

The same command works fine on Microsoft-hosted 'windows-latest' agents:

Image

Expected behavior

The DSC modules are downloaded and the script files are scanned the same way as on Windows.

Actual behavior

The DSC modules are not downloaded and the scan list parse errors.

Environment data

Microsoft-hosted 'ubuntu-latest' agents
PowerShell 7.4.7
PSScriptAnalyzer: 1.24.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant