git clone over HTTPS fails with socket error while node's HTTPS to the same host succeeds (secure-exec VM)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- git, node.js, rust
- 領域
- devtools, networking
調査の方向性
まず、git clone と成功する Node TCP/HTTPS プローブを使って vm.exec で失敗を再現し、次に registry/native/crates/libs/git/README.md を読み、公開済みパッケージのトランスポート動作を調査します。HTTPS による clone がサポートされているか、このパスで errno 21 が何を表すか、報告されたサブコマンドが意図されたものかを判断します。トランスポート動作とエラーが説明または修正されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
git clone over HTTPS fails inside the secure-exec VM with a socket error, while node's own TCP and HTTPS reach the same host from the same VM in the same session. Network egress is permitted to github.com, so this looks like the git transport rather than the sandbox policy.
$ git clone https://github.com/octocat/Hello-World.git /tmp/repo
exit=128
Cloning into '/tmp/repo'...
fatal: fetch info/refs failed: socket error: connect(github.com:443) failed: errno 21
Immediately afterwards, in the same VM:
same VM, node stdlib to the same host:
TCP ok
HTTPS 200
Environment
@rivet-dev/agentos |
0.2.15 |
@agentos-software/git |
0.3.3 |
@agentos-software/common |
0.2.15 |
| engine | rivetdev/engine:2.3.9 (self-hosted) |
| worker base | node:24-slim |
VM permissions are default: deny with an explicit allowlist; github.com is allowed for both tcp://github.com:* and dns://github.com. A denied host fails differently and says so explicitly (EACCES … blocked by network.http policy), which is how we ruled the policy out — the message above is a socket error with no policy mention.
Reproduction
const vm = client.vm.getOrCreate("repro-" + Date.now());
// fails
await vm.exec("git clone https://github.com/octocat/Hello-World.git /tmp/repo");
// succeeds, same VM, same host
const probe = `
const net = require('net'), https = require('https');
net.connect({host:'github.com', port:443}, function(){ console.log('TCP ok'); this.destroy(); });
https.get({host:'github.com', path:'/', headers:{'User-Agent':'p'}}, r => { console.log('HTTPS ' + r.statusCode); r.destroy(); });
`;
await vm.exec(`node -e "eval(Buffer.from('${Buffer.from(probe).toString("base64")}','base64').toString())"`);
Questions
- Is HTTPS a supported clone transport for
@agentos-software/git? The error text points atregistry/native/crates/libs/git/README.md, which I can't see from the published package — the.aospkgdoes containgit://,ssh://andhttps://strings, so it reads as intended-but-not-working rather than unsupported. - If HTTPS is supported, does the git transport use a different egress path from node's stdlib — one that needs allowlisting separately from
tcp://host:port? That would explain a socket error while node succeeds. - What does
errno 21mean here? Other in-VM errors use WASI numbering (os error 44for ENOENT), which would make 21EFAULTand doesn't obviously fit aconnect().
Also, minor
A few subcommands report as unimplemented — flagging in case the list is unintentional rather than by design:
git --version→GitSubcommandUnsupportedgit log→GitSubcommandUnsupportedgit clone --depth 1 <url> <dest>→fatal: usage: git clone <source> [<destination>]
--version in particular is a common probe for "is git usable here", so it failing makes capability detection awkward.
Workaround
Fetching the repository as a tarball from codeload.github.com over plain HTTPS and unpacking with tar from @agentos-software/common, which works. Posting mainly because a working clone would give us verbatim transport output and ref handling that the tarball path doesn't.
- 主要言語
- Rust
- スター
- 4.7k
- フォーク
- 263
- 平均マージ
- 9時間 43分
- マージ済み PR(30日)
- 27
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rivet-dev/agentos のほかの issue
-
Python edits to filesystem.writeFile-created files are reverted by shadow reconciliation対応中かも @ankssjain が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
rivet-dev/agentos#2022 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 半日 初心者へのやさしさ 32/100
メンテナーはふだん 1 日以内に返信
-
Python launched through guest shell stalls on queued filesystem RPCs対応中かも @ankssjain が 7 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 66/100
rivet-dev/agentos#1994 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
rivet-dev/agentos の issue をすべて見る
似ている issue
-
agent/sec-check hive/hive-school-tunaos security
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
Sovereign-Labs/sovereign-sdk#3070 ·
-
Accepts Invalid URLオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
area:prove bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Chelis-Lang/chelis#3317 ·
メンテナーはふだん 1 日以内に返信
-
[macOS Desktop] New sidebar hover navigation accidentally switches sections while reaching a chatオープンapp bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信