Skip to content

curlコマンドにエラーハンドリングとチェックサム検証を追加 #511

@coderabbitai

Description

@coderabbitai

概要

downloadRunnerScriptAndUnZip 関数内の curl コマンドにエラーハンドリングとチェックサム検証を追加する必要があります。

問題点

  1. curlの -f フラグが未指定: HTTPエラー(404, 500など)が発生してもダウンロードが成功したと判断されます
  2. チェックサム検証なし: ダウンロードしたバイナリの整合性が検証されていないため、破損したファイルや改ざんされたファイルを実行する可能性があります

推奨される修正

curl -fsSL フラグを使用し、GitHubが提供するSHA256チェックサムを使用した検証を追加することを推奨します。

関連リンク

対象ファイル

openci-runner/firebase/functions/src/probot/github.tsdownloadRunnerScriptAndUnZip 関数

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions