PowerShell / PowerShell/PSScriptAnalyzer
-SaveDscDependency does not work on Microsoft-hosted 'ubuntu-latest' agents
Nessuno ha ancora preso questa issue.
- Lingua principale
- C#
- Stelle
- 2.2k
- Fork
- 414
- Merge medio
- 13h 1m
- PR unite (30g)
- 2
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia eseguendo Invoke-ScriptAnalyzer con -SaveDscDependency su un agente ubuntu-latest ospitato da Microsoft e confrontalo con windows-latest, usando i moduli DSC segnalati e RestrictRDPForLocalAccounts.ps1. Il lavoro è completato quando i moduli DSC vengono scaricati e i file di script vengono analizzati senza gli errori di analisi segnalati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- powershell
- Ambito
- cli, tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100