Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Powershell scripts fail with "AuthorizationManager check failed" on Windows using MXC sandbox

オープン
#2,594 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
活発
技術スタック
powershell

調査の方向性

MXC sandbox を有効にした Windows Insiders で、.\MyScript.ps1 スクリプトを実行して失敗を再現します。.copilot/settings.json と powershellFlags の設定から始め、失敗する起動と -NoProfile および -ExecutionPolicy RemoteSigned を使用する回避策を比較します。sandbox を有効にしたまま、AuthorizationManager エラーなしで PowerShell スクリプトが実行されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

I've set up Copilot CLI to use the new MXC sandbox on Windows insiders.

Issue

When the agent is trying to run a powershell script like .\MyScript.ps1 it gets a sandbox error in return.

AuthorizationManager check failed.
CategoryInfo: SecurityError
FullyQualifiedErrorId: UnauthorizedAccess
Exit code: 1

Workaround

After some digging it seems to be causes by powershell not being able to read the registry, so it can't get the current execution profile.
I changed .copilot\settings.json to set the ExecutionPolicy at launch and that worked.

{
...
  "powershellFlags": [
    "-NoProfile",
    "-NoLogo",
    "-ExecutionPolicy",
    "RemoteSigned"
  ],
...
}

Not sure what is a good fix here. Maybe copilot should load the execution policy from the user profile and inject it directly instead of letting powershell try to read it from registry?

主要言語
TypeScript
スター
10.5k
フォーク
1.5k
平均マージ
1日 7時間
マージ済み PR(30日)
64

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/copilot-sdk のほかの issue

github/copilot-sdk の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。