bytecodealliance / bytecodealliance/cap-std

document what is needed for this to be a statically verified sandbox

オープン
#351 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
821
フォーク
57
平均マージ
1時間 16分
マージ済み PR(30日)
4

説明

Would adding a section to the Readme about this be welcome?

Together with static analysis, I think cap-std can be used to reduce the necessary code review to know that something does not escape the capabilities handed to it. So one would only need to review the API that one uses from a crate.

For this one would need some tool(s) one could run on a crate (and recursively its dependencies) to verify that it does not use any of the following:

* [cap-directories](https://github.com/bytecodealliance/cap-std/blob/main/cap-directories/README.md)
* [Dir::open_ambient_dir](https://docs.rs/cap-std/latest/cap_std/fs/struct.Dir.html#method.open_ambient_dir)
* the replaced functions/modules/crates (typical clippy job, but probably no ready made lint yet, can clippy guarantee this or is something else needed?)
* unsafe (there is `#![deny(unsafe_code)]` https://doc.rust-lang.org/reference/attributes/diagnostics.html , I think there are ready made tools, need to find a good recommendation)
* build script https://doc.rust-lang.org/cargo/reference/build-scripts.html (no idea if there is a ready to use tool to check, but easy to code)
* check known unsoundness like https://github.com/rust-lang/rust/issues/25860 are not used, I think miri https://github.com/rust-lang/miri is supposed to catch it, but need to double check

Any suggestions for relevant tools?

While there is research in that direction, for now none of this is to the level of formally proven, but the constructed to be correct level known from Rust.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

リポジトリのREADMEとリンク先のcap-directories/README.mdから始め、続いて一覧にあるRustのツールとチェックについて、依存関係、unsafeコード、ambient directory access、ビルドスクリプト、既知のunsoundnessを調査します。READMEのセクションに、適用可能なツール、その制限、および静的に検証されたサンドボックスについて検証できることと検証できないことが記載されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
documentation, security
issue の種類
ドキュメント
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
42/100

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

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