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

Shell++ task relies on `/tmp` for temporary storage of script to execute.

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
devops, security

調査の方向性

ソースファイルもテストも指定されていません。スクリプトを /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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

microsoft/Extension-UtilitiesPack のほかの issue

microsoft/Extension-UtilitiesPack の issue をすべて見る

似ている issue

DevOps の issue をもっと見る

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

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