bytecodealliance / bytecodealliance/cap-std

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

Đang mở
#351 2 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
821
Fork
57
Merge trung bình
1 giờ 16 phút
Pull request đã merge (30 ngày)
4

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với README của repository và cap-directories/README.md được liên kết, sau đó điều tra các công cụ và bước kiểm tra Rust được liệt kê về các dependency, mã unsafe, quyền truy cập thư mục môi trường, build script và các trường hợp unsoundness đã biết. Công việc được xem là hoàn tất khi một phần trong README ghi lại các công cụ áp dụng được, các giới hạn của chúng, cũng như những gì có thể và không thể được xác minh đối với một sandbox được xác minh tĩnh.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
rust
Lĩnh vực
documentation, security
Loại issue
Tài liệu
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
42/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.