Shell++ task relies on `/tmp` for temporary storage of script to execute.
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- typescript
調査の方向性
ソースファイルもテストも指定されていません。スクリプトを /tmp に書き込む Shell++ タスクのコードを特定し、その後、Agent.TempDirectory と一時ファイルの作成がどのように扱われているかを確認してください。完了条件は、制限された権限を持つエージェントスコープの一意なファイルを使用し、実行後に削除することです。テストでは作成とクリーンアップをカバーしてください。
索引モデルが issue の本文から書いたものです。
説明
There is a small security risk here, where people can overwrite the file since it's in a shared, well known, location. In the Azure-DevOps-Extension-Tasks we switched to using the tmp package to generate a unique path name and used the Agent's temp directory instead of /tmp as a better, more secure location. As part of creating the temporary file, we also stripped its permissions.
function writeBuildTempFile(taskName: string, data: any): string {
const tempDir = tl.getVariable("Agent.TempDirectory");
const tempFile = tmp.tmpNameSync({ prefix: taskName, postfix: ".tmp", tmpdir: tempDir });
tl.debug(`Generating Build temp file: ${tempFile}`);
tl.writeFile(tempFile, data, { mode: 0o600, encoding: "utf8", flag: "wx+" });
return tempFile;
}
And made sure to delete the file after execution:
async function deleteBuildTempFile(tempFile: string) {
if (tempFile && tl.exist(tempFile)) {
tl.debug(`Deleting temp file: ${tempFile}`);
await fs.unlink(tempFile);
}
}
- 主要言語
- PowerShell
- スター
- 6
- フォーク
- 4
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/Extension-UtilitiesPack のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 46/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
microsoft/Extension-UtilitiesPack の issue をすべて見る
似ている issue
-
bug converter
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
grafana/sigma-rule-deployment#435 ·
メンテナーはふだん 1 日以内に返信
-
Add a just recipe that runs the workflow linters locally対応中かも @sgamelin が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
galaxyproject/iwc#1500 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
saketh-kowtha/lazyhub#355 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
ClockGU/clockwork-backend#169 ·
メンテナーはふだん 1 日以内に返信