PowerShell / PowerShell/PSScriptAnalyzer
"Invoke-ScriptAnalyzer : The network path was not found" run time error thrown by PSSA
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 2.2k
- フォーク
- 414
- 平均マージ
- 13時間 1分
- マージ済み PR(30日)
- 2
説明
We are using PSSA as a PR policy for our repo, when the ps1 file has a code like this:
& "\\networkpath\\test.exe"
The Invoke-ScriptAnalyzer will throw a error like "Invoke-ScriptAnalyzer : The network path was not found"
The error will disappear if I change the code like this
$path = "\\networkpath\\test.exe"
& $path
I think PSSA should not check the networkpath, since .ps1 file will be running on a different environment other than dev environment. Also, this check seems not a rule in PSSA, but it caused a runtime error when calling Invoke-ScriptAnalyzer and this break our PR policy pipeline. Should PSSA not throw the error in such condition?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、issue 内の 2 つの PowerShell スニペットを使って Invoke-ScriptAnalyzer を再現し、ネットワーク パスの直接呼び出しが実行または検証される理由を特定します。アナライザーの呼び出しとランタイム エラー処理を追跡し、そのうえで、適用可能な診断を引き続き報告しながら、分析にネットワーク パスへのアクセスが必要ないことを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- powershell
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100