Skip to content

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

Description

@ferike86

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions