PowerShell / PowerShell/PSScriptAnalyzer
-SaveDscDependency does not work on Microsoft-hosted 'ubuntu-latest' agents
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 2.2k
- 派生
- 414
- 平均合并
- 13 小时 1 分钟
- 30 天内合并 PR
- 2
描述
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:
The same command works fine on Microsoft-hosted 'windows-latest' agents:
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,在 Microsoft 托管的 ubuntu-latest 代理上运行带有 -SaveDscDependency 的 Invoke-ScriptAnalyzer,并使用报告的 DSC 模块和 RestrictRDPForLocalAccounts.ps1 将其与 windows-latest 进行比较。完成的标准是 DSC 模块已下载,并且脚本文件扫描时不再出现报告的解析错误。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- powershell
- 领域
- cli, tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100