Add the exit status code to the analysis output for commands executed by scripts.
メンテナーはふだん 6 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず、GVisor straceの出力を解析し、スクリプトによって実行されたコマンドの分析出力を生成するコードを見つけます。このissueでは、関連する入力としてexecve、exit、exit_groupのレコードとPID/TIDの角括弧が示されています。表示されている0x0および0x7fの例を含め、終了ステータスが実行されたバイナリと対応付けられていることを確認し、生成された分析出力を検証します。
索引モデルが issue の本文から書いたものです。
説明
This ability can help find places where the sandbox can be improved, or be used to identify when a command being executed succeeded for failed.
The strace output generated by GVisor includes can be parsed to pair execve syscalls with exit or exit_group syscalls to extract the exit status of the executed binary.
For example, below shows a sample of strace output from GVisor of syscall exits. Note the PID == 3, with TID 4 and 7 exiting explicitly using (exit), with the entire group being exited as well (exit_group)
I0303 03:30:37.681359 206 strace.go:629] [ 3: 3] analyze.js X execve(0x7f782e606b40 /usr/local/bin/node ...
...
I0303 03:32:19.471116 206 strace.go:623] [ 3: 4] node X exit(0x0) = 0 (0x0) (1.336µs)
I0303 03:32:19.471135 206 strace.go:623] [ 3: 7] node X exit(0x0) = 0 (0x0) (1.413µs)
...
I0303 03:32:19.476033 206 strace.go:623] [ 3: 3] node X exit_group(0x0) = 0 (0x0) (15.45µs)
The exit code is included as the strace arg to the syscall. For example, below the exit code is 0x7f or 127:
I0303 03:32:04.019615 206 strace.go:623] [ 83: 83] ld-linux-x86-64 X exit_group(0x7f) = 0 (0x0) (1.823µs)
It is worth remembering in Linux that a process will first clone or fork itself and then call execve to hand execution over to the new binary. This means the PID and TID can be parsed from the square brackets before the name (e.g. [ 3: 7] corresponds to a PID of 3 and a TID of 7).
- 主要言語
- Go
- スター
- 925
- フォーク
- 75
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ossf/package-analysis のほかの issue
-
Python execute phase aborts with error_analysis when the package closes stdout (MCP stdio servers)オープン
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
ossf/package-analysis#1200 ·
メンテナーはふだん 6 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
ossf/package-analysis#1192 ·
メンテナーはふだん 6 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
ossf/package-analysis#1125 ·
メンテナーはふだん 6 日以内に返信
-
4gbオープン
難易度 5/5 1週間以上 初心者へのやさしさ 5/100
ossf/package-analysis#1123 ·
メンテナーはふだん 6 日以内に返信
-
>4 gbオープン
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
ossf/package-analysis#1122 ·
メンテナーはふだん 6 日以内に返信
ossf/package-analysis の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
evener-transcript-v2-upgrade tool still scans transcript files through bufio's 4 KiB default bufferオープン
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
prime-radiant-inc/evener#6370 ·
メンテナーはふだん 1 日以内に返信
-
ManageSieve proxy: a backend's NO/BYE greeting is skipped as a capability line and reported as EOFオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Mend: dependency security vulnerability
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
Mend: dependency security vulnerability
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
ManageIQ/manageiq-pods#1476 ·
メンテナーはふだん 1 日以内に返信